EnumIndexedArray

Encapsulates an array of T and uses the rank of the enum members E to perform the actions usually done with integer indexes.

Members

Functions

array
const(arrayT) array()

Returns a reference to the the internal container.

length
size_t length()

Returns the length of the internal container.

length
void length(size_t aValue)

Sets the array length using a standard integer value. Unless bounds checking is turned off, the parameter is dynamically checked according to E highest rank.

length
void length(E aMember)

Sets the array length according to the value following aMember rank.

opDollar
size_t opDollar()

Returns the length of the internal container.

opIndex
T opIndex(E aMember)

Returns the value of the slot indexed by aMember rank.

opIndexAssign
void opIndexAssign(T aValue, E aMember)

Sets the slot indexed by aMember rank to aValue.

opSlice
T[] opSlice(E loMember, E hiMember)

Returns a T slice using loMember and hiMember ranks to define the range.

Meta