Library: CppParser
Package: SymbolTable
Header: Poco/CppParser/Function.h
This class represents a (member) function declaration.
Direct Base Classes: Decl
All Base Classes: Decl, Symbol
Member Functions: addParameter, begin, countParameters, end, flags, getOverridden, getReturnParameter, isConst, isConstructor, isDestructor, isFunction, isMethod, isVirtual, kind, makeConst, makeInline, makePureVirtual, signature, toString
Inherited Functions: addDocumentation, attrs, declaration, extractName, fullName, getAccess, getAttributes, getDocumentation, getFile, getLibrary, getLineNumber, getPackage, hasAttr, id, isIdent, isPrivate, isProtected, isPublic, kind, name, nameSpace, setAccess, setAttributes, setDocumentation, setFile, setLibrary, setLineNumber, setPackage, toString
typedef Parameters::const_iterator Iterator;
typedef std::vector < Parameter * > Parameters;
FN_STATIC = 1
The function is static.
FN_VIRTUAL = 2
The function is virtual.
FN_INLINE = 4
The function is inline.
FN_CONST = 8
The function is const.
FN_TEMPLATE = 16
The function is a template.
FN_PURE_VIRTUAL = 32
The function is pure virtual.
Function(
const std::string & decl,
NameSpace * pNameSpace
);
Creates the Function.
~Function();
Destroys the Function.
void addParameter(
Parameter * pParam
);
Adds a parameter to the function.
Iterator begin() const;
int countParameters() const;
Returns the number of parameters.
Iterator end() const;
int flags() const;
Returns the function's flags.
Function * getOverridden() const;
If the function is virtual and overrides a function in a base class, the base class function is returned. Otherwise, null is returned.
const std::string & getReturnParameter() const;
bool isConst() const;
Returns true if and only if the method is const.
bool isConstructor() const;
Returns true if and only if the function is a constructor.
bool isDestructor() const;
Returns true if and only if the function is a destructor.
bool isFunction() const;
Returns true if and only if the function is not a member of a class (a freestanding function).
bool isMethod() const;
Returns true if and only if the function is a method (it's part of a Struct and it's neither a constructor nor a destructor).
bool isVirtual() const;
Returns true if the method is virtual. Also examines base classes to check for a virtual function with the same signature.
Symbol::Kind kind() const;
void makeConst();
Sets the FN_CONST flag.
void makeInline();
Sets the FN_INLINE flag.
void makePureVirtual();
Sets the FN_PURE_VIRTUAL flag.
std::string signature() const;
Returns the signature of the function.
std::string toString() const;
See also: Poco::CppParser::Decl::toString()