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

language/duchain

KDevelop::AbstractDeclarationBuilder

KDevelop::AbstractDeclarationBuilder< T, NameT, LanguageSpecificDeclarationBuilderBase > Class Template Reference

A class which iterates the AST to extract definitions of types. More...

#include <abstractdeclarationbuilder.h>

Inherits LanguageSpecificDeclarationBuilderBase.

List of all members.

Protected Types

enum  DeclarationFlags { NoFlags = 0x0, DeclarationIsDefinition = 0x1 }

Protected Member Functions

void abortDeclaration ()
void clearComment ()
virtual void closeDeclaration ()
const QByteArray & comment () const
template<class DeclarationType >
DeclarationType * currentDeclaration () const
Declaration * currentDeclaration () const
void eventuallyAssignInternalContext ()
bool hasCurrentDeclaration () const
template<class DeclarationT >
DeclarationT * openDeclaration (const QualifiedIdentifier &id, const SimpleRange &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 SimpleRange &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 38 of file abstractdeclarationbuilder.h.


Member Function Documentation

template<typename T , typename NameT , typename LanguageSpecificDeclarationBuilderBase >
void KDevelop::AbstractDeclarationBuilder< T, NameT, LanguageSpecificDeclarationBuilderBase >::abortDeclaration (  )  [inline, protected]

Abort a declaration, deleting it.

Definition at line 217 of file abstractdeclarationbuilder.h.

template<typename T , typename NameT , typename LanguageSpecificDeclarationBuilderBase >
void KDevelop::AbstractDeclarationBuilder< T, NameT, LanguageSpecificDeclarationBuilderBase >::clearComment (  )  [inline, protected]

Clears the current comment.

Definition at line 54 of file abstractdeclarationbuilder.h.

template<typename T , typename NameT , typename LanguageSpecificDeclarationBuilderBase >
virtual void KDevelop::AbstractDeclarationBuilder< T, NameT, LanguageSpecificDeclarationBuilderBase >::closeDeclaration (  )  [inline, protected, virtual]

Close a declaration. Virtual to allow subclasses to perform customisations to declarations.

Definition at line 211 of file abstractdeclarationbuilder.h.

template<typename T , typename NameT , typename LanguageSpecificDeclarationBuilderBase >
const QByteArray& KDevelop::AbstractDeclarationBuilder< T, NameT, LanguageSpecificDeclarationBuilderBase >::comment (  )  const [inline, protected]

Access the current comment.

Returns:
the current comment, or an empty string if none exists.

Definition at line 50 of file abstractdeclarationbuilder.h.

template<typename T , typename NameT , typename LanguageSpecificDeclarationBuilderBase >
template<class DeclarationType >
DeclarationType* KDevelop::AbstractDeclarationBuilder< T, NameT, LanguageSpecificDeclarationBuilderBase >::currentDeclaration (  )  const [inline, protected]

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 47 of file abstractdeclarationbuilder.h.

template<typename T , typename NameT , typename LanguageSpecificDeclarationBuilderBase >
Declaration* KDevelop::AbstractDeclarationBuilder< T, NameT, LanguageSpecificDeclarationBuilderBase >::currentDeclaration (  )  const [inline, protected]

Access the current declaration.

Returns:
the current declaration, or null if there is no current declaration.

Definition at line 44 of file abstractdeclarationbuilder.h.

template<typename T , typename NameT , typename LanguageSpecificDeclarationBuilderBase >
void KDevelop::AbstractDeclarationBuilder< T, NameT, LanguageSpecificDeclarationBuilderBase >::eventuallyAssignInternalContext (  )  [inline, protected]

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 184 of file abstractdeclarationbuilder.h.

template<typename T , typename NameT , typename LanguageSpecificDeclarationBuilderBase >
bool KDevelop::AbstractDeclarationBuilder< T, NameT, LanguageSpecificDeclarationBuilderBase >::hasCurrentDeclaration (  )  const [inline, protected]

Determine if there is currently a declaration open.

Returns:
true if a declaration is open, otherwise false.

Definition at line 42 of file abstractdeclarationbuilder.h.

template<typename T , typename NameT , typename LanguageSpecificDeclarationBuilderBase >
template<class DeclarationT >
DeclarationT* KDevelop::AbstractDeclarationBuilder< T, NameT, LanguageSpecificDeclarationBuilderBase >::openDeclaration ( const QualifiedIdentifier &  id,
const SimpleRange &  newRange,
DeclarationFlags  flags = NoFlags 
) [inline, protected]
Parameters:
id the identifier of the new declaration.
newRange the range which the identifier for the new declaration occupies.
isFunction whether the new declaration is a function.
isForward whether the new declaration is a forward declaration.
isDefinition whether the new declaration is also a definition.

Definition at line 95 of file abstractdeclarationbuilder.h.

template<typename T , typename NameT , typename LanguageSpecificDeclarationBuilderBase >
template<class DeclarationT >
DeclarationT* KDevelop::AbstractDeclarationBuilder< T, NameT, LanguageSpecificDeclarationBuilderBase >::openDeclaration ( NameT *  name,
T *  range,
DeclarationFlags  flags = NoFlags 
) [inline, protected]

Register a new declaration with the definition-use chain.

Returns the new declaration created.

Parameters:
name When this is zero, the identifier given through customName is used.
range provide a valid AST node here if name is null.
isFunction whether the new declaration is a function.
isForward whether the new declaration is a forward declaration.
isDefinition whether the new declaration is also a definition.

Definition at line 71 of file abstractdeclarationbuilder.h.

template<typename T , typename NameT , typename LanguageSpecificDeclarationBuilderBase >
void KDevelop::AbstractDeclarationBuilder< T, NameT, LanguageSpecificDeclarationBuilderBase >::openDeclarationInternal ( Declaration *  declaration  )  [inline, protected]

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 171 of file abstractdeclarationbuilder.h.

template<typename T , typename NameT , typename LanguageSpecificDeclarationBuilderBase >
template<class DeclarationT >
DeclarationT* KDevelop::AbstractDeclarationBuilder< T, NameT, LanguageSpecificDeclarationBuilderBase >::openDefinition ( const QualifiedIdentifier &  id,
const SimpleRange &  newRange 
) [inline, protected]

Convenience function. Same as openDeclaration(), but creates the declaration as a definition.

Definition at line 164 of file abstractdeclarationbuilder.h.

template<typename T , typename NameT , typename LanguageSpecificDeclarationBuilderBase >
template<class DeclarationT >
DeclarationT* KDevelop::AbstractDeclarationBuilder< T, NameT, LanguageSpecificDeclarationBuilderBase >::openDefinition ( NameT *  name,
T *  range 
) [inline, protected]

Convenience function. Same as openDeclaration(), but creates the declaration as a definition.

Definition at line 157 of file abstractdeclarationbuilder.h.

template<typename T , typename NameT , typename LanguageSpecificDeclarationBuilderBase >
ForwardDeclaration* KDevelop::AbstractDeclarationBuilder< T, NameT, LanguageSpecificDeclarationBuilderBase >::openForwardDeclaration ( NameT *  name,
T *  range 
) [inline, protected]

Convenience function. Same as openDeclaration(), but creates a forward declaration.

Definition at line 177 of file abstractdeclarationbuilder.h.

template<typename T , typename NameT , typename LanguageSpecificDeclarationBuilderBase >
void KDevelop::AbstractDeclarationBuilder< T, NameT, LanguageSpecificDeclarationBuilderBase >::setComment ( const QByteArray &  comment  )  [inline, protected]

Set the current comment.

Parameters:
comment the new comment.

Definition at line 52 of file abstractdeclarationbuilder.h.


The documentation for this class was generated from the following file:
  • abstractdeclarationbuilder.h

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