• Skip to content
  • Skip to link menu
KDE 4.4 API Reference
  • KDE API Reference
  • KDevelop Platform Libraries
  • Sitemap
  • Contact Us
 

language/duchain

KDevelop::DUContextDynamicData

KDevelop::DUContextDynamicData Class Reference

This class contains data that is only runtime-dependant and does not need to be stored to disk. More...

#include <ducontextdata.h>

List of all members.

Classes

struct  ImportsHash_Op
 This can deal with endless recursion. More...

Public Types

typedef QMultiHash< Identifier,
DeclarationPointer > 
DeclarationsHash
typedef google::dense_hash_map
< const DUContextDynamicData
*, bool, ImportsHash_Op > 
ImportsHash

Public Member Functions

 DUContextDynamicData (DUContext *)
void addChildContext (DUContext *context)
void addDeclaration (Declaration *declaration)
void addDeclarationToHash (const Identifier &identifer, Declaration *declaration)
void addImportedChildContext (DUContext *context)
void disableLocalDeclarationsHash ()
void enableLocalDeclarationsHash (DUContext *ctx, const Identifier &currentIdentifier=Identifier(), Declaration *currentDecl=0)
bool imports (const DUContext *context, const TopDUContext *source, int maxDepth) const
bool importsSafeButSlow (const DUContext *context, const TopDUContext *source, ImportsHash &checked) const
bool needsLocalDeclarationsHash ()
bool removeChildContext (DUContext *context)
bool removeDeclaration (Declaration *declaration)
void removeDeclarationFromHash (const Identifier &identifer, Declaration *declaration)
void removeImportedChildContext (DUContext *context)
void scopeIdentifier (bool includeClasses, QualifiedIdentifier &target) const

Public Attributes

DUContext * m_context
bool m_hasLocalDeclarationsHash
uint m_indexInTopContext
DeclarationsHash m_localDeclarationsHash
DUContextPointer m_parentContext
bool m_rangesChanged: 1
QVector
< KTextEditor::SmartRange * > 
m_rangesForUses
TopDUContext * m_topContext

Static Public Attributes

static QMutex m_localDeclarationsMutex

Detailed Description

This class contains data that is only runtime-dependant and does not need to be stored to disk.

Definition at line 91 of file ducontextdata.h.


Member Function Documentation

void KDevelop::DUContextDynamicData::addChildContext ( DUContext *  context  ) 

Adds a child context.

Note:
Be sure to have set the text location first, so that the chain is sorted correctly.

Todo:
Do binary search to find the position

Definition at line 427 of file ducontext.cpp.

void KDevelop::DUContextDynamicData::addDeclaration ( Declaration *  declaration  ) 

Todo:
Do binary search to find the position

Definition at line 360 of file ducontext.cpp.

void KDevelop::DUContextDynamicData::addDeclarationToHash ( const Identifier &  identifer,
Declaration *  declaration 
)

This propagates the declaration into the parent search-hashes, up to the first parent that has m_propagateDeclarations set to false.

Must be called with m_localDeclarationsMutex locked

Definition at line 336 of file ducontext.cpp.

void KDevelop::DUContextDynamicData::enableLocalDeclarationsHash ( DUContext *  ctx,
const Identifier &  currentIdentifier = Identifier(),
Declaration *  currentDecl = 0 
)

Adds all declarations that should be in the hash into the hash.

Definition at line 286 of file ducontext.cpp.

bool KDevelop::DUContextDynamicData::imports ( const DUContext *  context,
const TopDUContext *  source,
int  maxDepth 
) const

Returns true if this context is imported by the given one, on any level.

Definition at line 139 of file ducontext.cpp.

bool KDevelop::DUContextDynamicData::needsLocalDeclarationsHash (  ) 

Todo:
Do this again, it brings a large performance boost

Definition at line 313 of file ducontext.cpp.

bool KDevelop::DUContextDynamicData::removeChildContext ( DUContext *  context  ) 

Removes the context from childContexts.

Returns:
Whether a context was removed

Definition at line 474 of file ducontext.cpp.

bool KDevelop::DUContextDynamicData::removeDeclaration ( Declaration *  declaration  ) 

Removes the declaration from localDeclarations.

Returns:
Whether a declaration was removed

Definition at line 406 of file ducontext.cpp.

void KDevelop::DUContextDynamicData::removeDeclarationFromHash ( const Identifier &  identifer,
Declaration *  declaration 
)

Must be called with m_localDeclarationsMutex locked.

Definition at line 348 of file ducontext.cpp.


Member Data Documentation

DeclarationsHash KDevelop::DUContextDynamicData::m_localDeclarationsHash
Warning:
: Whenever m_localDeclarations is read or written, m_localDeclarationsHash must be locked.

Definition at line 112 of file ducontextdata.h.

QVector<KTextEditor::SmartRange*> KDevelop::DUContextDynamicData::m_rangesForUses [mutable]

If this document is loaded, this contains a smart-range for each use.

This may temporarily contain zero ranges.

Definition at line 120 of file ducontextdata.h.


The documentation for this class was generated from the following files:
  • ducontextdata.h
  • ducontext.cpp

language/duchain

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

KDevelop Platform Libraries

Skip menu "KDevelop Platform Libraries"
  • interfaces
  • language
  •   codegen
  •   duchain
  •   editor
  • outputview
  • project
  • shell
  • sublime
  • util
  • vcs
Generated for KDevelop Platform Libraries by doxygen 1.5.9-20090814
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal