util.multi_index

Members

Classes

MultiIndexContainer
class MultiIndexContainer(Value, Args...)

The container. Don't call any index methods from this container directly; use a reference to an individual index, which can be obtained via

Enums

Color
enum Color

Enumeration determining what color the node is. Null nodes are assumed to be black.

Mixin templates

OrderedIndex
mixin template OrderedIndex(size_t N, bool allowDuplicates, alias KeyFromValue, alias Compare, ThisContainer)

ordered index implementation

OrderedNodeMixin
mixin template OrderedNodeMixin(size_t N)

ordered node implementation

Slots
mixin template Slots()

simple Slot implementation

Structs

GCAllocator
struct GCAllocator

TODO: random access index insertAfter ? insertBefore ? fix BitHackery make MutableView a per index thing? modify(r, mod, rollback) contain const/immutable value types other indices? dup make reserve perform reserve on all appropriate indices? ensure MultiIndexContainer is strongly exception safe.

MNode
struct MNode(_ThisContainer, IndexedBy, Allocator, Signals, Value, ValueView)

A multi_index node. Holds the value of a single element, plus per-node headers of each index, if any. The headers are all mixed in in the same scope. To prevent naming conflicts, a header field must be accessed with the number of its index.

ValueChangedSlots
struct ValueChangedSlots(L...)

Specifies how to hook up value signals to indices.

ValueSignal
struct ValueSignal(size_t index, string mixinAlias = "")

_

ValueSignal
struct ValueSignal(string tag, string mixinAlias = "")

_

Templates

Hashed
template Hashed(bool allowDuplicates = false, alias KeyFromValue = "a", alias Hash = "typeid(a).getHash(&a)", alias Eq = "a==b")

a hash table index KeyFromValue(value) = key of type KeyType Hash(key) = hash of type size_t Eq(key1, key2) determines equality of key1, key2

HashedNonUnique
template HashedNonUnique(alias KeyFromValue = "a", alias Hash = "typeid(a).getHash(&a)", alias Eq = "a==b")

_

HashedUnique
template HashedUnique(alias KeyFromValue = "a", alias Hash = "typeid(a).getHash(&a)", alias Eq = "a==b")

_

Heap
template Heap(alias KeyFromValue = "a", alias Compare = "a<b")

a max heap index

Ordered
template Ordered(bool allowDuplicates = false, alias KeyFromValue = "a", alias Compare = "a<b")

A red black tree index

OrderedNonUnique
template OrderedNonUnique(alias KeyFromValue = "a", alias Compare = "a<b")

A red black tree index

OrderedUnique
template OrderedUnique(alias KeyFromValue = "a", alias Compare = "a<b")

A red black tree index

RandomAccess
template RandomAccess()

A random access index.

Sequenced
template Sequenced()

A doubly linked list index.

Meta