Changeset View
Changeset View
Standalone View
Standalone View
language/duchain/ducontextdata.h
Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Line(s) | |||||
43 | 43 | | |||
44 | ///This class contains data that needs to be stored to disk | 44 | ///This class contains data that needs to be stored to disk | ||
45 | class KDEVPLATFORMLANGUAGE_EXPORT DUContextData : public DUChainBaseData | 45 | class KDEVPLATFORMLANGUAGE_EXPORT DUContextData : public DUChainBaseData | ||
46 | { | 46 | { | ||
47 | public: | 47 | public: | ||
48 | DUContextData(); | 48 | DUContextData(); | ||
49 | ~DUContextData(); | 49 | ~DUContextData(); | ||
50 | DUContextData(const DUContextData& rhs); | 50 | DUContextData(const DUContextData& rhs); | ||
51 | DUContext::ContextType m_contextType; | 51 | | ||
52 | IndexedQualifiedIdentifier m_scopeIdentifier; | 52 | IndexedQualifiedIdentifier m_scopeIdentifier; | ||
53 | IndexedDeclaration m_owner; | 53 | IndexedDeclaration m_owner; | ||
54 | typedef DUContext::Import Import; | 54 | typedef DUContext::Import Import; | ||
55 | START_APPENDED_LISTS_BASE(DUContextData, DUChainBaseData); | 55 | START_APPENDED_LISTS_BASE(DUContextData, DUChainBaseData); | ||
56 | APPENDED_LIST_FIRST(DUContextData, Import, m_importedContexts); | 56 | APPENDED_LIST_FIRST(DUContextData, Import, m_importedContexts); | ||
57 | APPENDED_LIST(DUContextData, LocalIndexedDUContext, m_childContexts, m_importedContexts); | 57 | APPENDED_LIST(DUContextData, LocalIndexedDUContext, m_childContexts, m_importedContexts); | ||
58 | 58 | | |||
59 | ///@todo Create an additional structure for importing to/from "temporary" contexts and classes in a way that it persists while saving/loading, | 59 | ///@todo Create an additional structure for importing to/from "temporary" contexts and classes in a way that it persists while saving/loading, | ||
60 | /// and doesn't require changing a top-contexts data only because a class was derived from. | 60 | /// and doesn't require changing a top-contexts data only because a class was derived from. | ||
61 | APPENDED_LIST(DUContextData, IndexedDUContext, m_importers, m_childContexts); | 61 | APPENDED_LIST(DUContextData, IndexedDUContext, m_importers, m_childContexts); | ||
62 | 62 | | |||
63 | ///@warning: Whenever m_localDeclarations is read or written, the duchain must be locked | 63 | ///@warning: Whenever m_localDeclarations is read or written, the duchain must be locked | ||
64 | APPENDED_LIST(DUContextData, LocalIndexedDeclaration, m_localDeclarations, m_importers); | 64 | APPENDED_LIST(DUContextData, LocalIndexedDeclaration, m_localDeclarations, m_importers); | ||
65 | /** | 65 | /** | ||
66 | * Vector of all uses in this context | 66 | * Vector of all uses in this context | ||
67 | * Mutable for range synchronization | 67 | * Mutable for range synchronization | ||
68 | * */ | 68 | * */ | ||
69 | APPENDED_LIST(DUContextData, Use, m_uses, m_localDeclarations); | 69 | APPENDED_LIST(DUContextData, Use, m_uses, m_localDeclarations); | ||
70 | END_APPENDED_LISTS(DUContextData, m_uses); | 70 | END_APPENDED_LISTS(DUContextData, m_uses); | ||
71 | 71 | | |||
72 | DUContext::ContextType m_contextType; | ||||
72 | bool m_inSymbolTable : 1; | 73 | bool m_inSymbolTable : 1; | ||
73 | bool m_anonymousInParent : 1; //Whether this context was added anonymously into the parent. This means that it cannot be found as child-context in the parent. | 74 | bool m_anonymousInParent : 1; //Whether this context was added anonymously into the parent. This means that it cannot be found as child-context in the parent. | ||
74 | bool m_propagateDeclarations : 1; | 75 | bool m_propagateDeclarations : 1; | ||
75 | private: | 76 | private: | ||
76 | DUContextData& operator=(const DUContextData&) { | 77 | DUContextData& operator=(const DUContextData&) { | ||
77 | return *this; | 78 | return *this; | ||
78 | } | 79 | } | ||
79 | }; | 80 | }; | ||
80 | 81 | | |||
81 | } | 82 | } | ||
82 | 83 | | |||
83 | 84 | | |||
84 | #endif | 85 | #endif |