File indexing completed on 2024-05-12 04:37:57

0001 /*
0002     SPDX-FileCopyrightText: 2006 Hamish Rodda <rodda@kde.org>
0003     SPDX-FileCopyrightText: 2007-2008 David Nolden <david.nolden.kdevelop@art-master.de>
0004 
0005     SPDX-License-Identifier: LGPL-2.0-only
0006 */
0007 
0008 #ifndef KDEVPLATFORM_DECLARATION_DATA_H
0009 #define KDEVPLATFORM_DECLARATION_DATA_H
0010 
0011 #include "duchainbase.h"
0012 
0013 #include "declaration.h"
0014 #include "declarationid.h"
0015 #include "ducontext.h"
0016 #include "topducontext.h"
0017 #include "duchainlock.h"
0018 #include "duchain.h"
0019 #include <language/languageexport.h>
0020 #include "types/indexedtype.h"
0021 
0022 namespace KDevelop {
0023 class KDEVPLATFORMLANGUAGE_EXPORT DeclarationData
0024     : public DUChainBaseData
0025 {
0026 public:
0027     DeclarationData();
0028     DeclarationData(const DeclarationData& rhs) = default;
0029 
0030     IndexedDUContext m_internalContext;
0031     IndexedType m_type;
0032     IndexedIdentifier m_identifier;
0033 
0034     ///@todo Eventually move this and all the definition/declaration coupling functionality somewhere else
0035     //Holds the declaration id for this definition, if this is a definition with separate declaration
0036     DeclarationId m_declaration;
0037 
0038     //Index in the comment repository
0039     uint m_comment = 0;
0040 
0041     Declaration::Kind m_kind = Declaration::Instance;
0042 
0043     bool m_isDefinition  : 1;
0044     bool m_inSymbolTable : 1;
0045     bool m_isTypeAlias   : 1;
0046     bool m_anonymousInContext : 1; //Whether the declaration was added into the parent-context anonymously
0047     bool m_isDeprecated      : 1;
0048     bool m_alwaysForceDirect : 1;
0049     bool m_isAutoDeclaration : 1;
0050     bool m_isExplicitlyDeleted : 1;
0051     bool m_isExplicitlyTyped : 1;
0052 };
0053 }
0054 
0055 #endif