summaryrefslogtreecommitdiffstats
path: root/umbrello/umbrello/codeimport/cppimport.h
blob: 04cc1d127d159716b5d7ab28c4f7dab11b486385 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *  copyright (C) 2005-2006                                                *
 *  Umbrello UML Modeller Authors <uml-devel@uml.sf.net>                   *
 ***************************************************************************/

#ifndef CPPIMPORT_H
#define CPPIMPORT_H

#include <tqstring.h>
#include "classimport.h"

class CppDriver;

/**
 * C++ code import
 * @author Oliver Kellogg
 * Bugs and comments to uml-devel@lists.sf.net or http://bugs.trinitydesktop.org
 */

class CppImport : public ClassImport {
public:
    CppImport();
    virtual ~CppImport();

protected:
    /**
     * Implement abstract operation from ClassImport for C++.
     */
    void initialize();

    /**
     * Import a single file.
     *
     * @param filename  The file to import.
     */
    void parseFile(const TQString& filename);

private:
    /**
    * Auxiliary method for recursively traversing the #include dependencies
    * in order to feed innermost includes to the model before dependent
    * includes.  It is important that includefiles are fed to the model
    * in proper order so that references between UML objects are created
    * properly.
    */
    void feedTheModel(const TQString& fileName);

    static CppDriver * ms_driver;
    static TQStringList ms_seenFiles;  ///< auxiliary buffer for feedTheModel()

};

#endif