DetectorGraph
2.0
|
A StateSnapshot keeper for DetectorGraph TopicStates. More...
Public Member Functions | |
GraphStateStore () | |
Constructs an empty graph store. More... | |
~GraphStateStore () | |
Default Destructor. More... | |
void | TakeNewSnapshot (const std::list< ptr::shared_ptr< const TopicState > > &arTopicStates) |
Takes a new state snapshot and appends it to the look back queue. More... | |
ptr::shared_ptr< const StateSnapshot > | GetLastState () const |
Returns a safe shared pointer to the latest complete StateSnapshot. More... | |
A StateSnapshot keeper for DetectorGraph TopicStates.
This class is responsible for maintaining a look back queue of previous graph states (in the form of StateSnapshots) in a no-duplication and safe-sharing fashion.
Definition at line 36 of file graphstatestore.hpp.
DetectorGraph::GraphStateStore::GraphStateStore | ( | ) |
Constructs an empty graph store.
Definition at line 20 of file graphstatestore.cpp.
DetectorGraph::GraphStateStore::~GraphStateStore | ( | ) |
Default Destructor.
Note that this destructor doesn't explicitly delete any of the StateSnapshots in mStatesLookbackQueue since that's implicitly handled by the ptr::shared_ptrs.
Definition at line 26 of file graphstatestore.cpp.
ptr::shared_ptr< const StateSnapshot > DetectorGraph::GraphStateStore::GetLastState | ( | ) | const |
Returns a safe shared pointer to the latest complete StateSnapshot.
Always returns a valid ptr::shared_ptr even though the StateSnapshot might be empty.
Definition at line 47 of file graphstatestore.cpp.
void DetectorGraph::GraphStateStore::TakeNewSnapshot | ( | const std::list< ptr::shared_ptr< const TopicState > > & | arTopicStates | ) |
Takes a new state snapshot and appends it to the look back queue.
This method takes a graph output list and combines it with the previous StateSnapshot (if existent) to generate a new StateSnapshot.
Definition at line 30 of file graphstatestore.cpp.