class CircleList

Encapsulate an array to act as a circular list

Public Methods

[more] CircleList()
default constructor.
[more] CircleList( int maxsize )
constructor.
[more] ~CircleList()
destructor
[more]unsigned int capacity()
get the maximum size of the circular list
[more]unsigned int size()
get the current number of elements in the circular list
[more]void push_back( CmpVoltage data )
insert an element onto the end of the circular list
[more]void push_front( CmpVoltage data )
insert an element onto the start of the circular list
[more]CmpVoltage at( int offset )
retreive data at specified location
[more]int resize( int maxsize )
resize the circular list to have a differnet capacity
[more]int Save( FILE* out )
write circle list data to a file (buffer?)
[more]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
o CircleList()
default constructor. Creates a circular list with capacity of 10 elements

o CircleList( int maxsize )
constructor. Creates a circular list and sets initial size of list

Parameters:
- size number of elements to allocate for circular list

o ~CircleList()
destructor

ounsigned int capacity()
get the maximum size of the circular list

ounsigned int size()
get the current number of elements in the circular list

ovoid push_back( CmpVoltage data )
insert an element onto the end of the circular list

Parameters:
data - the data to be inserted into the list

ovoid push_front( CmpVoltage data )
insert an element onto the start of the circular list

Parameters:
data - the data to be inserted into the list

oCmpVoltage 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

oint resize( int maxsize )
resize the circular list to have a differnet capacity

oint Save( FILE* out )
write circle list data to a file (buffer?)
Parameters:
out - pointer to destination file
Returns:
the number of bytes written

ovoid 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++.