• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdevelop API Reference
  • KDE Home
  • Contact Us
 

kdevplatform/language/duchain

  • sources
  • kfour-appscomplete
  • kdevelop
  • kdevplatform
  • language
  • duchain
topducontextdata.h
Go to the documentation of this file.
1 /***************************************************************************
2 * This file is part of KDevelop *
3 * Copyright 2008 David Nolden <[email protected]> *
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU Library General Public License as *
7 * published by the Free Software Foundation; either version 2 of the *
8 * License, or (at your option) any later version. *
9 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU Library General Public *
16 * License along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
19 ***************************************************************************/
20 
21 #ifndef KDEVPLATFORM_TOPDUCONTEXTDATA_H
22 #define KDEVPLATFORM_TOPDUCONTEXTDATA_H
23 
24 #include "ducontextdata.h"
25 #include "topducontext.h"
26 #include "declarationid.h"
27 #include "problem.h"
28 
29 #include <serialization/indexedstring.h>
30 
31 namespace KDevelop {
32 KDEVPLATFORMLANGUAGE_EXPORT DECLARE_LIST_MEMBER_HASH(TopDUContextData, m_usedDeclarationIds, DeclarationId)
33 KDEVPLATFORMLANGUAGE_EXPORT DECLARE_LIST_MEMBER_HASH(TopDUContextData, m_problems, LocalIndexedProblem)
34 
35 class KDEVPLATFORMLANGUAGE_EXPORT TopDUContextData
36  : public DUContextData
37 {
38 public:
39  explicit TopDUContextData(const IndexedString& url)
40  : DUContextData()
41  , m_url(url)
42  , m_ownIndex(0)
43  , m_currentUsedDeclarationIndex(0)
44  {
45  initializeAppendedLists();
46  }
47 
48  TopDUContextData(const TopDUContextData& rhs)
49  : DUContextData(rhs)
50  {
51  initializeAppendedLists();
52  copyListsFrom(rhs);
53  m_features = rhs.m_features;
54  m_url = rhs.m_url;
55  m_currentUsedDeclarationIndex = rhs.m_currentUsedDeclarationIndex;
56  m_ownIndex = rhs.m_ownIndex;
57  m_importsCache = rhs.m_importsCache;
58  }
59 
60  ~TopDUContextData()
61  {
62  freeAppendedLists();
63  }
64 
65  TopDUContextData& operator=(const TopDUContextData& rhs) = delete;
66 
67  TopDUContext::Features m_features;
68 
69  IndexedString m_url;
70  uint m_ownIndex;
71 
73  TopDUContext::IndexedRecursiveImports m_importsCache;
74 
76  uint m_currentUsedDeclarationIndex;
77 
78  START_APPENDED_LISTS_BASE(TopDUContextData, DUContextData);
80  APPENDED_LIST_FIRST(TopDUContextData, DeclarationId, m_usedDeclarationIds);
81  APPENDED_LIST(TopDUContextData, LocalIndexedProblem, m_problems, m_usedDeclarationIds);
82  END_APPENDED_LISTS(TopDUContextData, m_problems);
83 
84 private:
85  static void updateImportCacheRecursion(IndexedTopDUContext currentContext, std::set<uint>& visited);
86  static void updateImportCacheRecursion(uint baseIndex, IndexedTopDUContext currentContext,
87  TopDUContext::IndexedRecursiveImports& imports);
88  friend class TopDUContext;
89 };
90 }
91 #endif
KDevelop::IndexedTopDUContext
Allows simple indirect access to top-contexts with on-demand loading.
Definition: indexedtopducontext.h:35
APPENDED_LIST_FIRST
#define APPENDED_LIST_FIRST(container, type, name)
Definition: appendedlist.h:321
KDevelop::m_problems
KDEVPLATFORMLANGUAGE_EXPORT m_problems
Definition: topducontextdata.h:49
START_APPENDED_LISTS_BASE
#define START_APPENDED_LISTS_BASE(container, base)
Use this if one of the base-classes of the container also has the appended lists interfaces implement...
Definition: appendedlist.h:257
KDevelop::TopDUContext::IndexedRecursiveImports
Utils::StorableSet< IndexedTopDUContext, IndexedTopDUContextIndexConversion, RecursiveImportRepository, true > IndexedRecursiveImports
Definition: topducontext.h:290
DUContextData
topducontext.h
problem.h
KDevelop::TopDUContextData
Definition: topducontextdata.h:51
KDevelop::DECLARE_LIST_MEMBER_HASH
KDEVPLATFORMLANGUAGE_EXPORT DECLARE_LIST_MEMBER_HASH(DUContextData, m_childContexts, LocalIndexedDUContext) KDEVPLATFORMLANGUAGE_EXPORT DECLARE_LIST_MEMBER_HASH(DUContextData
APPENDED_LIST
#define APPENDED_LIST(container, type, name, predecessor)
Definition: appendedlist.h:338
ducontextdata.h
KDevelop::TopDUContext
The top context in a definition-use chain for one source file.
Definition: topducontext.h:113
KDevelop::DeclarationId
Allows clearly identifying a Declaration.
Definition: declarationid.h:50
declarationid.h
END_APPENDED_LISTS
#define END_APPENDED_LISTS(container, predecessor)
Definition: appendedlist.h:358
KDevelop
Definition: abstractfunctiondeclaration.cpp:27
KDevelop::LocalIndexedProblem
Represents a problem only by its index within the top-context.
Definition: problem.h:44
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Wed Mar 3 2021 00:37:28 by doxygen 1.8.16 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kdevplatform/language/duchain

Skip menu "kdevplatform/language/duchain"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdevelop API Reference

Skip menu "kdevelop API Reference"
  • kdevplatform
  •   debugger
  •   documentation
  •   interfaces
  •   language
  •     assistant
  •     backgroundparser
  •     checks
  •     classmodel
  •     codecompletion
  •     codegen
  •     duchain
  •     editor
  •     highlighting
  •     interfaces
  •     util
  •   outputview
  •   project
  •   serialization
  •   shell
  •   sublime
  •   tests
  •   util
  •   vcs

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal