Poco::CppParser

class Struct

Library: CppParser
Package: SymbolTable
Header: Poco/CppParser/Struct.h

Description

This class represents a struct or class declaration.

Inheritance

Direct Base Classes: NameSpace

All Base Classes: NameSpace, Symbol

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, makeFinal, 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, typeAliases, typeDefs, variables

Nested Classes

struct Base

 more...

Types

BaseClasses

typedef std::vector < Base > BaseClasses;

BaseIterator

typedef BaseClasses::const_iterator BaseIterator;

DerivedIterator

typedef StructVec::const_iterator DerivedIterator;

FunctionSet

typedef std::set < Function * > FunctionSet;

Functions

typedef std::vector < Function * > Functions;

StructSet

typedef std::set < Struct * > StructSet;

StructVec

typedef std::vector < Struct * > StructVec;

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 virtual

~Struct();

Destroys the Struct.

Member Functions

addBase

void addBase(
    const std::string & param6,
    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 inline

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 inline

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 inline

bool isClass() const;

Returns true if and only if the struct was declared as class.

isDerived inline

bool isDerived() const;

Returns true if and only if the struct or class is derived from another struct or class.

isFinal inline

bool isFinal() const;

Returns true if the class is final.

isInline inline

bool isInline() const;

Returns true if the complete class is inlined in a cpp file.

kind

Symbol::Kind kind() const;

makeFinal inline

void makeFinal();

Makes the class final.

makeInline inline

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 virtual

std::string toString() const;