Poco::CppParser

class Enum

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 virtual

~Enum();

Destroys the Enum.

Member Functions

addValue

void addValue(
    EnumValue * pValue
);

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

baseType inline

const std::string & baseType() const;

Returns the base type or an empty string if no base type has been specified.

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;

Returns the flags.

kind

Symbol::Kind kind() const;

toString virtual

std::string toString() const;

processName protected static

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

Securely control IoT edge devices from anywhere   Connect a Device