#include <List.h>
Inheritance diagram for clawsoft::List< T >:
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 (unsigned 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 & | get () |
Obtains the current element. | |
void | rewind () |
Rewinds the list. | |
T & | operator[] (unsigned int i) |
Same as List::get(i). | |
unsigned int | size () |
Returns the size of the given list. | |
const char * | getClassName () |
Returns the name of the current class. | |
Static Public Methods | |
int | installedCPUs () |
This will return how many CPUs are installed in the system. | |
double | cpuSpeed () |
This will return the CPU speed in megahertz. | |
int | totalMemory () |
Will return the total amount of system memory. | |
int | freeMemory () |
Will return the total amount of free system memory. | |
void | usleep (Uint32 usec) |
Will freeze the software for usec microseconds. | |
Protected Methods | |
void | setClassName (const char *n) |
Call this method when you need to set the name of the class you're creating, typically in it's constructor, remember that you must set the classname for every class you create, that way you can have more information while debugging. | |
Protected Attributes | |
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. | |
unsigned int | num_data |
Keeps a count of the number of elements contained in the list. |
|
This is the default constructor, it initilizes all data to zero.
|
|
By default we only destroy the list itself, without destroying its data.
|
|
Appends an element to the end of the list.
|
|
This will return the CPU speed in megahertz.
|
|
Use this method to destroy the list without destroying its data.
|
|
Will return the total amount of free system memory.
|
|
Obtains the current element.
|
|
Return the elemt at the j position of the list starting by the head.
|
|
Returns the name of the current class.
|
|
This will return how many CPUs are installed in the system.
|
|
Same as List::get(i).
|
|
Removes an element from the end of the list.
|
|
Rewinds the list.
|
|
Call this method when you need to set the name of the class you're creating, typically in it's constructor, remember that you must set the classname for every class you create, that way you can have more information while debugging.
|
|
Returns the size of the given list.
|
|
Will return the total amount of system memory.
|
|
Will freeze the software for usec microseconds.
|
|
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.
|
|
Keeps a count of the number of elements contained in the list.
|
Authors:
Juan V. Guerrero
Jannette C. Mejia
Juan C. Guevara
Powered by: