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