EnumDeclaration

extern (C++) final
class EnumDeclaration : ScopeDsymbol {
Type type;
Type memtype;
Visibility visibility;
Expression maxval;
Expression minval;
Expression defaultval;
bool isdeprecated;
bool added;
int inuse;
Symbol* sinit;
}

Members

Functions

getMaxMinValue
Expression getMaxMinValue(Loc loc, Identifier id)

Get the value of the .max/.min property as an Expression. Lazily computes the value and caches it in maxval/minval. Reports any errors.

isSpecial
bool isSpecial()

Determine if enum is a special one.

Inherited Members

From ScopeDsymbol

search
Dsymbol search(Loc loc, Identifier ident, int flags)

This function is #1 on the list of functions that eat cpu time. Be very, very careful about slowing it down.

findGetMembers
FuncDeclaration findGetMembers()

Look for member of the form: const(MemberInfo)[] getMembers(string); Returns NULL if not found

symtabLookup
Dsymbol symtabLookup(Dsymbol s, Identifier id)

Look up identifier in symbol table.

hasStaticCtorOrDtor
bool hasStaticCtorOrDtor()

Return true if any of the members are static ctors or static dtors, or if any members have members that are.

_foreach
int _foreach(Scope* sc, Dsymbols* members, ForeachDg dg, size_t* pn)

Expands attribute declarations in members in depth first order. Calls dg(size_t symidx, Dsymbol *sym) for each member. If dg returns !=0, stops and returns that value else returns 0. Use this function to avoid the O(N + N^2/2) complexity of calculating dim and calling N times getNth.

Suggestion Box / Bug Report