kdevelop/kdevplatform/language/duchain
duchainbase.cpp
Go to the documentation of this file.
85 if (d_ptr->m_dynamic) // If the data object isn't dynamic, then it is part of a central repository, and cannot be deleted here.
116 QMutexLocker lock(&weakPointerMutex); // The mutex is used to make sure we don't create m_ptr twice at the same time
138 //We don't delete the previous data, because it's embedded in the top-context when it isn't dynamic.
139 //However we do call the destructor, to keep semantic stuff like reference-counting within the data class working correctly.
156 DocumentChangeTracker* tracker = ICore::self()->languageController()->backgroundParser()->trackerForUrl(url());
163 // If the document is not open, we can simply cast the range over, as no translation can be done
175 DocumentChangeTracker* tracker = ICore::self()->languageController()->backgroundParser()->trackerForUrl(url());
187 DocumentChangeTracker* tracker = ICore::self()->languageController()->backgroundParser()->trackerForUrl(url());
197 KTextEditor::Range DUChainBase::transformFromLocalRevision(const KDevelop::RangeInRevision& range) const
199 DocumentChangeTracker* tracker = ICore::self()->languageController()->backgroundParser()->trackerForUrl(url());
209 KTextEditor::Cursor DUChainBase::transformFromLocalRevision(const KDevelop::CursorInRevision& cursor) const
211 DocumentChangeTracker* tracker = ICore::self()->languageController()->backgroundParser()->trackerForUrl(url());
RangeInRevision range() const
Returns the range assigned to this object, in the document revision when this document was last parse...
Definition: duchainbase.cpp:149
uint dataClassSize(const DUChainBaseData &data) const
Returns the size of the derived class, not including dynamic data.
Definition: duchainregister.cpp:70
REGISTER_DUCHAIN_ITEM(AliasDeclaration)
static DUChainItemSystem & self()
Access the static DUChainItemSystem instance.
Definition: duchainregister.cpp:86
void makeDynamic()
After this was called, the data-pointer is dynamic. It is cloned if needed.
Definition: duchainbase.cpp:130
QThreadStorage< bool > shouldCreateConstantDataStorage
Definition: duchainbase.cpp:226
DUChainBaseData * cloneData(const DUChainBaseData &data) const
Creates a dynamic copy of the given data.
Definition: duchainregister.cpp:40
KTextEditor::Range rangeInCurrentRevision() const
Returns the range assigned to this object, transformed into the current revision of the document...
Definition: duchainbase.cpp:154
static bool & shouldCreateConstantData()
Used to decide whether a constructed item should create constant data.
Definition: duchainbase.cpp:228
The top context in a definition-use chain for one source file.
Definition: topducontext.h:113
void callDestructor(DUChainBaseData *data) const
Calls the destructor, but does not delete anything.
Definition: duchainregister.cpp:49
DUChainBaseData * d_ptr
Data pointer that is shared across all the inheritance hierarchy.
Definition: duchainbase.h:221
virtual void setData(DUChainBaseData *, bool constructorCalled=true)
This must only be used to change the storage-location or storage-kind(dynamic/constant) of the data...
Definition: duchainbase.cpp:77
void setRange(const RangeInRevision &range)
Changes the range assigned to this object, in the document revision when this document is parsed...
Definition: duchainbase.cpp:221
const QExplicitlySharedDataPointer< DUChainPointerData > & weakPointer() const
Returns a special pointer that can be used to track the existence of a du-chain object across locking...
Definition: duchainbase.cpp:113
CursorInRevision transformToLocalRevision(const KTextEditor::Cursor &cursor) const
Transforms the given cursor in the current document revision to its according position in the parsed ...
Definition: duchainbase.cpp:173
Whenever the du-chain is unlocked and locked again, any du-chain item may have been deleted in betwee...
Definition: duchainpointer.h:50
A single context in source code, represented as a node in a directed acyclic graph.
Definition: ducontext.h:72
Definition: duchainbase.h:59
KTextEditor::Cursor transformFromLocalRevision(const CursorInRevision &cursor) const
PersistentMovingRange::Ptr createRangeMoving() const
Returns the range assigned to this object, transformed into the current revision of the document...
Definition: duchainbase.cpp:167
virtual void rebuildDynamicData(DUContext *parent, uint ownIndex)
Called after loading to rebuild the dynamic data. If this is a context, this should recursively work ...
Definition: duchainbase.cpp:124
QExplicitlySharedDataPointer< ParsingEnvironmentFile > parsingEnvironmentFile() const
Definition: topducontext.cpp:564
virtual TopDUContext * topContext() const
Determine the top context to which this object belongs.
Definition: duchainbase.cpp:103
This file is part of the KDE documentation.
Documentation copyright © 1996-2019 The KDE developers.
Generated on Sat Dec 7 2019 04:28:06 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2019 The KDE developers.
Generated on Sat Dec 7 2019 04:28:06 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.