language/duchain
KDevelop::DUChainPointerData Class Reference
Whenever the du-chain is unlocked and locked again, any du-chain item may have been deleted in between. More...
#include <duchainpointer.h>
Inherits KShared.
Public Member Functions | |
| DUChainPointerData () | |
| DUChainBase * | base () const |
| DUChainBase * | base () |
Detailed Description
Whenever the du-chain is unlocked and locked again, any du-chain item may have been deleted in between.
For that reason, the following class should be used to make sure that no deleted objects are accessed. It contains a pointer that will be reset to zero once the pointed object is deleted.
Access to the data must still be serialized through duchain-locking. Using this comes with no additional cost.
In practice this means: Store an instance of DUChainPointer instead of a pointer to the du-chain object. Then, access the eventually still existing object by calling pointer->base().
To make it even more convenient see DUChainPointer
Definition at line 50 of file duchainpointer.h.
Constructor & Destructor Documentation
| KDevelop::DUChainPointerData::DUChainPointerData | ( | ) |
Default-initialization of an invalid reference.
Definition at line 35 of file duchainpointer.cpp.
Member Function Documentation
| DUChainBase * KDevelop::DUChainPointerData::base | ( | ) | const |
Will return zero once the pointed-to object was deleted.
Definition at line 30 of file duchainpointer.cpp.
| DUChainBase * KDevelop::DUChainPointerData::base | ( | ) |
Will return zero once the pointed-to object was deleted.
Definition at line 25 of file duchainpointer.cpp.
The documentation for this class was generated from the following files:
KDE 4.4 API Reference