Enum1

Unit test.

Tests: * All IEnum interface methods. * Enum class inheritance.

version(unittest)
class Enum1 : IEnum {}

Members

Mixins

__anonymous
mixin EnumBase!(["a"[]:1, "b":2, "c":3])
Undocumented in source.

Inherited Members

From IEnum

Name
alias Name = istring

Aliases for the types of an enum class' names & values.

Value
alias Value = int
Undocumented in source.
opIn_r
Name* opIn_r(Value v)

Looks up an enum member's name from its value.

opIn_r
Value* opIn_r(Name n)

Looks up an enum member's value from its name.

opBinaryRight
alias opBinaryRight(istring op : "in") = opIn_r

Support for the 'in' operator

opIndex
Name opIndex(Value v)

Looks up an enum member's name from its value, using opIndex.

opIndex
Value opIndex(Name n)

Looks up an enum member's value from its name, using opIndex.

length
size_t length()
min
Value min()
max
Value max()
opApply
int opApply(int delegate(ref const(Name) name, ref const(Value) value) dg)

foreach iteration over the names and values in the enum.

opApply
int opApply(int delegate(ref size_t i, ref const(Name) name, ref const(Value) value) dg)

foreach iteration over the names and values in the enum and their indices.

Meta