File Information
Library: CppParser
Package: SymbolTable
Header: Poco/CppParser/Parameter.h
Description
This class represents a parameter to a function.
Inheritance
Direct Base Classes: Decl
Member Summary
Member Functions: declType, defaultDecl, defaultValue, hasDefaultValue, isConst, isPointer, isReference, kind, vectorType
Inherited Functions: addDocumentation, attrs, declaration, extractName, fullName, getAccess, getAttributeList, getAttributes, getDocumentation, getFile, getLibrary, getLineNumber, getOrder, getPackage, hasAttr, id, isIdent, isPrivate, isProtected, isPublic, kind, name, nameSpace, setAccess, setAttributeList, setAttributes, setDocumentation, setFile, setLibrary, setLineNumber, setOrder, setPackage, toString
Constructors
Parameter
Parameter(
const std::string & decl,
Function * pFunction
);
Creates the Parameter.
Destructor
~Parameter
~Parameter();
Destroys the Parameter.
Member Functions
declType
const std::string & declType() const;
Returns the type of the parameter without const and & if present.
Example: a type const std::string& -> std::string, a type const std::string* returns std::string
defaultDecl
const std::string & defaultDecl() const;
If hasDefaultValue() returns true, this method returns the default value declaration.
Example: for const std::string& data = std::string("default") it will return std::string("default").
defaultValue
const std::string & defaultValue() const;
If hasDefaultValue() returns true, this method returns the default value, i.e. all data found between the opening and closing bracket of the init string.
Example: for const std::string& data = std::string("default") it will return "default", for = std::string() it will return a zero length string, for = ComplexClass(13,12, "test", 0); it will return 13,12, "test", 0.
hasDefaultValue
bool hasDefaultValue() const;
Returns true if a defaultvalue was set at this parameter, Example: const std::string& data = std::string("default").
isConst
bool isConst() const;
Returns true iff the parameter is const.
isPointer
bool isPointer() const;
Returns true iff the parameter is a pointer.
isReference
bool isReference() const;
Returns true iff the parameter is a reference.
kind
Symbol::Kind kind() const;
vectorType
static bool vectorType(
const std::string & type,
NameSpace * pNS
);