List.List

Undocumented in source.
template List(_Type, _Allocator = DefaultAllocator, bool _supportGC = shouldAddGCRange!_Type, bool _bidirectional = true)
struct List {}

Constructors

this
this(AllocatorType a)

Constructs a empty List with allocator a.

this
this(typeof(null) nil, Forward )

Constructs a empty List

this
this(Rhs rhs)

Constructs a List object from other list.

this
this(Rhs rhs, Forward )

Forward constructor.

this
this(R range, Forward )
this(R range, AllocatorType allcoator)

Constructs a bidirectional List object from range of elements.

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.

Destructor

~this
~this()

Destroys the List object.

Members

Aliases

AllocatorType
alias AllocatorType = _Allocator

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

ConstIterator
alias ConstIterator = .ListRange!(const(ElementType), bidirectional)

Const iterator for list.

ElementReferenceType
alias ElementReferenceType = ElementReferenceTypeImpl!_Type

Type of reference to elements.

ElementType
alias ElementType = _Type

Type of elements.

Iterator
alias Iterator = .ListRange!(ElementType, bidirectional)

Iterator for list.

_allocator
alias _allocator = statelessAllcoator!AllocatorType
Undocumented in source.
append
alias append = pushBack

Alias to pushBack

bidirectional
alias bidirectional = _bidirectional
clear
alias clear = release

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

hasStatelessAllocator
alias hasStatelessAllocator = _hasStatelessAllocator

True if allocator doesn't have state.

prepend
alias prepend = pushFront

Alias to pushFront

put
alias put = pushBack

Alias to pushBack

supportGC
alias supportGC = _supportGC

Functions

back
inout(ElementType) back()

Returns a reference to the last element in the list.

backCopy
auto backCopy()

Returns a copy of the first element in the list.

contains
bool contains(Elm elm)

Same as operator in

emplaceBack
void emplaceBack(Args args)

Appends a new element to the end of the bidirectional list. The element is constructed through emplace.

emplaceFront
void emplaceFront(Args args)

Appends a new element to the begin of the list. The element is constructed through emplace.

front
inout(ElementType) front()

Returns a reference to the first element in the list.

frontCopy
auto frontCopy()

Returns a copy of the first element in the list.

moveBack
ElementType moveBack()

Move of the first element in the list and return it.

moveFront
ElementType moveFront()

Move of the first element in the list and return it.

opAssign
void opAssign(typeof(null) rhs)
void opAssign(R range)
void opAssign(Rhs rhs)

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

opBinaryRight
bool opBinaryRight(Elm elm)

Operator in

opCmp
int opCmp(R rhs)
int opCmp(L rhs)

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

opDollar
size_t opDollar()

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

opEquals
bool opEquals(typeof(null) nil)
bool opEquals(R rhs)
bool opEquals(L rhs)

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

opIndex
auto opIndex()

Return slice of all elements.

popBack
auto popBack()
auto popBack(ElementType def)

Pop the last element of the bidirectional list, effectively reducing its length by 1.

popFront
auto popFront()
ElementType popFront(ElementType def)

Pop the last element of the bidirectional list, effectively reducing its length by 1.

proxySwap
void proxySwap(typeof(this) rhs)

Swaps the contents of this and rhs.

pushBack
size_t pushBack(R range)
size_t pushBack(L list)
size_t pushBack(Val val)
size_t pushBack(Val val, size_t count)

Extends the List by appending additional elements at the end of list.

pushFront
size_t pushFront(R range)
size_t pushFront(L list)
size_t pushFront(Val val)
size_t pushFront(Val val, size_t count)

Extends the List by appending additional elements at the end of list.

release
void release()

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

Properties

allocator
CopyTypeQualifiers!(This, AllocatorType) allocator [@property getter]

Returns copy of allocator.

begin
auto begin [@property getter]
cbegin
ConstIterator cbegin [@property getter]
empty
bool empty [@property getter]

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

length
size_t length [@property getter]

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

Static functions

build
typeof(this) build(Args args)
typeof(this) build(AllocatorType allocator, Args args)

Static function which return List construct from arguments args.

Templates

opOpAssign
template opOpAssign(string op)

Operator ~= is same as append/pushBack

Variables

_allocator
AllocatorType _allocator;
Undocumented in source.
end
enum typeof(null) end;

Meta