LinkedList<T> Class

A doubly linked list of elements.

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

Model of BidirectionalContainer , FrontInsertionSequence , BackInsertionSequence and InsertionSequence .

Template Parameters

T

Constraint

T  is  Regular

Constructors & Destructor

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

Member Functions

public void Add(const T& value)
public inline const T& Back() const
public inline nothrow LinkedListNodeIterator<T, T&, T*> Begin()
public inline nothrow LinkedListNodeIterator<T, const T&, const T*> Begin() const
public inline nothrow LinkedListNodeIterator<T, const T&, const T*> CBegin() const
public inline nothrow LinkedListNodeIterator<T, const T&, const T*> CEnd() const
public nothrow void Clear()
private void CopyFrom(const LinkedList& that)
public inline nothrow long Count() const
public inline nothrow LinkedListNodeIterator<T, T&, T*> End()
public inline nothrow LinkedListNodeIterator<T, const T&, const T*> End() const
public inline const T& Front() const
public LinkedListNodeIterator<T, T&, T*> Insert(LinkedListNodeIterator<T, T&, T*> pos, const T& value)
public LinkedListNodeIterator<T, T&, T*> InsertFront(const T& value)
public inline nothrow bool IsEmpty() const
public LinkedListNodeIterator<T, T&, T*> Remove(LinkedListNodeIterator<T, T&, T*> pos)
public nothrow void Remove(const T& value)
public void RemoveFirst()
public void RemoveLast()
public inline nothrow LinkedListNode<T>* Tail()
public void operator=(LinkedList&& that)
public void operator=(const LinkedList& that)

Typedefs

public typedef ConstIterator LinkedListNodeIterator<T, const T&, const T*>
public typedef Iterator LinkedListNodeIterator<T, T&, T*>
public typedef ValueType T

Member Variables

private long count
private LinkedListNode<T>* head
private LinkedListNode<T>* tail

Constructor& Destructor Details

LinkedList Constructor

public nothrow LinkedList()

Definition
Line 120 of System.Base/LinkedList.cm


LinkedList Constructor

public nothrow LinkedList(LinkedList&& that)

Definition
Line 127 of System.Base/LinkedList.cm


LinkedList Constructor

public LinkedList(const LinkedList& that)

Definition
Line 123 of System.Base/LinkedList.cm


~LinkedList Destructor

public ~LinkedList()

Definition
Line 144 of System.Base/LinkedList.cm


Member Function Details

Add Member Function

public void Add(const T& value)

Definition
Line 233 of System.Base/LinkedList.cm


Back Member Function

public inline const T& Back()

Definition
Line 341 of System.Base/LinkedList.cm


Begin Member Function

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

Definition
Line 148 of System.Base/LinkedList.cm


Begin Member Function

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

Definition
Line 152 of System.Base/LinkedList.cm


CBegin Member Function

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

Definition
Line 156 of System.Base/LinkedList.cm


CEnd Member Function

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

Definition
Line 168 of System.Base/LinkedList.cm


Clear Member Function

public nothrow void Clear()

Definition
Line 180 of System.Base/LinkedList.cm


CopyFrom Member Function

private void CopyFrom(const LinkedList& that)

Definition
Line 353 of System.Base/LinkedList.cm


Count Member Function

public inline nothrow long Count()

Definition
Line 172 of System.Base/LinkedList.cm


End Member Function

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

Definition
Line 160 of System.Base/LinkedList.cm


End Member Function

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

Definition
Line 164 of System.Base/LinkedList.cm


Front Member Function

public inline const T& Front()

Definition
Line 333 of System.Base/LinkedList.cm


Insert Member Function

public LinkedListNodeIterator<T, T&, T*> Insert(LinkedListNodeIterator<T, T&, T*> pos, const T& value)

Definition
Line 208 of System.Base/LinkedList.cm


InsertFront Member Function

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

Definition
Line 193 of System.Base/LinkedList.cm


IsEmpty Member Function

public inline nothrow bool IsEmpty()

Definition
Line 176 of System.Base/LinkedList.cm


Remove Member Function

public LinkedListNodeIterator<T, T&, T*> Remove(LinkedListNodeIterator<T, T&, T*> pos)

Definition
Line 285 of System.Base/LinkedList.cm


Remove Member Function

public nothrow void Remove(const T& value)

Definition
Line 315 of System.Base/LinkedList.cm


RemoveFirst Member Function

public void RemoveFirst()

Definition
Line 247 of System.Base/LinkedList.cm


RemoveLast Member Function

public void RemoveLast()

Definition
Line 266 of System.Base/LinkedList.cm


Tail Member Function

public inline nothrow LinkedListNode<T>* Tail()

Definition
Line 349 of System.Base/LinkedList.cm


operator= Member Function

public void operator=(LinkedList&& that)

Definition
Line 138 of System.Base/LinkedList.cm


operator= Member Function

public void operator=(const LinkedList& that)

Definition
Line 133 of System.Base/LinkedList.cm