language/duchain
KDevelop::PersistentSymbolTable Class Reference
Global symbol-table that is stored to disk, and allows retrieving declarations that currently are not loaded to memory. More...
#include <persistentsymboltable.h>
Public Types | |
|
typedef Utils::StorableSet < IndexedTopDUContext, IndexedTopDUContextIndexConversion, RecursiveImportCacheRepository, true > | CachedIndexedRecursiveImports |
|
typedef ConstantConvenientEmbeddedSet < IndexedDUContext, IndexedDUContextHandler > | Contexts |
|
typedef ConstantConvenientEmbeddedSet < IndexedDeclaration, IndexedDeclarationHandler > | Declarations |
|
typedef ConvenientEmbeddedSetTreeFilterIterator < IndexedDeclaration, IndexedDeclarationHandler, IndexedTopDUContext, CachedIndexedRecursiveImports, DeclarationTopContextExtractor > | FilteredDeclarationIterator |
|
typedef ConvenientEmbeddedSetTreeFilterIterator < IndexedDUContext, IndexedDUContextHandler, IndexedTopDUContext, CachedIndexedRecursiveImports, DUContextTopContextExtractor > | FilteredDUContextIterator |
Public Member Functions | |
| PersistentSymbolTable () | |
| ~PersistentSymbolTable () | |
| void | addContext (const IndexedQualifiedIdentifier &id, const IndexedDUContext &context) |
| void | addDeclaration (const IndexedQualifiedIdentifier &id, const IndexedDeclaration &declaration) |
| void | clearCache () |
| void | contexts (const IndexedQualifiedIdentifier &id, uint &count, const IndexedDUContext *&contexts) const |
| void | declarations (const IndexedQualifiedIdentifier &id, uint &count, const IndexedDeclaration *&declarations) const |
| Contexts | getContexts (const IndexedQualifiedIdentifier &id) const |
| Declarations | getDeclarations (const IndexedQualifiedIdentifier &id) const |
| FilteredDUContextIterator | getFilteredContexts (const IndexedQualifiedIdentifier &id, const TopDUContext::IndexedRecursiveImports &visibility) const |
| FilteredDeclarationIterator | getFilteredDeclarations (const IndexedQualifiedIdentifier &id, const TopDUContext::IndexedRecursiveImports &visibility) const |
| void | removeContext (const IndexedQualifiedIdentifier &id, const IndexedDUContext &context) |
| void | removeDeclaration (const IndexedQualifiedIdentifier &id, const IndexedDeclaration &declaration) |
| void | selfAnalysis () |
Static Public Member Functions | |
| static PersistentSymbolTable & | self () |
Detailed Description
Global symbol-table that is stored to disk, and allows retrieving declarations that currently are not loaded to memory.
Definition at line 126 of file persistentsymboltable.h.
Constructor & Destructor Documentation
| KDevelop::PersistentSymbolTable::PersistentSymbolTable | ( | ) |
Constructor.
Definition at line 229 of file persistentsymboltable.cpp.
| KDevelop::PersistentSymbolTable::~PersistentSymbolTable | ( | ) |
Destructor.
Definition at line 233 of file persistentsymboltable.cpp.
Member Function Documentation
| void KDevelop::PersistentSymbolTable::addContext | ( | const IndexedQualifiedIdentifier & | id, | |
| const IndexedDUContext & | context | |||
| ) |
Adds context context with id id to the symbol table.
- Warning:
- DUChain must be write locked
Definition at line 480 of file persistentsymboltable.cpp.
| void KDevelop::PersistentSymbolTable::addDeclaration | ( | const IndexedQualifiedIdentifier & | id, | |
| const IndexedDeclaration & | declaration | |||
| ) |
Adds declaration declaration with id id to the symbol table.
- Warning:
- DUChain must be write locked
Definition at line 240 of file persistentsymboltable.cpp.
| void KDevelop::PersistentSymbolTable::contexts | ( | const IndexedQualifiedIdentifier & | id, | |
| uint & | count, | |||
| const IndexedDUContext *& | contexts | |||
| ) | const |
Retrieves all the contexts for a given IndexedQualifiedIdentifier in an efficient way.
- Parameters:
-
id The IndexedQualifiedIdentifier for which the contexts should be retrieved count A reference that will be filled with the count of retrieved contexts contexts A reference to a pointer, that will be filled with a pointer to the retrieved contexts.
- Warning:
- DUChain must be read locked as long as the returned data is used
Definition at line 593 of file persistentsymboltable.cpp.
| void KDevelop::PersistentSymbolTable::declarations | ( | const IndexedQualifiedIdentifier & | id, | |
| uint & | count, | |||
| const IndexedDeclaration *& | declarations | |||
| ) | const |
Retrieves all the declarations for a given IndexedQualifiedIdentifier in an efficient way.
- Parameters:
-
id The IndexedQualifiedIdentifier for which the declarations should be retrieved count A reference that will be filled with the count of retrieved declarations declarations A reference to a pointer, that will be filled with a pointer to the retrieved declarations.
- Warning:
- DUChain must be read locked as long as the returned data is used
Definition at line 459 of file persistentsymboltable.cpp.
| PersistentSymbolTable::Contexts KDevelop::PersistentSymbolTable::getContexts | ( | const IndexedQualifiedIdentifier & | id | ) | const |
Retrieves all the contexts for a given IndexedQualifiedIdentifier in an efficient way, and returns them in a more user-friendly structure then contexs().
- Parameters:
-
id The IndexedQualifiedIdentifier for which the contexts should be retrieved
- Warning:
- DUChain must be read locked as long as the returned data is used
Definition at line 575 of file persistentsymboltable.cpp.
| PersistentSymbolTable::Declarations KDevelop::PersistentSymbolTable::getDeclarations | ( | const IndexedQualifiedIdentifier & | id | ) | const |
Retrieves all the declarations for a given IndexedQualifiedIdentifier in an efficient way, and returns them in a structure that is more convenient than declarations().
- Parameters:
-
id The IndexedQualifiedIdentifier for which the declarations should be retrieved
- Warning:
- DUChain must be read locked as long as the returned data is used
Definition at line 441 of file persistentsymboltable.cpp.
| PersistentSymbolTable::FilteredDUContextIterator KDevelop::PersistentSymbolTable::getFilteredContexts | ( | const IndexedQualifiedIdentifier & | id, | |
| const TopDUContext::IndexedRecursiveImports & | visibility | |||
| ) | const |
Retrieves an iterator to all declarations of the given id, filtered by the visilibity given through.
- Parameters:
-
visibility This is very efficient since it uses a cache The returned iterator is valid as long as the duchain read lock is held
- Warning:
- DUChain must be read locked as long as the returned data is used
Definition at line 399 of file persistentsymboltable.cpp.
| PersistentSymbolTable::FilteredDeclarationIterator KDevelop::PersistentSymbolTable::getFilteredDeclarations | ( | const IndexedQualifiedIdentifier & | id, | |
| const TopDUContext::IndexedRecursiveImports & | visibility | |||
| ) | const |
Retrieves an iterator to all declarations of the given id, filtered by the visilibity given through.
- Parameters:
-
visibility This is very efficient since it uses a cache The returned iterator is valid as long as the duchain read lock is held
Definition at line 344 of file persistentsymboltable.cpp.
| void KDevelop::PersistentSymbolTable::removeContext | ( | const IndexedQualifiedIdentifier & | id, | |
| const IndexedDUContext & | context | |||
| ) |
Removes context context with id id to the symbol table.
- Warning:
- DUChain must be write locked
Definition at line 528 of file persistentsymboltable.cpp.
| void KDevelop::PersistentSymbolTable::removeDeclaration | ( | const IndexedQualifiedIdentifier & | id, | |
| const IndexedDeclaration & | declaration | |||
| ) |
Adds declaration declaration with id id to the symbol table.
- Warning:
- DUChain must be write locked
Definition at line 286 of file persistentsymboltable.cpp.
The documentation for this class was generated from the following files:
KDE 4.4 API Reference