ForwardList<T> Class

A singly linked list of elements.

Inserting an element to the forward list in a known position is O(1) operation. Searching for an element in a forward list is O(n) operation.

Model of ForwardContainer and FrontInsertionSequence .

Template Parameters

T

Constraint

T  is  Regular

Constructors & Destructor

public nothrow ForwardList()
public nothrow ForwardList(ForwardList&& that)
public ForwardList(const ForwardList& that)
public ~ForwardList()

Member Functions

public inline nothrow ForwardListNodeIterator<T, T&, T*> Begin()
public inline nothrow ForwardListNodeIterator<T, const T&, const T*> Begin() const
public inline nothrow ForwardListNodeIterator<T, const T&, const T*> CBegin() const
public inline nothrow ForwardListNodeIterator<T, const T&, const T*> CEnd() const
public nothrow void Clear()
private void CopyFrom(const ForwardList& that)
public nothrow long Count() const
public inline nothrow ForwardListNodeIterator<T, T&, T*> End()
public inline nothrow ForwardListNodeIterator<T, const T&, const T*> End() const
public inline const T& Front() const
public ForwardListNodeIterator<T, T&, T*> InsertAfter(ForwardListNodeIterator<T, T&, T*> pos, const T& value)
public inline ForwardListNodeIterator<T, T&, T*> InsertFront(const T& value)
public inline nothrow bool IsEmpty() const
public void Remove(const T& value)
public void RemoveAfter(ForwardListNodeIterator<T, T&, T*> pos)
public void RemoveFront()
public nothrow void operator=(ForwardList&& that)
public void operator=(const ForwardList& that)

Typedefs

public typedef ConstIterator ForwardListNodeIterator<T, const T&, const T*>
public typedef Iterator ForwardListNodeIterator<T, T&, T*>
private typedef NodePtr ForwardListNode<T>*
private typedef NodeType ForwardListNode<T>
private typedef Self ForwardList
public typedef ValueType T

Member Variables

private ForwardListNode<T>* head

Constructor& Destructor Details

ForwardList Constructor

public nothrow ForwardList()

Definition
Line 100 of System.Base/ForwardList.cm


ForwardList Constructor

public nothrow ForwardList(ForwardList&& that)

Definition
Line 111 of System.Base/ForwardList.cm


ForwardList Constructor

public ForwardList(const ForwardList& that)

Definition
Line 107 of System.Base/ForwardList.cm


~ForwardList Destructor

public ~ForwardList()

Definition
Line 103 of System.Base/ForwardList.cm


Member Function Details

Begin Member Function

public inline nothrow ForwardListNodeIterator<T, T&, T*> Begin()

Definition
Line 149 of System.Base/ForwardList.cm


Begin Member Function

public inline nothrow ForwardListNodeIterator<T, const T&, const T*> Begin()

Definition
Line 157 of System.Base/ForwardList.cm


CBegin Member Function

public inline nothrow ForwardListNodeIterator<T, const T&, const T*> CBegin()

Definition
Line 165 of System.Base/ForwardList.cm


CEnd Member Function

public inline nothrow ForwardListNodeIterator<T, const T&, const T*> CEnd()

Definition
Line 169 of System.Base/ForwardList.cm


Clear Member Function

public nothrow void Clear()

Definition
Line 140 of System.Base/ForwardList.cm


CopyFrom Member Function

private void CopyFrom(const ForwardList& that)

Definition
Line 253 of System.Base/ForwardList.cm


Count Member Function

public nothrow long Count()

Definition
Line 129 of System.Base/ForwardList.cm


End Member Function

public inline nothrow ForwardListNodeIterator<T, T&, T*> End()

Definition
Line 153 of System.Base/ForwardList.cm


End Member Function

public inline nothrow ForwardListNodeIterator<T, const T&, const T*> End()

Definition
Line 161 of System.Base/ForwardList.cm


Front Member Function

public inline const T& Front()

Definition
Line 173 of System.Base/ForwardList.cm


InsertAfter Member Function

public ForwardListNodeIterator<T, T&, T*> InsertAfter(ForwardListNodeIterator<T, T&, T*> pos, const T& value)

Definition
Line 186 of System.Base/ForwardList.cm


InsertFront Member Function

public inline ForwardListNodeIterator<T, T&, T*> InsertFront(const T& value)

Definition
Line 181 of System.Base/ForwardList.cm


IsEmpty Member Function

public inline nothrow bool IsEmpty()

Definition
Line 125 of System.Base/ForwardList.cm


Remove Member Function

public void Remove(const T& value)

Definition
Line 221 of System.Base/ForwardList.cm


RemoveAfter Member Function

public void RemoveAfter(ForwardListNodeIterator<T, T&, T*> pos)

Definition
Line 206 of System.Base/ForwardList.cm


RemoveFront Member Function

public void RemoveFront()

Definition
Line 196 of System.Base/ForwardList.cm


operator= Member Function

public nothrow void operator=(ForwardList&& that)

Definition
Line 120 of System.Base/ForwardList.cm


operator= Member Function

public void operator=(const ForwardList& that)

Definition
Line 115 of System.Base/ForwardList.cm