FixedKeyMap

Fixed key map class template.

Constructors

this
this(const(K[]) keys)

Constructor. The passed list of allowed keys is shallow copied into the keys class member.

Members

Aliases

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

Support for the 'in' operator

Classes

FixedKeyMapException
class FixedKeyMapException

Exception instance

Functions

length
size_t length()
opApply
int opApply(int delegate(ref K) dg)

foreach operator over keys in the map.

opApply
int opApply(int delegate(ref K, ref V) dg)

foreach operator over keys and values in the map.

opApply
int opApply(int delegate(ref size_t, ref K, ref V) dg)

foreach operator over keys, values and indices in the map.

opIn_r
V* opIn_r(const(K) key)

Checks whether a key is in the map, and returns a pointer to the corresponding value, or null if the key does not exist.

opIndex
V opIndex(const(K) key)

Gets a value for a key.

opIndexAssign
void opIndexAssign(V value, const(K) key)

Sets a value for a key.

Parameters

K

mapping key type

V

mapping value type

Meta