Manages a sorted container with strict less than ordering used to store state and measurement objects which can then be queried for closest states/measurements to a given time instant.
Public Member Functions |
| SortedContainer () |
shared_ptr< T > & | getInvalid () |
| To be called to signal that a request could not be satisfied.
|
void | clear () |
| Clears the internal container, dropping all the contents.
|
ListT::size_type | size () |
| Returns the size of the internal container.
|
ListT::iterator | insert (const shared_ptr< T > &value) |
| Insert an object to the internal container to the position not violating the internal strict less than ordering by time.
|
ListT::iterator | getIteratorBegin () |
| Returns the iterator at the beginning of the internal container.
|
ListT::iterator | getIteratorBeforeBegin () |
| Returns the iterator before the beginning of the internal container.
|
ListT::iterator | getIteratorEnd () |
| Returns the iterator at the end of the internal container.
|
ListT::iterator | getIteratorAtValue (const shared_ptr< T > &value, bool warnIfNotExistant=true) |
| Returns the iterator at the specific time instant of the supplied object or an invalid object if the request cannot be satisfied.
|
ListT::iterator | getIteratorAtValue (const double &time, bool warnIfNotExistant=true) |
| Returns the iterator at a specific time instant or an invalid object if the request cannot be satisfied.
|
ListT::iterator | getIteratorClosestBefore (const double &statetime) |
| Returns the iterator closest before a specific time instant.
|
ListT::iterator | getIteratorClosestAfter (const double &statetime) |
| Returns the iterator closest after a specific time instant.
|
ListT::iterator | getIteratorClosest (const double &statetime) |
| Returns the iterator closest to a specific time instant.
|
shared_ptr< T > & | getClosestBefore (const double &statetime) |
| Returns a pointer to the closest object before a specific time instant.
|
shared_ptr< T > & | getClosestAfter (const double &statetime) |
| Returns a pointer to the closest after a specific time instant or an invalid object if the request cannot be satisfied.
|
shared_ptr< T > & | getValueAt (const double &statetime) |
| Returns a pointer to the object at a specific time instant or an invalid object if the request cannot be satisfied.
|
shared_ptr< T > & | getClosest (const double &statetime) |
| Returns a pointer to the closest to a specific time instant.
|
void | clearOlderThan (double age) |
| Clears all objects having a time stamp older than the supplied time in seconds.
|
shared_ptr< T > & | getLast () |
| Returns a pointer to the last object in the container or an invalid object if the container is empty.
|
shared_ptr< T > & | getFirst () |
| Returns a pointer to the first object in the container or an invalid object if the container is empty.
|
shared_ptr< T > | updateTime (double timeOld, double timeNew) __attribute__((warn_unused_result)) |
| This function updates the time of an object in the container this function effectively changes the map ordering, so the previous iterators are invalidated the attribute unused can be eliminated for non gcc compilers, its just a little more verbose in cases where the updated value is not used.
|
std::string | echoBufferContentTimes () |
| Debug output the contents of the container in a human readable time format.
|