Poco::CppParser

class Enum

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, begin, end, flags, kind, processName, toString

Inherited 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

Types

Iterator

typedef Values::const_iterator Iterator;

Values

typedef std::vector < EnumValue * > Values;

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.

Destructor

~Enum virtual

~Enum();

Destroys the Enum.

Member Functions

addValue

void addValue(
    EnumValue * pValue
);

Adds an enum value. The Enum takes ownership of the value.

begin

Iterator begin() const;

Returns an iterator for iterating over the Enum's EnumValue's.

end

Iterator end() const;

Returns an iterator for iterating over the Enum's EnumValue's.

flags inline

int flags() const;

kind

Symbol::Kind kind() const;

toString virtual

std::string toString() const;

processName protected static

static std::string processName(
    const std::string & name
);