LinkedList

GC-free single linked list implementation.

Members

Aliases

append
alias append = insertBack
Undocumented in source.
insertBeginning
alias insertBeginning = insertFront
Undocumented in source.
removeBeginning
alias removeBeginning = removeFront
Undocumented in source.
search
alias search = find
Undocumented in source.

Functions

appendList
void appendList(LinkedList!(T) list)

Append other list. Note: Appended list should not be freed. It becomes part of this list.

byElement
auto byElement()
Undocumented in source. Be warned that the author may not have intended to support it.
find
LinkedListElement!(T)* find(T v)

Search for element with value v.

free
void free()

Remove all elements and free used memory.

insertAfter
LinkedListElement!(T)* insertAfter(LinkedListElement!(T)* element, T v)

Insert value v after element.

insertBack
LinkedListElement!(T)* insertBack(T v)

Appen value v to the end.

insertFront
LinkedListElement!(T)* insertFront(T v)

Insert value v at the beginning.

opApply
int opApply(int delegate(size_t, ref T) dg)

Iterating over list via foreach.

opApply
int opApply(int delegate(ref T) dg)

Iterating over list via foreach.

opCatAssign
auto opCatAssign(T v)
Undocumented in source. Be warned that the author may not have intended to support it.
removeAfter
void removeAfter(LinkedListElement!(T)* element)

Remove value after element. Note: element must be not null.

removeFront
void removeFront()

Remove the first element. Note: list must be non-empty.

toArray
T[] toArray()

Convert to array.

Properties

empty
bool empty [@property getter]

Check if list has no elements.

Variables

head
LinkedListElement!(T)* head;

Head of the list.

length
size_t length;

Number of elements in the list.

tail
LinkedListElement!(T)* tail;

Tail of the list.

Meta