Library: CppParser
Package: SymbolTable
Header: Poco/CppParser/Symbol.h
This is the base class for all symbols in the symbol table.
Every symbol has a unique ID (int) and a namespace (which may be null).
Known Derived Classes: BuiltIn, Enum, Decl, Function, EnumValue, NameSpace, Parameter, Struct, Variable, TypeDef
Member Functions: addDocumentation, attrs, 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
public access
protected access
private access
An enumeration
An enumeration value
A (member) function
A namespace
A function parameter
A struct or class
A typedef
A built-in type
A (member) variable
Symbol();
Creates the Symbol and assigns the symbol a unique ID.
Symbol(
const std::string & name,
NameSpace * pNameSpace = 0
);
Creates the Symbol and assigns the symbol a unique ID.
virtual ~Symbol();
Destroys the Symbol.
void addDocumentation(
const std::string & text
);
Adds text to the symbol's documentation.
const Attributes & attrs() const;
Returns the symbol's attributes.
Attributes & attrs();
Returns the symbol's attributes.
static std::string extractName(
const std::string & decl
);
Extracts the name from the declaration.
std::string fullName() const;
Returns the symbol's fully qualified name.
Access getAccess() const;
Returns the symbol's access.
const Attributes & getAttributes() const;
Returns the symbol's attributes.
const std::string & getDocumentation() const;
Returns the symbol's documentation.
const std::string & getFile() const;
Returns the file where the symbol is defined.
const std::string & getLibrary() const;
Returns the symbol's library.
int getLineNumber() const;
Returns the line number of the symbol's declaration.
const std::string & getPackage() const;
Returns the symbol's package.
int id() const;
Returns the symbol's unique ID.
bool isPrivate() const;
Returns true if and only if the symbol is public.
bool isProtected() const;
Returns true if and only if the symbol is public.
bool isPublic() const;
Returns true if and only if the symbol is public.
virtual Kind kind() const = 0;
Returns the symbol's kind.
const std::string & name() const;
Returns the symbol's (local) name.
NameSpace * nameSpace() const;
Returns the symbol's namespace which may be null.
void setAccess(
Access v
);
Sets the symbol's access.
void setAttributes(
const Attributes & attrs
);
Sets the symbol's attributes.
void setDocumentation(
const std::string & text
);
Sets the symbol's documentation.
void setFile(
const std::string & path
);
Sets the file where the symbol is declared.
void setLibrary(
const std::string & library
);
Sets the symbol's library.
void setLineNumber(
int line
);
Sets the line number of the symbol's declaration.
void setPackage(
const std::string & package
);
Sets the symbol's package.
virtual std::string toString() const = 0;
Returns a string representation of the symbol.
static bool hasAttr(
const std::string & decl,
const std::string & attr
);
static bool isIdent(
char c
);