DART  6.10.1
dart::common::detail::CompositeData< MapType, GetData > Class Template Reference

#include <CompositeData.hpp>

Inheritance diagram for dart::common::detail::CompositeData< MapType, GetData >:
dart::common::CloneableMap< MapType >

Public Member Functions

template<typename... Args>
 CompositeData (Args &&... args)
 Forwarding constructor. More...
 
virtual ~CompositeData ()=default
 
template<class AspectT , typename... Args>
GetData< AspectT >::Type & create (Args &&... args)
 Create (or replace) a piece of data in this. More...
 
template<class AspectT >
GetData< AspectT >::Type * get ()
 
template<class AspectT >
const GetData< AspectT >::Type * get () const
 
template<class AspectT , typename... Args>
GetData< AspectT >::Type & getOrCreate (Args &&... args)
 
template<class AspectT >
bool has () const
 
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...
 

Constructor & Destructor Documentation

◆ CompositeData()

template<typename MapType , template< class > class GetData>
template<typename... Args>
dart::common::detail::CompositeData< MapType, GetData >::CompositeData ( Args &&...  args)
inline

Forwarding constructor.

◆ ~CompositeData()

template<typename MapType , template< class > class GetData>
virtual dart::common::detail::CompositeData< MapType, GetData >::~CompositeData ( )
virtualdefault

Member Function Documentation

◆ copy() [1/2]

template<typename MapType >
void dart::common::CloneableMap< MapType >::copy ( const CloneableMap< MapType > &  otherMap,
bool  merge = false 
)
inherited

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.

◆ copy() [2/2]

template<typename MapType >
void dart::common::CloneableMap< MapType >::copy ( const MapType &  otherMap,
bool  merge = false 
)
inherited

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.

◆ create()

template<typename MapType , template< class > class GetData>
template<class AspectT , typename... Args>
GetData<AspectT>::Type& dart::common::detail::CompositeData< MapType, GetData >::create ( Args &&...  args)
inline

Create (or replace) a piece of data in this.

◆ get() [1/2]

template<typename MapType , template< class > class GetData>
template<class AspectT >
GetData<AspectT>::Type* dart::common::detail::CompositeData< MapType, GetData >::get ( )
inline

◆ get() [2/2]

template<typename MapType , template< class > class GetData>
template<class AspectT >
const GetData<AspectT>::Type* dart::common::detail::CompositeData< MapType, GetData >::get ( ) const
inline

◆ getMap() [1/2]

template<typename MapType >
MapType & dart::common::CloneableMap< MapType >::getMap
inherited

Get the map that is being held.

◆ getMap() [2/2]

template<typename MapType >
const MapType & dart::common::CloneableMap< MapType >::getMap
inherited

Get the map that is being held.

◆ getOrCreate()

template<typename MapType , template< class > class GetData>
template<class AspectT , typename... Args>
GetData<AspectT>::Type& dart::common::detail::CompositeData< MapType, GetData >::getOrCreate ( Args &&...  args)
inline

◆ has()

template<typename MapType , template< class > class GetData>
template<class AspectT >
bool dart::common::detail::CompositeData< MapType, GetData >::has ( ) const
inline

◆ merge() [1/2]

template<typename MapType >
void dart::common::CloneableMap< MapType >::merge ( const CloneableMap< MapType > &  otherMap)
inherited

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).

◆ merge() [2/2]

template<typename MapType >
void dart::common::CloneableMap< MapType >::merge ( const MapType &  otherMap)
inherited

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).

Member Data Documentation

◆ mMap

template<typename MapType >
MapType dart::common::CloneableMap< MapType >::mMap
protectedinherited

A map containing the collection of States for the Aspect.