summaryrefslogtreecommitdiffstats
path: root/umbrello/umbrello/codeimport/javaimport.h
blob: 204895e2a0ec9dc5346d4e21dbb8f0a59aff3e66 (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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
/***************************************************************************
 *                                                                         *
 *   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) 2006                                                     *
 *  Umbrello UML Modeller Authors <uml-devel@uml.sf.net>                   *
 ***************************************************************************/

#ifndef JAVAIMPORT_H
#define JAVAIMPORT_H

#include "nativeimportbase.h"
#include "../umlobject.h"

/**
 * Java code import
 * @author Oliver Kellogg
 * @author JP Fournier
 * Bugs and comments to uml-devel@lists.sf.net or http://bugs.trinitydesktop.org
 */
class JavaImport : public NativeImportBase {
public:
    JavaImport();
    virtual ~JavaImport();

protected:
    /**
     * Reimplement operation from NativeImportBase.
     */
    void initVars();

    /**
     * Implement abstract operation from NativeImportBase.
     */
    bool parseStmt();

    /**
     * Implement abstract operation from NativeImportBase.
     */
    void fillSource(const TQString& word);

    /**
     * Keep track of the filename currently being parsed
     */
    void parseFile(const TQString& filename);

    /**
     * Try to resolve the specified class the current class depends on
     */
    UMLObject* resolveClass (TQString className);

    /**
     * spawn off an import of the specified file
     */
    void spawnImport(TQString file);

    /**
     * figure out if the type is really an array or template of the given typeName
     */
    TQString joinTypename(TQString typeName);

    /**
     * true if the member var or method is declared static
     */
    bool m_isStatic;

    /**
     * The current filename being parsed
     */
    TQString m_currentFileName;

    /**
     * the current package of the file being parsed
     */
    TQString m_currentPackage;

    /**
     * the imports included in the current file
     */
    TQStringList m_imports;

    /**
     * Keep track of the files we have already parsed so we don't
     * reparse the same ones over and over again.
     */
    static TQStringList s_filesAlreadyParsed;

    /**
     * Keep track of the parses so that the filesAlreadyParsed
     * can be reset when we're done.
     */
    static int s_parseDepth;

    /**
     * The current visibility for when the visibility is absent
     */
    Uml::Visibility m_defaultCurrentAccess;


};

#endif