DART
6.10.1
|
MapHolder is a templated wrapper class that is used to allow maps of Aspect::State and Aspect::Properties to be handled in a semantically palatable way. More...
#include <Cloneable.hpp>
Public Member Functions | |
CloneableMap ()=default | |
Default constructor. More... | |
CloneableMap (const CloneableMap &otherStates) | |
Copy constructor. More... | |
CloneableMap (CloneableMap &&otherStates) | |
Move constructor. More... | |
CloneableMap (const MapType &otherMap) | |
Map-based constructor. More... | |
CloneableMap (MapType &&otherMap) | |
Map-based move constructor. More... | |
CloneableMap & | operator= (const CloneableMap &otherStates) |
Assignment operator. More... | |
CloneableMap & | operator= (CloneableMap &&otherStates) |
Move assignment operator. More... | |
CloneableMap & | operator= (const MapType &otherMap) |
Map-based assignment operator. More... | |
CloneableMap & | operator= (MapType &&otherMap) |
Map-based move assignment operator. More... | |
void | copy (const CloneableMap &otherMap, bool merge=false) |
Copy the contents of another cloneable map into this one. More... | |
void | copy (const MapType &otherMap, bool merge=false) |
Copy the contents of a map into this one. More... | |
void | merge (const CloneableMap &otherMap) |
Merge the contents of another cloneable map into this one. More... | |
void | merge (const MapType &otherMap) |
Merge the contents of another map into this one. More... | |
MapType & | getMap () |
Get the map that is being held. More... | |
const MapType & | getMap () const |
Get the map that is being held. More... | |
Protected Attributes | |
MapType | mMap |
A map containing the collection of States for the Aspect. More... | |
MapHolder is a templated wrapper class that is used to allow maps of Aspect::State and Aspect::Properties to be handled in a semantically palatable way.
|
default |
Default constructor.
dart::common::CloneableMap< MapType >::CloneableMap | ( | const CloneableMap< MapType > & | otherStates | ) |
Copy constructor.
dart::common::CloneableMap< MapType >::CloneableMap | ( | CloneableMap< MapType > && | otherStates | ) |
Move constructor.
dart::common::CloneableMap< MapType >::CloneableMap | ( | const MapType & | otherMap | ) |
Map-based constructor.
dart::common::CloneableMap< MapType >::CloneableMap | ( | MapType && | otherMap | ) |
Map-based move constructor.
void dart::common::CloneableMap< MapType >::copy | ( | const CloneableMap< MapType > & | otherMap, |
bool | merge = false |
||
) |
Copy the contents of another cloneable map into this one.
If merge is set to false, then any fields in this map which are not present in the other map will be erased; otherwise they will be kept. Setting merge to false will make the contents of this map an exact duplicate of the other map.
void dart::common::CloneableMap< MapType >::copy | ( | const MapType & | otherMap, |
bool | merge = false |
||
) |
Copy the contents of a map into this one.
If merge is set to false, then any fields in this map which are not present in the other map will be erased; otherwise they will be kept. Setting merge to false will make the contents of this map an exact duplicate of the other map.
MapType & dart::common::CloneableMap< MapType >::getMap |
Get the map that is being held.
const MapType & dart::common::CloneableMap< MapType >::getMap |
Get the map that is being held.
void dart::common::CloneableMap< MapType >::merge | ( | const CloneableMap< MapType > & | otherMap | ) |
Merge the contents of another cloneable map into this one.
If there are any entries which both maps have, then the contents of otherMap will take precedence. This is the same as calling copy(otherMap, true).
void dart::common::CloneableMap< MapType >::merge | ( | const MapType & | otherMap | ) |
Merge the contents of another map into this one.
If there are any entries which both maps have, then the contents of otherMap will take precedence. This is the same as calling copy(otherMap, true).
CloneableMap< MapType > & dart::common::CloneableMap< MapType >::operator= | ( | CloneableMap< MapType > && | otherStates | ) |
Move assignment operator.
CloneableMap< MapType > & dart::common::CloneableMap< MapType >::operator= | ( | const CloneableMap< MapType > & | otherStates | ) |
Assignment operator.
CloneableMap< MapType > & dart::common::CloneableMap< MapType >::operator= | ( | const MapType & | otherMap | ) |
Map-based assignment operator.
CloneableMap< MapType > & dart::common::CloneableMap< MapType >::operator= | ( | MapType && | otherMap | ) |
Map-based move assignment operator.
|
protected |
A map containing the collection of States for the Aspect.