Library: CppParser
Package: SymbolTable
Header: Poco/CppParser/Struct.h
This class represents a struct or class declaration.
Direct Base Classes: NameSpace
All Base Classes: NameSpace, Symbol
Member Functions: addBase, addDerived, baseBegin, baseEnd, bases, constructors, declaration, derived, derivedBegin, derivedEnd, destructor, findFunction, fixupBases, flags, hasVirtualDestructor, inheritedMethods, isClass, isDerived, isInline, kind, makeInline, methods, toString
Inherited Functions: addDocumentation, addSymbol, attrs, begin, classes, end, enums, extract, extractName, fullName, functions, getAccess, getAttributes, getDocumentation, getFile, getLibrary, getLineNumber, getPackage, hasAttr, id, importNameSpace, importSymbol, importedNameSpaces, importedSymbols, isIdent, isPrivate, isProtected, isPublic, kind, lookup, name, nameSpace, nameSpaces, root, setAccess, setAttributes, setDocumentation, setFile, setLibrary, setLineNumber, setPackage, splitName, toString, typeDefs, variables
typedef std::vector < Base > BaseClasses;
typedef BaseClasses::const_iterator BaseIterator;
typedef StructVec::const_iterator DerivedIterator;
typedef std::set < Function * > FunctionSet;
typedef std::vector < Function * > Functions;
typedef std::set < Struct * > StructSet;
typedef std::vector < Struct * > StructVec;
FN_TEMPLATE = 1
FN_INLINE = 2
FN_TEMPLATE_SPECIALIZATION = 4
Struct(
const std::string & decl,
bool isClass,
NameSpace * pNameSpace
);
Creates the Struct.
~Struct();
Destroys the Struct.
void addBase(
const std::string & param6,
Symbol::Access access,
bool isVirtual
);
Adds a base class.
void addDerived(
Struct * pClass
);
Adds a derived class.
BaseIterator baseBegin() const;
Returns an iterator for iterating over all base classes.
BaseIterator baseEnd() const;
Returns an iterator for iterating over all base classes.
void bases(
std::set < std::string > & bases
) const;
Returns all base classes.
void constructors(
Functions & functions
) const;
Returns all constructors, sorted by their parameter count.
const std::string & declaration() const;
Returns the declaration.
void derived(
StructSet & derived
) const;
Returns all derived classes.
DerivedIterator derivedBegin() const;
Returns an iterator for iterating over all derived classes.
DerivedIterator derivedEnd() const;
Returns an iterator for iterating over all derived classes.
Function * destructor() const;
Returns the destructor, or NULL if no destructor is defined.
Function * findFunction(
const std::string & signature
) const;
Finds a function with the given signature.
void fixupBases();
Adds pointers for all base classes.
int flags() const;
Returns the struct's flags.
bool hasVirtualDestructor() const;
Returns true if the class CppParser_API or one if its base classes has a virtual destructor.
void inheritedMethods(
FunctionSet & functions
) const;
Returns all inherited methods.
bool isClass() const;
Returns true if and only if the struct was declared as class.
bool isDerived() const;
Returns true if and only if the struct or class is derived from another struct or class.
bool isInline() const;
Returns true if the complete class is inlined in a cpp file.
Symbol::Kind kind() const;
void makeInline();
Changes the class to a inline class, i.e. definition and implementation are hidden in a cpp file.
void methods(
Symbol::Access access,
Functions & functions
) const;
Returns all functions with the given access.
std::string toString() const;
See also: Poco::CppParser::NameSpace::toString()