File Information
Library: CppParser
Package: SymbolTable
Header: Poco/CppParser/Enum.h
Description
This class represents an enum declaration.
An enumeration has an optional name and a collection of EnumValues.
Inheritance
Direct Base Classes: Symbol
All Base Classes: Symbol
Member Summary
Member Functions: addValue, baseType, begin, end, flags, kind, processName, toString
Inherited Functions: addDocumentation, attrs, 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
Types Aliases
Iterator
using Iterator = Values::const_iterator;
Values
using Values = std::vector < EnumValue * >;
Enumerations
Flags
ENUM_IS_CLASS = 0x01
Constructors
Enum
Enum(
const std::string & name,
NameSpace * pNameSpace,
int flags = 0
);
Creates the Enum.
If name is the empty string, an internal name in the form #AnonEnum<n> (where <n> is a unique integer) will be assigned.
Enum
Enum(
const std::string & name,
NameSpace * pNameSpace,
const std::string & baseType,
int flags = 0
);
Creates the Enum.
If name is the empty string, an internal name in the form #AnonEnum<n> (where <n> is a unique integer) will be assigned.
Destructor
~Enum
~Enum();
Destroys the Enum.
Member Functions
addValue
void addValue(
EnumValue * pValue
);
Adds an enum value. The Enum takes ownership of the value.
baseType
const std::string & baseType() const;
Returns the base type or an empty string if no base type has been specified.
begin
Iterator begin() const;
end
Iterator end() const;
flags
int flags() const;
Returns the flags.
kind
Symbol::Kind kind() const;
toString
std::string toString() const;
See also: Poco::CppParser::Symbol::toString()
processName
static std::string processName(
const std::string & name
);