DetectorGraph
2.0
|
The collection of TopicStates that represents the graph state so far. More...
Public Member Functions | |
StateSnapshot () | |
T=0 Constructor. More... | |
StateSnapshot (const std::list< ptr::shared_ptr< const TopicState > > &arTopicStates) | |
T=0 Priming Constructor. More... | |
StateSnapshot (const StateSnapshot &arPreviousState, const std::list< ptr::shared_ptr< const TopicState > > &arTopicStates) | |
T>0 Constructor. More... | |
~StateSnapshot () | |
Destructor. More... | |
ptr::shared_ptr< const TopicState > | GetState (TopicStateIdType aId) const |
Returns a TopicState for a given Id. More... | |
template<class T > | |
ptr::shared_ptr< const T > | GetState () const |
Returns the specific TopicState for a given its type. More... | |
size_t | GetMapSize () const |
Returns the number of TopicStates in the Snapshot. More... | |
unsigned int | GetStateVersion () const |
Returns the version of this snapshot. More... | |
void | GetTopicStates (std::list< ptr::shared_ptr< const TopicState > > &aOutTopicStateList) const |
Gets TopicStates stored in this snapshot. More... | |
The collection of TopicStates that represents the graph state so far.
Responsible for conveying and composing a complete state set in the form of a collection of TopicState shared_ptrs.
Definition at line 34 of file statesnapshot.hpp.
DetectorGraph::StateSnapshot::StateSnapshot | ( | ) |
T=0 Constructor.
Builds an initial and empty StateSnapshot.
Definition at line 23 of file statesnapshot.cpp.
DetectorGraph::StateSnapshot::StateSnapshot | ( | const std::list< ptr::shared_ptr< const TopicState > > & | arTopicStates | ) |
T=0 Priming Constructor.
Builds a prime StateSnapshot from a TopicState list.
Definition at line 29 of file statesnapshot.cpp.
DetectorGraph::StateSnapshot::StateSnapshot | ( | const StateSnapshot & | arPreviousState, |
const std::list< ptr::shared_ptr< const TopicState > > & | arTopicStates | ||
) |
T>0 Constructor.
Builds a StateSnapshot from a previous StateSnapshot and an output list.
Definition at line 36 of file statesnapshot.cpp.
DetectorGraph::StateSnapshot::~StateSnapshot | ( | ) |
Destructor.
Note that the shared ptrs held by a snapshot are implicitly released by normal shared_ptr destructors.
Definition at line 86 of file statesnapshot.cpp.
size_t DetectorGraph::StateSnapshot::GetMapSize | ( | ) | const |
Returns the number of TopicStates in the Snapshot.
Definition at line 111 of file statesnapshot.cpp.
ptr::shared_ptr< const TopicState > DetectorGraph::StateSnapshot::GetState | ( | TopicStateIdType | aId | ) | const |
Returns a TopicState for a given Id.
Or an empty shared_ptr in case no state with that Id exists.
Definition at line 90 of file statesnapshot.cpp.
|
inline |
Returns the specific TopicState for a given its type.
Or an empty shared_ptr in case no state with that Id exists.
Definition at line 79 of file statesnapshot.hpp.
unsigned int DetectorGraph::StateSnapshot::GetStateVersion | ( | ) | const |
Returns the version of this snapshot.
A Snapshot version is a unique positive integer that is incremented at every new Snapshot creation.
Definition at line 116 of file statesnapshot.cpp.
void DetectorGraph::StateSnapshot::GetTopicStates | ( | std::list< ptr::shared_ptr< const TopicState > > & | aOutTopicStateList | ) | const |
Gets TopicStates stored in this snapshot.
Fills aOutTopicStateList with all public TopicStates stored in this Snapshot. This can be useful for merging the contents of this snapshot into another.
Definition at line 100 of file statesnapshot.cpp.