State storage that allows storing state metadata as well. More...
#include <StateStorage.h>

Public Member Functions | |
| StateStorageWithMetadata (const StateSpacePtr &space) | |
| The state space to store states for is specified as argument. | |
| virtual void | addState (const State *state) |
| Add a state to the set of states maintained by this storage structure. The state is copied to internal storage and metadata with default values is stored as well. | |
| virtual void | addState (const State *state, const M &metadata) |
| Add a state to the set of states maintained by this storage structure. The state is copied to internal storage. Corresponding metadata is stored too. | |
| virtual void | clear (void) |
| Clear the stored states. This frees all the memory. | |
| const M & | getMetadata (unsigned int index) const |
| Get const access to the metadata of a state at a particular index. | |
| M & | getMetadata (unsigned int index) |
| Get write access to the metadata of a state at a particular index. | |
Protected Member Functions | |
| virtual void | loadMetadata (const Header &h, boost::archive::binary_iarchive &ia) |
| Load the state metadata from a binary archive ia, given the loaded header is h. No metadata is actually loaded unless the StateStorageWithMetadata class is used. | |
| virtual void | storeMetadata (const Header &h, boost::archive::binary_oarchive &oa) |
| Save the state metadata to a binary archive oa, given the stored header is h. No metadata is actually saved unless the StateStorageWithMetadata class is used. | |
Protected Attributes | |
| std::vector< M > | metadata_ |
| The metadata for each state. | |
State storage that allows storing state metadata as well.
| M | the datatype for the stored metadata. boost::serialization operation needs to be defined |
Definition at line 198 of file StateStorage.h.