kdevplatform/language/duchain
#include <abstractdeclarationbuilder.h>

Protected Types | |
enum | DeclarationFlags { NoFlags = 0x0, DeclarationIsDefinition = 0x1 } |
Protected Member Functions | |
void | abortDeclaration () |
void | clearComment () |
virtual void | closeDeclaration () |
const QByteArray & | comment () const |
Declaration * | currentDeclaration () const |
template<class DeclarationType > | |
DeclarationType * | currentDeclaration () const |
void | eventuallyAssignInternalContext () |
bool | hasCurrentDeclaration () const |
template<class DeclarationT > | |
DeclarationT * | openDeclaration (const Identifier &localId, const RangeInRevision &newRange, DeclarationFlags flags=NoFlags) |
template<class DeclarationT > | |
DeclarationT * | openDeclaration (const QualifiedIdentifier &id, const RangeInRevision &newRange, DeclarationFlags flags=NoFlags) |
template<class DeclarationT > | |
DeclarationT * | openDeclaration (NameT *name, T *range, DeclarationFlags flags=NoFlags) |
void | openDeclarationInternal (Declaration *declaration) |
template<class DeclarationT > | |
DeclarationT * | openDefinition (const QualifiedIdentifier &id, const RangeInRevision &newRange) |
template<class DeclarationT > | |
DeclarationT * | openDefinition (NameT *name, T *range) |
ForwardDeclaration * | openForwardDeclaration (NameT *name, T *range) |
void | setComment (const QByteArray &comment) |
Detailed Description
template<typename T, typename NameT, typename LanguageSpecificDeclarationBuilderBase>
class KDevelop::AbstractDeclarationBuilder< T, NameT, LanguageSpecificDeclarationBuilderBase >
A class which iterates the AST to extract definitions of types.
Definition at line 36 of file abstractdeclarationbuilder.h.
Member Enumeration Documentation
◆ DeclarationFlags
|
protected |
Enumerator | |
---|---|
NoFlags | |
DeclarationIsDefinition |
Definition at line 61 of file abstractdeclarationbuilder.h.
Member Function Documentation
◆ abortDeclaration()
|
inlineprotected |
Abort a declaration, deleting it.
Definition at line 232 of file abstractdeclarationbuilder.h.
◆ clearComment()
|
inlineprotected |
Clears the current comment.
Definition at line 59 of file abstractdeclarationbuilder.h.
◆ closeDeclaration()
|
inlineprotectedvirtual |
Close a declaration. Virtual to allow subclasses to perform customisations to declarations.
Definition at line 226 of file abstractdeclarationbuilder.h.
◆ comment()
|
inlineprotected |
Access the current comment.
- Returns
- the current comment, or an empty string if none exists.
Definition at line 55 of file abstractdeclarationbuilder.h.
◆ currentDeclaration() [1/2]
|
inlineprotected |
Access the current declaration.
- Returns
- the current declaration, or null if there is no current declaration.
Definition at line 43 of file abstractdeclarationbuilder.h.
◆ currentDeclaration() [2/2]
|
inlineprotected |
Access the current declaration, casted to type DeclarationType.
- Returns
- the current declaration if one exists and is an instance of the given DeclarationType.
Definition at line 49 of file abstractdeclarationbuilder.h.
◆ eventuallyAssignInternalContext()
|
inlineprotected |
Set the internal context of a declaration; for example, a class declaration's internal context is the context inside the brackets: class ClassName { ...
}
Definition at line 195 of file abstractdeclarationbuilder.h.
◆ hasCurrentDeclaration()
|
inlineprotected |
Determine if there is currently a declaration open.
- Returns
- true if a declaration is open, otherwise false.
Definition at line 41 of file abstractdeclarationbuilder.h.
◆ openDeclaration() [1/3]
|
inlineprotected |
- Parameters
-
localId the identifier of the new declaration. newRange the range which the identifier for the new declaration occupies. flags equal to DeclarationIsDefinition whether the new declaration is also a definition
- Returns
- the new declaration created
Definition at line 118 of file abstractdeclarationbuilder.h.
◆ openDeclaration() [2/3]
|
inlineprotected |
- Parameters
-
id the identifier of the new declaration. newRange the range which the identifier for the new declaration occupies. flags equal to DeclarationIsDefinition whether the new declaration is also a definition
- Returns
- the new declaration created
Definition at line 95 of file abstractdeclarationbuilder.h.
◆ openDeclaration() [3/3]
|
inlineprotected |
Register a new declaration with the definition-use chain.
- Parameters
-
name When this is zero, the identifier given through customName is used range provide a valid AST node here if name is null flags equal to DeclarationIsDefinition whether the new declaration is also a definition
- Returns
- the new declaration created
Definition at line 74 of file abstractdeclarationbuilder.h.
◆ openDeclarationInternal()
|
inlineprotected |
Internal function to open the given declaration by pushing it onto the declaration stack.
Provided for subclasses who don't want to use the generic openDeclaration() functions.
Definition at line 182 of file abstractdeclarationbuilder.h.
◆ openDefinition() [1/2]
|
inlineprotected |
Convenience function. Same as openDeclaration(), but creates the declaration as a definition.
Definition at line 175 of file abstractdeclarationbuilder.h.
◆ openDefinition() [2/2]
|
inlineprotected |
Convenience function. Same as openDeclaration(), but creates the declaration as a definition.
Definition at line 168 of file abstractdeclarationbuilder.h.
◆ openForwardDeclaration()
|
inlineprotected |
Convenience function. Same as openDeclaration(), but creates a forward declaration.
Definition at line 188 of file abstractdeclarationbuilder.h.
◆ setComment()
|
inlineprotected |
Set the current comment.
- Parameters
-
comment the new comment.
Definition at line 57 of file abstractdeclarationbuilder.h.
The documentation for this class was generated from the following file:
Documentation copyright © 1996-2021 The KDE developers.
Generated on Thu Mar 4 2021 23:31:18 by doxygen 1.8.16 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.