API Guides > ConceptRT 3.x
BaseLinkedReferenceList< T > Class Template Reference

Base classe for linked references list. More...

Detailed Description

template<typename T>
class ConceptRT::BaseLinkedReferenceList< T >

Base classe for linked references list.

Template Parameters
TList items type.
+ Inheritance diagram for BaseLinkedReferenceList< T >:

Public Member Methods

void AddFirst (T &item)
 Adds at first. More...
 
T * TryRemoveFirst ()
 Try remove first item. More...
 
T & RemoveFirst ()
 Removes the first item. More...
 
void AddLast (T &item)
 Adds a last item. More...
 
bool IsFull () const
 Query if the list is full. More...
 
bool IsEmpty () const
 Query if the list is empty. More...
 
LinkedReferenceListCell< T > * GetLast ()
 Gets the last item. More...
 
void Remove (LinkedReferenceListCell< T > &item)
 Remove items. More...
 
void Clear ()
 Clears items. More...
 
Int32 GetCount () const
 Gets the number of items. More...
 
T & operator[] (Int32 index) const
 Array indexer operator. More...
 

Public Attributes

LinkedReferenceListCell< T > * First
 The first item of list More...
 
Int32 __internalCount
 Number of item (Internal : Do not use directly, but through macro LINKED_REFERENCE_LIST_COUNT for fast access) More...
 

Methods Documentation

void AddFirst ( T &  item)

Adds at first.

Parameters
itemThe item.
void AddLast ( T &  item)

Adds a last item.

Parameters
itemThe item.
void Clear ( )

Clears items.

Int32 GetCount ( ) const

Gets the number of items.

Returns
The number of items.
LinkedReferenceListCell< T > * GetLast ( )

Gets the last item.

Returns
The item.
bool IsEmpty ( ) const

Query if the list is empty.

Returns
true if it empty.
bool IsFull ( ) const

Query if the list is full.

Returns
true if it full.
T & operator[] ( Int32  index) const

Array indexer operator.

Parameters
indexZero-based index of the item.
Returns
The indexed item.

This method is not the most efficient way to iterate on the items. Use macros instead.

void Remove ( LinkedReferenceListCell< T > &  item)

Remove items.

Parameters
item[in,out] The item.
RT Exceptions:
RT_ERROR_NOT_FOUND_ITEM
T & RemoveFirst ( )

Removes the first item.

Returns
the removed element.
RT Exceptions:
RT_ERROR_TRY_TO_ACCESS_UNEXISTANT_CONTENT
T * TryRemoveFirst ( )

Try remove first item.

Returns
the removed element, NULL if fails.

Fields Documentation

Int32 __internalCount

Number of item (Internal : Do not use directly, but through macro LINKED_REFERENCE_LIST_COUNT for fast access)

The first item of list