FlatMap.FlatMap

Undocumented in source.
template FlatMap(_Key, _Value, size_t N = 0, _Allocator = DefaultAllocator, bool _supportGC = (shouldAddGCRange!_Key || shouldAddGCRange!_Value))
struct FlatMap {}

Constructors

this
this(Rhs rhs)

Constructs a FlatMap object from other flat map.

this
this(Rhs rhs, Forward wf)

Forward constructor.

this
this(From rhs)

Copy constructors

this
this(From rhs)
Undocumented in source.
this
this(From rhs)
Undocumented in source.
this
this(From rhs)
Undocumented in source.
this
this(From rhs)
Undocumented in source.
this
this(From rhs)
Undocumented in source.
this
this(From rhs)
Undocumented in source.
this
this(From rhs)
Undocumented in source.
this
this(From rhs)
Undocumented in source.
this
this(From rhs)
Undocumented in source.

Members

Aliases

AllocatorType
alias AllocatorType = Storage.AllocatorType

Type of the allocator object used to define the storage allocation model. By default DefaultAllocator is used.

ElementReferenceType
alias ElementReferenceType = Storage.ElementReferenceType

Type of reference to elements.

ElementType
alias ElementType = Storage.ElementType

Type of elements (pair of key and value).

KeyType
alias KeyType = _Key

Type of key.

ValueType
alias ValueType = _Value

Type of value.

VectorType
alias VectorType = Storage

Type of internal vector.

allowHeap
alias allowHeap = Storage.allowHeap

Allow heap (false only if Allcoator is void)

hasStatelessAllocator
alias hasStatelessAllocator = Storage.hasStatelessAllocator

True if allocator doesn't have state.

maximalCapacity
alias maximalCapacity = Storage.maximalCapacity

Maximal capacity of container, in terms of number of elements.

minimalCapacity
alias minimalCapacity = Storage.minimalCapacity

Minimal capacity of container, in terms of number of elements.

supportGC
alias supportGC = Storage.supportGC

Functions

at
CopyConstness!(This, ValueType)* at(K key)

Returns pointer elements value with specified key or null if container doesn't contains key.

atCopy
CopyConstness!(This, ValueType) atCopy(K key)

Returns copy of element value with specified key or ValueType.init if container doesn't contains key.

clear
void clear()

Erases the contents of the container, which becomes an empty (with a length of 0 elements).

heapSwap
bool heapSwap(typeof(this) rhs)

Swaps the contents of this and rhs only if both are heap allocated.

opAssign
void opAssign(Rhs rhs)

Assigns a new value rhs to the flat map, replacing its current contents.

opBinaryRight
bool opBinaryRight(K key)

Operator in

opCmp
int opCmp(R rhs)
int opCmp(V rhs)
int opCmp(FM rhs)

Compares the contents of a vector with another vector or range.

opDollar
size_t opDollar()

Returns the length of the container, in terms of number of elements.

opEquals
bool opEquals(R rhs)
bool opEquals(V rhs)
bool opEquals(FM rhs)

Compares the contents of a container with another container, range or null.

opIndex
ValueType opIndex(K key)

Returns reference of element value with specified key.

opIndex
CopyConstness!(This, .Pair!(const KeyType, ValueType))[] opIndex()
opIndexAssign
void opIndexAssign(V value, K key)
proxySwap
void proxySwap(typeof(this) rhs)

Swaps the contents of this and rhs.

release
void release()

Erases and deallocate the contents of the container, which becomes an empty (with a length of 0 elements).

remove
bool remove(ValueType* val)
remove
bool remove(K key)
remove
void remove(size_t index)
reserve
void reserve(size_t n)

Requests that the container capacity be adapted to a planned change in size to a length of up to n elements.

shrinkToFit
void shrinkToFit(bool reallocate)

Requests the Vector to reduce its capacity to fit its length.

Properties

allocator
auto allocator [@property getter]

Returns copy of allocator.

capacity
size_t capacity [@property getter]

Returns the size of the storage space currently allocated for the container.

empty
bool empty [@property getter]

Returns whether the falt map is empty (i.e. whether its length is 0).

length
size_t length [@property getter]

Returns the length of the flat map, in terms of number of elements.

Meta