language/duchain
KDevelop::ForwardDeclaration Class Reference
Represents a forward declaration. More...
#include <forwarddeclaration.h>

Public Types | |
| enum | { Identity = 10 } |
| typedef Declaration | BaseClass |
Public Member Functions | |
| ForwardDeclaration (const ForwardDeclaration &rhs) | |
| ForwardDeclaration (ForwardDeclarationData &data) | |
| ForwardDeclaration (const SimpleRange &range, DUContext *context) | |
| virtual | ~ForwardDeclaration () |
| virtual bool | isForwardDeclaration () const |
| virtual DUContext * | logicalInternalContext (const TopDUContext *topContext) const |
| virtual Declaration * | resolve (const TopDUContext *topContext) const |
| virtual QString | toString () const |
Detailed Description
Represents a forward declaration.
Definition at line 41 of file forwarddeclaration.h.
Constructor & Destructor Documentation
| KDevelop::ForwardDeclaration::ForwardDeclaration | ( | const SimpleRange & | range, | |
| DUContext * | context | |||
| ) |
Constructor.
If context is in the symbol table, the declaration will automatically be added into the symbol table.
- Parameters:
-
url url of the document where this occurred range range of the alias declaration's identifier parentContext context in which this declaration occurred
Definition at line 46 of file forwarddeclaration.cpp.
| KDevelop::ForwardDeclaration::ForwardDeclaration | ( | const ForwardDeclaration & | rhs | ) |
Copy-constructor for cloning.
Definition at line 39 of file forwarddeclaration.cpp.
| KDevelop::ForwardDeclaration::~ForwardDeclaration | ( | ) | [virtual] |
Destructor.
Definition at line 54 of file forwarddeclaration.cpp.
Member Function Documentation
| bool KDevelop::ForwardDeclaration::isForwardDeclaration | ( | ) | const [virtual] |
Determine whether this declaration is a forward declaration.
- Returns:
- true if this is a forward declaration, otherwise returns false.
Reimplemented from KDevelop::Declaration.
Definition at line 108 of file forwarddeclaration.cpp.
| DUContext * KDevelop::ForwardDeclaration::logicalInternalContext | ( | const TopDUContext * | topContext | ) | const [virtual] |
Determine the logical internal context for the resolved form of this declaration.
* If this declaration has a definition, and the definition is resolved, it returns the internal context of the definition. * If this declaration is a forward-declaration, the forward-declaration is resolved, it returns the internal context of the resolved declaration. * If this is a type-alias, it returns the internal context of the actual type. * Otherwise, it returns the same as internalContext().
- Parameters:
-
topContext Needed to resolve forward-declarations.
- Returns:
- the resolved internal context, as described above
If this is a type-alias, return the internal context of the actual type.
Reimplemented from KDevelop::Declaration.
Definition at line 98 of file forwarddeclaration.cpp.
| Declaration * KDevelop::ForwardDeclaration::resolve | ( | const TopDUContext * | topContext | ) | const [virtual] |
Resolved the forward-declaration using the given import-trace.
The topcontext is needed for correct functionality, and may only be zero when the declaration is resolved starting from the top-context the forward-declaration is contained in.
If this forward-declaration has a type assigned that is not derived from ForwardDeclarationType, and that is derived from IdentifiedType, the declaration of that type is returned here.
Definition at line 66 of file forwarddeclaration.cpp.
| QString KDevelop::ForwardDeclaration::toString | ( | ) | const [virtual] |
Determine this declaration as a string.
- Returns:
- this declaration as a string.
Reimplemented from KDevelop::Declaration.
Definition at line 58 of file forwarddeclaration.cpp.
The documentation for this class was generated from the following files:
KDE 4.4 API Reference