System::Collections::Generic::LinkedList< T > Class Template Reference

LinkedList forward declaration. More...

#include "system/collections/linkedlist.h"

Public Member Functions

 LinkedList ()
 Creates empty LinkedList. More...
 
 LinkedList (const SharedPtr< IEnumerable< T >> &collection)
 
SharedPtr< IEnumerator< T > > GetEnumerator () override
 
virtual int get_Count () const override
 
SharedPtr< LinkedListNode< T > > get_First ()
 
SharedPtr< LinkedListNode< T > > get_Last ()
 
virtual void Add (const T &item) override
 
virtual void Clear () override
 Deletes all elements in list. More...
 
virtual bool Contains (const T &item) const override
 
virtual bool Remove (const T &item) override
 
void Remove (const SharedPtr< LinkedListNode< T >> &item)
 Removes node from list (not implemented). More...
 
void RemoveFirst ()
 Removes first node from list (not implemented). More...
 
void RemoveLast ()
 Removes last node from list (not implemented). More...
 
void AddAfter (const SharedPtr< LinkedListNode< T >> &, const SharedPtr< LinkedListNode< T >> &)
 Adds node after another one (not implemented). More...
 
SharedPtr< LinkedListNode< T > > AddAfter (const SharedPtr< LinkedListNode< T >> &, const T &item)
 Adds item after one (not implemented). More...
 
void AddBefore (const SharedPtr< LinkedListNode< T >> &, const SharedPtr< LinkedListNode< T >> &)
 Adds node before another one (not implemented). More...
 
SharedPtr< LinkedListNode< T > > AddBefore (const SharedPtr< LinkedListNode< T >> &, const T &item)
 Adds item before one (not implemented). More...
 
void AddFirst (const SharedPtr< LinkedListNode< T >> &item)
 
SharedPtr< LinkedListNode< T > > AddFirst (const T &item)
 
void AddLast (const SharedPtr< LinkedListNode< T >> &item)
 
SharedPtr< LinkedListNode< T > > AddLast (const T &item)
 
virtual void CopyTo (ArrayPtr< T > arr, int index) override
 Copies container data into existing array elements (not implemented). More...
 
void SetTemplateWeakPtr (unsigned int argument) override
 Makes list treat stored pointers as weak (not implemented). More...
 

Detailed Description

template<typename T>
class System::Collections::Generic::LinkedList< T >

LinkedList forward declaration.

Linked list container. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument.

Template Parameters
TContained value type.

Constructor & Destructor Documentation

◆ LinkedList() [1/2]

template<typename T >
System::Collections::Generic::LinkedList< T >::LinkedList ( )
inline

Creates empty LinkedList.

◆ LinkedList() [2/2]

template<typename T >
System::Collections::Generic::LinkedList< T >::LinkedList ( const SharedPtr< IEnumerable< T >> &  collection)
inline

Copy constructor.

Parameters
collectionCollection to copy data from.

Member Function Documentation

◆ Add()

template<typename T >
virtual void System::Collections::Generic::LinkedList< T >::Add ( const T &  item)
inlineoverridevirtual

Adds item into LinkedList end.

Parameters
itemItem to add into list.

◆ AddAfter() [1/2]

template<typename T >
void System::Collections::Generic::LinkedList< T >::AddAfter ( const SharedPtr< LinkedListNode< T >> &  ,
const SharedPtr< LinkedListNode< T >> &   
)
inline

Adds node after another one (not implemented).

◆ AddAfter() [2/2]

template<typename T >
SharedPtr<LinkedListNode<T> > System::Collections::Generic::LinkedList< T >::AddAfter ( const SharedPtr< LinkedListNode< T >> &  ,
const T &  item 
)
inline

Adds item after one (not implemented).

◆ AddBefore() [1/2]

template<typename T >
void System::Collections::Generic::LinkedList< T >::AddBefore ( const SharedPtr< LinkedListNode< T >> &  ,
const SharedPtr< LinkedListNode< T >> &   
)
inline

Adds node before another one (not implemented).

