Encapsulate an array to act as a circular list
Public Methods
-
CircleList()
- default constructor.
-
CircleList( int maxsize )
- constructor.
-
~CircleList()
- destructor
-
unsigned int capacity()
- get the maximum size of the circular list
-
unsigned int size()
- get the current number of elements in the circular list
-
void push_back( CmpVoltage data )
- insert an element onto the end of the circular list
-
void push_front( CmpVoltage data )
- insert an element onto the start of the circular list
-
CmpVoltage at( int offset )
- retreive data at specified location
-
int resize( int maxsize )
- resize the circular list to have a differnet capacity
-
int Save( FILE* out )
- write circle list data to a file (buffer?)
-
void Load( FILE* in, char* nothing )
- Read in circle list data from a file (buufer?)
Documentation
Encapsulate an array to act as a circular list
- CircleList()
- default constructor. Creates a circular list with capacity of 10 elements
- CircleList( int maxsize )
-
constructor. Creates a circular list and sets initial size of list
- Parameters:
- - size number of elements to allocate for circular list
- ~CircleList()
- destructor
- unsigned int capacity()
- get the maximum size of the circular list
- unsigned int size()
- get the current number of elements in the circular list
- void push_back( CmpVoltage data )
-
insert an element onto the end of the circular list
- Parameters:
- data - the data to be inserted into the list
- void push_front( CmpVoltage data )
-
insert an element onto the start of the circular list
- Parameters:
- data - the data to be inserted into the list
- CmpVoltage at( int offset )
-
retreive data at specified location
- Parameters:
- offset - number of elements from start of circular list; accepts pos or neg values; wraps around list as necessary
- Returns:
- a copy of the data at the location
- int resize( int maxsize )
-
resize the circular list to have a differnet capacity
- int Save( FILE* out )
-
write circle list data to a file (buffer?)
- Parameters:
- out - pointer to destination file
- Returns:
- the number of bytes written
- void Load( FILE* in, char* nothing )
-
Read in circle list data from a file (buufer?)
- Parameters:
- in - source file containing data
nothing - pointer to character string, not used but passed for consistency
- This class has no child classes.
Alphabetic index HTML hierarchy of classes or Java
This page was generated with the help of DOC++.