|
state-observation 1.8.0
General implementation of observers.
|
This class describes a structure that enables to store array of objects with time indexation. More...
#include <definitions.hpp>
Public Member Functions | |
| IndexedObjectArrayT () | |
| Default constructor. | |
| IndexedObjectArrayT (TimeSize size, TimeIndex initTime=0) | |
| Construct a new IndexedObjectArrayT with a predifined size. | |
| void | truncateAfter (TimeIndex timeIndex) override |
| removes all the elements with larger indexes than timeIndex | |
| void | truncateBefore (TimeIndex timeIndex) override |
| removes all the elements with smaller indexes than timeIndex | |
| TimeIndex | getLastIndex () const override |
| Get the time index. | |
| TimeIndex | getNextIndex () const override |
| TimeIndex | setLastIndex (int index) override |
| Set the time index of the last element. | |
| TimeIndex | getFirstIndex () const override |
| Get the time index. | |
| TimeIndex | setFirstIndex (int index) override |
| set the time index of the first element | |
| TimeSize | size () const override |
| void | reset () override |
| void | clear () override |
| Clears the vector but keeps the last index. | |
| bool | checkIndex (TimeIndex k) const override |
| checks whether the index is present in the array | |
| void | setValue (const ObjectType &value, TimeIndex k) |
| void | pushBack (const ObjectType &v) |
| Pushes back the object to the array, the new value will take the next time. | |
| void | popFront () |
| removes the first (oldest) element of the array | |
| const ObjectType & | operator[] (TimeIndex time) const |
| gets a constant reference to the given time index | |
| ObjectType & | operator[] (TimeIndex index) |
| gets the value with the given time index, non const version | |
| const ObjectType & | front () const |
| gets the first value | |
| ObjectType & | front () |
| gets the first value | |
| const ObjectType & | back () const |
| gets the last value | |
| ObjectType & | back () |
| gets the last value | |
Protected Types | |
| typedef std::deque< ObjectType > | Deque |
Protected Member Functions | |
| void | check_ (TimeIndex time) const override |
| void | check_ () const override |
| void | checkNext_ (TimeIndex time) const override |
| Protected Member Functions inherited from stateObservation::IndexedObjectArrayBase | |
| IndexedObjectArrayBase () | |
| Default constructor. | |
| IndexedObjectArrayBase (TimeIndex initTime) | |
| Construct a new IndexedObjectArrayT with a predifined size. | |
Protected Attributes | |
| Deque | v_ |
| Protected Attributes inherited from stateObservation::IndexedObjectArrayBase | |
| TimeIndex | k_ |
This class describes a structure that enables to store array of objects with time indexation.
Definition at line 595 of file definitions.hpp.
|
protected |
Definition at line 681 of file definitions.hpp.
| stateObservation::IndexedObjectArrayT< ObjectType, Allocator >::IndexedObjectArrayT | ( | TimeSize | size, |
| TimeIndex | initTime = 0 ) |
Construct a new IndexedObjectArrayT with a predifined size.
| size | is the size of the array |
| initTime | is the index of the initial time. It is zero by default |
|
overridevirtual |
removes all the elements with larger indexes than timeIndex
Implements stateObservation::IndexedObjectArrayBase.
|
overridevirtual |
removes all the elements with smaller indexes than timeIndex
Implements stateObservation::IndexedObjectArrayBase.
|
inlineoverridevirtual |
Get the time index.
Implements stateObservation::IndexedObjectArrayBase.
|
inlineoverridevirtual |
Get the time index of the next value that will be pushed back Can be used in for loops
Implements stateObservation::IndexedObjectArrayBase.
|
inlineoverridevirtual |
Set the time index of the last element.
Implements stateObservation::IndexedObjectArrayBase.
|
inlineoverridevirtual |
Get the time index.
Implements stateObservation::IndexedObjectArrayBase.
|
inlineoverridevirtual |
set the time index of the first element
Implements stateObservation::IndexedObjectArrayBase.
|
inlineoverridevirtual |
Implements stateObservation::IndexedObjectArrayBase.
|
inlineoverridevirtual |
Resets the array to initial state the value is no longer accessible
Implements stateObservation::IndexedObjectArrayBase.
|
inlineoverridevirtual |
Clears the vector but keeps the last index.
Implements stateObservation::IndexedObjectArrayBase.
|
inlineoverridevirtual |
checks whether the index is present in the array
Implements stateObservation::IndexedObjectArrayBase.
|
inline |
Sets the value v at the time index k It can be used to push a value into the back of the array
|
inlineoverrideprotectedvirtual |
Asserts that the index is present in the array does nothing in release mode
Implements stateObservation::IndexedObjectArrayBase.
|
inlineoverrideprotectedvirtual |
Asserts that the array is not empty does nothing in release mode
Implements stateObservation::IndexedObjectArrayBase.
|
inlineoverrideprotectedvirtual |
Asserts that the given time can be pushed at the back of the vector does nothing in release mode
Implements stateObservation::IndexedObjectArrayBase.
|
protected |
Definition at line 682 of file definitions.hpp.