#include <ValueTypeList.hpp>
List of all members.
Detailed Description
template<class T, class I>
class zeus::TValueTypeList< T, I >
template class implements a list based on a class "T". The class "T" implements the interface "I". This is put together to the list of "T" implementing the IList of "I"
Constructor & Destructor Documentation
template<class T , class I >
Destructor (avoids waring C4265)
Member Function Documentation
template<class T , class I >
Adds an element to the list.
- Precondition:
- no precondition
- Postcondition:
- newSize = oldSize + 1 and element rItem on the place [Length-1]
Before: e0, e1, e2 ... en
After: e0, e1, e2 ... en, rItem
- Parameters:
-
- Returns:
- Position of the added item
Implements zeus::IList< I >.
template<class T , class I >
template<class T , class I >
Adds an empty item to the list
- Returns:
- Position of the last item added
Implements zeus::IList< I >.
template<class T , class I >
Clears the list. All elements are removed from the list
- Precondition:
- no preconditions
- Postcondition:
- getSize() = 0
Implements zeus::IList< I >.
template<class T , class I >
template<class T , class I >
Removes an element out of the list
- Precondition:
- iIndex >= 0 and iIndex < Size
- Postcondition:
- newSize = oldSize - 1 and the Element[iIndex] was before at the place lIndex + 1
Before: e0, e1, ... iIndex, iIndex+1 ... en
After: e0, e1, ... iIndex+1, iIndex+2 ... en
- Parameters:
-
| iIndex | : Index of the element to remove |
- Return values:
-
| RET_NOERROR | : Element removed |
| RET_REQUEST_FAILED,: | Could not remove element |
Implements zeus::IList< I >.
template<class T , class I >
template<class T , class I >
| virtual bool MQUALIFIER zeus::TValueTypeList< T, I >::equalsItem |
( |
Int |
iIndex, |
|
|
const I & |
rItem |
|
) |
| const [inline, virtual] |
This method checks if an item is equal to an item inside this list
- Parameters:
-
| iIndex | : Index of the item to be checked |
| rItem | : Item to check |
- Return values:
-
| true | : Item is equal |
| false,: | Item is not equal |
Implements zeus::IList< I >.
template<class T , class I >
Returns the const iterator of this list object. This iterator is used to traverse the list. The iterator will be allocated inside this method and must be released through the method releaseIterator(). Its possible to use the method as nested calls. The order of the releasing doesn't has to mach the getIterator() calls.
- Returns:
- pointer to a allocated iterator.
Implements zeus::IList< I >.
template<class T , class I >
Returns the number of items
- Returns:
- number of items
Implements zeus::IList< I >.
template<class T , class I >
returns the first item of the list
- Returns:
- first item
Implements zeus::IList< I >.
template<class T , class I >
| virtual const I& MQUALIFIER zeus::TValueTypeList< T, I >::getFirstItemConst |
( |
) |
const [inline, virtual] |
template<class T , class I >
Returns the indexed item at position iIndex
- Precondition:
- iIndex >= 0 und iIndex < Size
- Postcondition:
- no changes on the list
- Parameters:
-
| iIndex | : Index of requested item |
- Return values:
-
| Empty | element : Could not find the item at iIndex |
| Element[iIndex] | : item at [iIndex] |
Implements zeus::IList< I >.
template<class T , class I >
| virtual const I& MQUALIFIER zeus::TValueTypeList< T, I >::getItemConst |
( |
Int |
iIndex ) |
const [inline, virtual] |
template<class T , class I >
Returns the iterator of this list object. This iterator is used to traverse the list. The iterator will be allocated inside this method and must be released through the method releaseIterator(). Its possible to use the method as nested calls. The order of the releasing doesn't has to mach the getIterator() calls.
- Returns:
- pointer to a allocated iterator.
Implements zeus::IList< I >.
template<class T , class I >
returns the last item of the list
- Returns:
- last item
Implements zeus::IList< I >.
template<class T , class I >
| virtual const I& MQUALIFIER zeus::TValueTypeList< T, I >::getLastItemConst |
( |
) |
const [inline, virtual] |
template<class T , class I >
template<class T , class I >
| virtual bool MQUALIFIER zeus::TValueTypeList< T, I >::hasItem |
( |
const I & |
rItem ) |
const [inline, virtual] |
checks if the list contains an item
- Parameters:
-
- Return values:
-
| true | : item is included by the list |
| false,: | item is not included by the list |
Implements zeus::IList< I >.
template<class T , class I >
| virtual Int MQUALIFIER zeus::TValueTypeList< T, I >::indexOf |
( |
const I & |
rItem ) |
const [inline, virtual] |
returns the index of an item.
- Parameters:
-
- Return values:
-
| INVALID_INDEX | : Item is not inserted in this list |
| >= | 0: Index of the item |
Implements zeus::IList< I >.
template<class T , class I >
| virtual Int MQUALIFIER zeus::TValueTypeList< T, I >::insert |
( |
Int |
iIndex, |
|
|
const I & |
rItem |
|
) |
| [inline, virtual] |
Inserts an item into the list at position iIndex.
- Precondition:
- iIndex must be valid (>= 0).
- Postcondition:
- if iIndex = 0, then the rItem is placed in the front (prepend); if the iIndex == count, the item is placed at the end (append); else the rItem is placed at position iIndex:
- Parameters:
-
| rItem | : Item to insert |
| iIndex | : insert position |
- Return values:
-
| INVALID_INDEX | : Could not insert the element (invalid insert position) |
| >= | 0: Item inserted. The return value is the insert position |
Implements zeus::IList< I >.
template<class T , class I >
Checks if the list is empty
- Return values:
-
| true | : List is empty |
| false | : List is not empty |
Implements zeus::IList< I >.
template<class T , class I >
template<class T , class I >
template<class T , class I >
This method releases a iterator object. This must be called after a call of getIterator(), otherwise it will cause a memory leak.
- Parameters:
-
| pIterator | : Iterator to release. |
Implements zeus::IList< I >.
template<class T , class I >
| virtual Retval MQUALIFIER zeus::TValueTypeList< T, I >::remove |
( |
const I & |
rItem ) |
[inline, virtual] |
Removes the element rItem out of the list.
- Precondition:
- no precondition
- Postcondition:
- see deleteItem()
- Parameters:
-
- Return values:
-
| RET_NOERROR | : Element removed |
| RET_REQUEST_FAILED,: | Could not remove element |
Implements zeus::IList< I >.
template<class T , class I >
Member Data Documentation
template<class T , class I >
internal list containing the data
The documentation for this class was generated from the following file: