1 /*
2     SPDX-FileCopyrightText: 2006 Hamish Rodda <rodda@kde.org>
3     SPDX-FileCopyrightText: 2007-2008 David Nolden <david.nolden.kdevelop@art-master.de>
4 
5     SPDX-License-Identifier: LGPL-2.0-only
6 */
7 
8 #ifndef KDEVPLATFORM_DECLARATION_DATA_H
9 #define KDEVPLATFORM_DECLARATION_DATA_H
10 
11 #include "duchainbase.h"
12 
13 #include "declaration.h"
14 #include "declarationid.h"
15 #include "ducontext.h"
16 #include "topducontext.h"
17 #include "duchainlock.h"
18 #include "duchain.h"
19 #include <language/languageexport.h>
20 #include "types/indexedtype.h"
21 
22 namespace KDevelop {
23 class KDEVPLATFORMLANGUAGE_EXPORT DeclarationData
24     : public DUChainBaseData
25 {
26 public:
27     DeclarationData();
28     DeclarationData(const DeclarationData& rhs) = default;
29 
30     IndexedDUContext m_internalContext;
31     IndexedType m_type;
32     IndexedIdentifier m_identifier;
33 
34     ///@todo Eventually move this and all the definition/declaration coupling functionality somewhere else
35     //Holds the declaration id for this definition, if this is a definition with separate declaration
36     DeclarationId m_declaration;
37 
38     //Index in the comment repository
39     uint m_comment = 0;
40 
41     Declaration::Kind m_kind = Declaration::Instance;
42 
43     bool m_isDefinition  : 1;
44     bool m_inSymbolTable : 1;
45     bool m_isTypeAlias   : 1;
46     bool m_anonymousInContext : 1; //Whether the declaration was added into the parent-context anonymously
47     bool m_isDeprecated      : 1;
48     bool m_alwaysForceDirect : 1;
49     bool m_isAutoDeclaration : 1;
50     bool m_isExplicitlyDeleted : 1;
51     bool m_isExplicitlyTyped : 1;
52 };
53 }
54 
55 #endif
56