The length of the queue is determined by the periodicity of the data and the desired history.
Public Member Functions | |
const std::vector< T > & | data () const |
std::vector< T > & | data () |
const code::TimeInterval & | getHistory () const |
void | addData (const T &rs) |
will add this DataType to the queue, expiring as many DataType's are required to barely maintain the history. | |
void | setHistory (const TimeInterval &history) |
change the history. | |
DataTypeHistory (const TimeInterval &h=TimeInterval::Hours(1)) | |
Construct with desired history of the queue. |
code::DataTypeHistory< T >::DataTypeHistory | ( | const TimeInterval & | h = TimeInterval::Hours(1) |
) | [inline] |
Construct with desired history of the queue.
void code::DataTypeHistory< T >::addData | ( | const T & | rs | ) | [inline] |
will add this DataType to the queue, expiring as many DataType's are required to barely maintain the history.
std::vector< T >& code::DataTypeHistory< T >::data | ( | ) | [inline] |
const std::vector< T >& code::DataTypeHistory< T >::data | ( | ) | const [inline] |
const code::TimeInterval& code::DataTypeHistory< T >::getHistory | ( | ) | const [inline] |
void code::DataTypeHistory< T >::setHistory | ( | const TimeInterval & | history | ) | [inline] |
change the history.
If you reduce the history, records will be expired, but if you increase the history, expired DataType's do not magically reappear. Once gone, they are gone.