This class defines a simple list of pointers to objects of the given type. More...
#include <chains.h>
Public Member Functions | |
simplelist () | |
The default constructor of an empty list. | |
~simplelist () | |
The destructor. | |
void | add (element &m) |
Adds an element to the list. | |
void | remove (element &m) |
Remove an element from the list. | |
element * | take () |
A simple internal iterator of the list. | |
Private Member Functions | |
simplelist (const simplelist< element > &s) | |
The copy constructor is not implemented. | |
simplelist< element > & | operator= (const simplelist< element > &s) |
The assignment operator is not implemented. | |
Private Attributes | |
int | num |
The number of element pointers stored in the list. | |
int | cur |
The current element in the table. | |
element ** | elem |
A table of element pointers. |
This class defines a simple list of pointers to objects of the given type.
It is a helper class used in chain complex.
Definition at line 1177 of file chains.h.
chomp::homology::simplelist< element >::simplelist | ( | ) | [inline] |
chomp::homology::simplelist< element >::~simplelist | ( | ) | [inline] |
The destructor.
Definition at line 1236 of file chains.h.
References chomp::homology::simplelist< element >::elem.
chomp::homology::simplelist< element >::simplelist | ( | const simplelist< element > & | s | ) | [inline, private] |
void chomp::homology::simplelist< element >::add | ( | element & | m | ) | [inline] |
Adds an element to the list.
Definition at line 1244 of file chains.h.
References chomp::homology::simplelist< element >::elem, and chomp::homology::simplelist< element >::num.
simplelist<element>& chomp::homology::simplelist< element >::operator= | ( | const simplelist< element > & | s | ) | [inline, private] |
void chomp::homology::simplelist< element >::remove | ( | element & | m | ) | [inline] |
Remove an element from the list.
Definition at line 1256 of file chains.h.
References chomp::homology::simplelist< element >::elem, and chomp::homology::simplelist< element >::num.
element * chomp::homology::simplelist< element >::take | ( | ) | [inline] |
A simple internal iterator of the list.
A call to this function returns an element from the list, but does not remove it from the list, and sets the internal iterator for the next element. After the last element has been taken, returns 0 and rewinds the iterator to the beginning of the list.
Definition at line 1271 of file chains.h.
References chomp::homology::simplelist< element >::cur, chomp::homology::simplelist< element >::elem, and chomp::homology::simplelist< element >::num.
int chomp::homology::simplelist< element >::cur [private] |
The current element in the table.
Definition at line 1220 of file chains.h.
Referenced by chomp::homology::simplelist< element >::take().
element** chomp::homology::simplelist< element >::elem [private] |
A table of element pointers.
Definition at line 1223 of file chains.h.
Referenced by chomp::homology::simplelist< element >::add(), chomp::homology::simplelist< element >::remove(), chomp::homology::simplelist< element >::take(), and chomp::homology::simplelist< element >::~simplelist().
int chomp::homology::simplelist< element >::num [private] |
The number of element pointers stored in the list.
Definition at line 1217 of file chains.h.
Referenced by chomp::homology::simplelist< element >::add(), chomp::homology::simplelist< element >::remove(), and chomp::homology::simplelist< element >::take().