Inner.IndexMixin

Sequenced index implementation

Requirements: the following symbols must be defined in the scope in which this index is mixed in:

ThisNode, Value, __InsertAllBut!N, __InsertAll, __Replace, __RemoveAllBut!N, node_count

Members

Aliases

ConstSeqRange
alias ConstSeqRange = Range_0!true
Undocumented in source.
SeqRange
alias SeqRange = Range_0!false
Undocumented in source.
_Insert
alias _Insert = _insertBack
Undocumented in source.
insert
alias insert = insertBack

Forwards to insertBack

removeAny
alias removeAny = removeBack

Forwards to removeBack

Functions

_Check
void _Check()
Undocumented in source. Be warned that the author may not have intended to support it.
_ClearIndex
void _ClearIndex()
Undocumented in source. Be warned that the author may not have intended to support it.
_NodeReplace
void _NodeReplace(ThisNode* old, ThisNode* newnode)
Undocumented in source. Be warned that the author may not have intended to support it.
_Remove
void _Remove(ThisNode* n)
Undocumented in source. Be warned that the author may not have intended to support it.
_insertBack
bool _insertBack(ThisNode* node)
Undocumented in source.
_insertFront
bool _insertFront(ThisNode* node)
Undocumented in source. Be warned that the author may not have intended to support it.
_removeFront
ThisNode* _removeFront()
Undocumented in source. Be warned that the author may not have intended to support it.
clear
void clear()
Undocumented in source. Be warned that the author may not have intended to support it.
insertBack
size_t insertBack(SomeRange stuff)

Inserts every element of stuff not rejected by another index into the back of the index.

insertBack
size_t insertBack(SomeValue value)

Inserts value into the back of the sequence, if no other index rejects value

insertFront
size_t insertFront(SomeRange stuff)

Inserts every element of stuff not rejected by another index into the front of the index.

insertFront
size_t insertFront(SomeValue value)

Inserts value into the front of the sequence, if no other index rejects value

modify
void modify(SomeRange r, Modifier mod)
Undocumented in source. Be warned that the author may not have intended to support it.
opSlice
SeqRange opSlice()

Fetch a range that spans all the elements in the container.

opSlice
ConstSeqRange opSlice()
Undocumented in source. Be warned that the author may not have intended to support it.
relocateBack
void relocateBack(PosRange moveme, PosRange tohere)

Moves moveme.back to the position after tohere.back and dec both ranges. Probably not safe to use either range afterwards, but who knows. Preconditions: moveme and tohere are both ranges of the same container Postconditions: moveme.back is decremented Complexity: O(1)

relocateFront
void relocateFront(PosRange moveme, PosRange tohere)

Moves moveme.front to the position before tohere.front and inc both ranges. Probably not safe to use either range afterwards, but who knows. Preconditions: moveme and tohere are both ranges of the same container. Postconditions: moveme.front is incremented Complexity: O(1)

remove
SeqRange remove(R r)

Removes the values of r from the container. Preconditions: r came from this index Complexity: O(n r * d(n)),
O(n r) for this index

removeBack
void removeBack()

Removes the value at the back of the index from the container. Precondition: !empty Complexity: O(d(n));
O(1) for this index

removeFront
void removeFront()

Removes the value at the front of the index from the container. Precondition: !empty Complexity: O(d(n)); O(1) for this index

replace
bool replace(Position!ThisNode r, Value value)

Replaces r.front with value

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

Properties

back
back [@property getter]

Complexity: O(1)

back
Value back [@property setter]

Complexity: O(r(n))

empty
bool empty [@property getter]

Property returning true if and only if the container has no elements.

front
front [@property getter]

Complexity: O(1)

front
Value front [@property setter]

Complexity: O(r(n));
O(1) for this index

length
size_t length [@property getter]

Returns the number of elements in the container.

Templates

IsMyRange
template IsMyRange(T)
_back
ThisNode* _back;
Undocumented in source.

Variables

_front
ThisNode* _front;
Undocumented in source.

Meta