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

byKey
auto byKey()

Fetch a forward range on all keys.

byKeyValue
auto byKeyValue()
Undocumented in source. Be warned that the author may not have intended to support it.
byKeyValue
auto byKeyValue()

Fetch a forward range on all keys.

byValue
auto 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