22 ptr::shared_ptr<const StateSnapshot> tZeroState = ptr::shared_ptr<const StateSnapshot>(
new StateSnapshot());
23 mStatesLookbackQueue.push(tZeroState);
33 ptr::shared_ptr<const StateSnapshot> newState;
36 newState = ptr::shared_ptr<const StateSnapshot>(
new StateSnapshot(*(mStatesLookbackQueue.back()), arTopicStates));
38 mStatesLookbackQueue.push(newState);
40 const size_t MaxLookBack = 2;
41 if (mStatesLookbackQueue.size() > MaxLookBack)
43 mStatesLookbackQueue.pop();
50 return mStatesLookbackQueue.back();
The collection of TopicStates that represents the graph state so far.
ptr::shared_ptr< const StateSnapshot > GetLastState() const
Returns a safe shared pointer to the latest complete StateSnapshot.
~GraphStateStore()
Default Destructor.
GraphStateStore()
Constructs an empty graph store.
void TakeNewSnapshot(const std::list< ptr::shared_ptr< const TopicState > > &arTopicStates)
Takes a new state snapshot and appends it to the look back queue.