Library: CppParser
Package: SymbolTable
Header: Poco/CppParser/Parameter.h
This class represents a parameter to a function.
Direct Base Classes: Decl
All Base Classes: Decl, Symbol
Member Functions: declType, defaultDecl, defaultValue, hasDefaultValue, isConst, isPointer, isReference, kind, vectorType
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
Parameter(
const std::string & decl,
Function * pFunction
);
Creates the Parameter.
~Parameter();
Destroys the Parameter.
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
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").
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.
bool hasDefaultValue() const;
Returns true if a defaultvalue was set at this parameter, Example: const std::string& data = std::string("default").
bool isConst() const;
Returns true if and only if the parameter is const.
bool isPointer() const;
Returns true if and only if the parameter is a pointer.
bool isReference() const;
Returns true if and only if the parameter is a reference.
Symbol::Kind kind() const;
static bool vectorType(
const std::string & type,
NameSpace * pNS
);