Map

Tree-map, designed to replace std::map usage. The API should looks closely like the builtin associative arrays. O(lg(n)) insertion, removal, and search time. Map is designed to operate even without initialization through makeMap.

Constructors

this
this(int dummy)
Undocumented in source.

Destructor

~this
~this()
Undocumented in source.

Postblit

this(this)
this(this)
Undocumented in source.

Members

Aliases

opSlice
alias opSlice = byValue
Undocumented in source.

Functions

byGivenKey
Range!(MapRangeType.value) byGivenKey(K key)
ConstRange!(MapRangeType.value) byGivenKey(K key)
ImmutableRange!(MapRangeType.value) byGivenKey(K key)

Fetch a forward range on all elements with given key.

byKey
Range!(MapRangeType.key) byKey()
ConstRange!(MapRangeType.key) byKey()
ImmutableRange!(MapRangeType.key) byKey()

Fetch a forward range on all keys.

byKeyValue
Range!(MapRangeType.keyValue) byKeyValue()
ConstRange!(MapRangeType.keyValue) byKeyValue()
ImmutableRange!(MapRangeType.keyValue) byKeyValue()

Fetch a forward range on all keys.

byValue
Range!(MapRangeType.value) byValue()
ConstRange!(MapRangeType.value) byValue()
ImmutableRange!(MapRangeType.value) byValue()

Fetch a forward range on all values.

clearContents
void clearContents()

Removes all elements from the map.

contains
bool contains(K key)
empty
bool empty()
insert
bool insert(K key, V value)

Insert an element in the container, if the container doesn't already contain an element with equivalent key.

length
size_t length()
opBinaryRight
inout(V)* opBinaryRight(K key)
opIndex
inout(V) opIndex(K key)
opIndexAssign
void opIndexAssign(V value, K key)

Updates a value associated with a key, creates it if necessary.

remove
bool remove(K key)

Removes an element from the container.

Meta