◆ AddBefore() [2/2]

template<typename T >
SharedPtr<LinkedListNode<T> > System::Collections::Generic::LinkedList< T >::AddBefore ( const SharedPtr< LinkedListNode< T >> &  ,
const T &  item 
)
inline

Adds item before one (not implemented).

◆ AddFirst() [1/2]

template<typename T >
void System::Collections::Generic::LinkedList< T >::AddFirst ( const SharedPtr< LinkedListNode< T >> &  item)
inline

Adds node to the beginning of list.

Parameters
itemItem to add.

◆ AddFirst() [2/2]

template<typename T >
SharedPtr<LinkedListNode<T> > System::Collections::Generic::LinkedList< T >::AddFirst ( const T &  item)
inline

Adds item to the beginning of list.

Parameters
itemItem to add.

◆ AddLast() [1/2]

template<typename T >
void System::Collections::Generic::LinkedList< T >::AddLast ( const SharedPtr< LinkedListNode< T >> &  item)
inline

Adds node to the beginning of list.

Parameters
itemItem to add.

◆ AddLast() [2/2]

template<typename T >
SharedPtr<LinkedListNode<T> > System::Collections::Generic::LinkedList< T >::AddLast ( const T &  item)
inline

Adds item to the beginning of list.

Parameters
itemItem to add.

◆ Clear()

template<typename T >
virtual void System::Collections::Generic::LinkedList< T >::Clear ( )
inlineoverridevirtual

Deletes all elements in list.

◆ Contains()

template<typename T >
virtual bool System::Collections::Generic::LinkedList< T >::Contains ( const T &  item) const
inlineoverridevirtual

Checks if element is present in list.

Parameters
itemItem to look for.
Returns
True if item is found, false otherwise.

◆ CopyTo()

template<typename T >
virtual void System::Collections::Generic::LinkedList< T >::CopyTo ( ArrayPtr< T >  arr,
int  index 
)
inlineoverridevirtual

Copies container data into existing array elements (not implemented).

◆ get_Count()

template<typename T >
virtual int System::Collections::Generic::LinkedList< T >::get_Count ( ) const
inlineoverridevirtual

Gets number of elements in list.

Returns
Actual number of elements in list.

◆ get_First()

template<typename T >
SharedPtr<LinkedListNode<T> > System::Collections::Generic::LinkedList< T >::get_First ( )
inline

Gets pointer to the first element in the list.

Returns
First element in the list.

◆ get_Last()

template<typename T >
SharedPtr<LinkedListNode<T> > System::Collections::Generic::LinkedList< T >::get_Last ( )
inline

Gets pointer to the last element in the list.

Returns
Last element in the list.

◆ GetEnumerator()

template<typename T >
SharedPtr<IEnumerator<T> > System::Collections::Generic::LinkedList< T >::GetEnumerator ( )
inlineoverride

Gets enumerator to iterate through current LinkedList.

Returns
Newly created enumerator object.

◆ Remove() [1/2]

template<typename T >
void System::Collections::Generic::LinkedList< T >::Remove ( const SharedPtr< LinkedListNode< T >> &  item)
inline

Removes node from list (not implemented).

◆ Remove() [2/2]

template<typename T >
virtual bool System::Collections::Generic::LinkedList< T >::Remove ( const T &  item)
inlineoverridevirtual

Removes first occurance of the specified item from list.

Parameters
itemItem to remove.
Returns
True if item was found and removed, false otherwise.

◆ RemoveFirst()

template<typename T >
void System::Collections::Generic::LinkedList< T >::RemoveFirst ( )
inline

Removes first node from list (not implemented).

◆ RemoveLast()

template<typename T >
void System::Collections::Generic::LinkedList< T >::RemoveLast ( )
inline

Removes last node from list (not implemented).

◆ SetTemplateWeakPtr()

template<typename T >
void System::Collections::Generic::LinkedList< T >::SetTemplateWeakPtr ( unsigned int  argument)
inlineoverride

Makes list treat stored pointers as weak (not implemented).