#include <List.h>
Inheritance diagram for clawsoft.List< T >:
Definition at line 22 of file List.h.
Public Methods | |
List () | |
This is the default constructor, it initilizes all data to zero. | |
~List () | |
By default we only destroy the list itself, without destroying its data. | |
void | destroy () |
Use this method to destroy the list without destroying its data. | |
void | add (T data) |
Appends an element to the end of the list. | |
void | remove (int idx) |
Removes an element from the end of the list. | |
T & | get (unsigned int j) |
Return the elemt at the j position of the list starting by the head. | |
T & | operator[] (unsigned int i) |
Same as List::get(i). | |
char * | getClassName () |
Returns the name of the current class. | |
Protected Methods | |
void | setClassName (char *n) |
Call this method when you need to set the name of the class you're creating, typically int it's constructor, remeber that you must set the classname for every clas you create, that way you can have more information while being in a debuging process. | |
Protected Attributes | |
unsigned int | num_data |
Keeps a count of the number of elements contained in the list. | |
unsigned int | middle |
Keeps the index of the data in the middle of the list. | |
nodeT * | list |
Points to the beginning of the list. | |
nodeT * | end |
Points to the beginning of the list. |
|
This is the default constructor, it initilizes all data to zero.
Definition at line 80 of file List.h. References clawsoft.List< T >.num_data. |
|
By default we only destroy the list itself, without destroying its data.
Definition at line 89 of file List.h. References clawsoft.List< T >.destroy(). |
|
Appends an element to the end of the list.
Definition at line 108 of file List.h. References clawsoft.List< T >.nodeT.before, clawsoft.List< T >.middle, clawsoft.List< T >.nodeT.next, and clawsoft.List< T >.num_data. |
|
Use this method to destroy the list without destroying its data.
Definition at line 96 of file List.h. References clawsoft.List< T >.nodeT.next. Referenced by clawsoft.List< T >.~List(). |
|
Return the elemt at the j position of the list starting by the head.
Definition at line 153 of file List.h. References clawsoft.List< T >.nodeT.before, clawsoft.List< T >.nodeT.data, clawsoft.List< T >.middle, clawsoft.List< T >.nodeT.next, and clawsoft.List< T >.num_data. Referenced by clawsoft.List< T >.operator[](). |
|
Returns the name of the current class.
Definition at line 18 of file Object.cpp. References clawsoft.Object.__cls_name. |
|
Same as List::get(i).
Definition at line 179 of file List.h. References clawsoft.List< T >.get(). |
|
Removes an element from the end of the list.
Definition at line 126 of file List.h. References clawsoft.List< T >.nodeT.before, and clawsoft.List< T >.nodeT.next. |
|
|
Points to the beginning of the list.
|
|
Points to the beginning of the list.
|
|
Keeps the index of the data in the middle of the list.
Definition at line 66 of file List.h. Referenced by clawsoft.List< T >.add(), and clawsoft.List< T >.get(). |
|
Keeps a count of the number of elements contained in the list.
Definition at line 62 of file List.h. Referenced by clawsoft.List< T >.add(), clawsoft.List< T >.get(), and clawsoft.List< T >.List(). |
Powered by: