DART  6.10.1
dart::common Namespace Reference

Namespaces

 detail
 
 signal
 

Classes

class  Aspect
 
class  CompositeTrackingAspect
 
class  AspectWithStateAndVersionedProperties
 
class  Cloneable
 Cloneable is a CRTP base class that provides an interface for easily creating data structures that are meant to be extended. More...
 
class  MakeCloneable
 The MakeCloneable class is used to easily create an Cloneable (such as Node::State) which simply takes an existing class (Mixin) and creates an Cloneable that wraps it. More...
 
class  ProxyCloneable
 
class  CloneableMap
 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...
 
class  CloneableVector
 The CloneableVector type wraps a std::vector of an Cloneable type allowing it to be handled by an CloneableMapHolder. More...
 
class  Composite
 Composite is a base class that should be virtually inherited by any class that wants to be able to manage Aspects. More...
 
class  CompositeJoiner
 Terminator for the variadic template. More...
 
class  CompositeJoiner< Base1 >
 Special case of only having 1 class: we do nothing but inherit it. More...
 
class  CompositeJoiner< Base1, Base2 >
 CompositeJoiner allows classes that inherit from various SpecializedForAspect types to be inherited by a single derived class. More...
 
class  CompositeJoiner< Base1, Base2, OtherBases... >
 This is the variadic version of the CompositeJoiner class which allows you to include arbitrarily many base classes in the joining. More...
 
class  EmbeddedStateAspect
 This is the implementation of a standard embedded-state Aspect. More...
 
class  EmbedState
 Inherit this class to embed a State into your Composite object. More...
 
class  EmbedStateOnTopOf
 This is an alternative to EmbedState which allows your class to also inherit other Composite objects by listing them as the third (and later) template arguments. More...
 
class  EmbeddedPropertiesAspect
 This is the implementation of a standard embedded-properties Aspect. More...
 
class  EmbedProperties
 Inherit this class to embed Properties into your Composite object. More...
 
class  EmbedPropertiesOnTopOf
 This is an alternative to EmbedProperties which allows your class to also inherit other Composite objects by listing them as the third (and later) template arguments. More...
 
class  EmbeddedStateAndPropertiesAspect
 This is the implementation of a standard combination of embedded-state and embedded-properties Aspect. More...
 
class  EmbedStateAndProperties
 Inherit this class to embed both State and Properties into your Composite object. More...
 
class  EmbedStateAndPropertiesOnTopOf
 This is an alternative to EmbedStateAndProperties which allows your class to also inherit other Composite objects by listing them as the fourth (and later) template arguments. More...
 
struct  Empty
 This is an empty structure which can be used as a template argument when a zero-cost placeholder is needed. More...
 
class  Factory
 Implementation of the Abstract Factory Pattern. More...
 
class  FactoryRegistrar
 Helper class to register a object creator function to the Singleton. More...
 
class  LocalResource
 
class  LocalResourceRetriever
 LocalResourceRetriever provides access to local resources specified by file:// URIs by wrapping the standard C and C++ file manipulation routines. More...
 
class  LockableReference
 LockableReference is a wrapper class of single or multiple Lockable object(s) to provide unified interface that guarantees deadlock-free locking and unlocking of the internal lockable(s). More...
 
class  SingleLockableReference
 This class references a single lockable. More...
 
class  MultiLockableReference
 MultiLockableReference references multiple lockables. More...
 
class  NameManager
 class NameManager More...
 
class  Observer
 The Observer class should be inherited by any class that wants to respond in a customized way to the destruction of a Subject. More...
 
class  ProxyStateAndPropertiesAspect
 
class  RequiresAspect
 RequiresAspect allows classes that inherit Composite to know which Aspects are required for their operation. More...
 
class  RequiresAspect< ReqAspect >
 
class  RequiresAspect< ReqAspect1, OtherReqAspects... >
 
class  Resource
 Resource provides file-like access to a resource loaded from URI. More...
 
class  ResourceRetriever
 ResourceRetriever provides methods for testing for the existance of and accessing the content of a resource specified by URI. More...
 
class  SharedLibrary
 SharedLibrary is a RAII object wrapping a shared library. More...
 
class  Connection
 class Connection More...
 
class  ScopedConnection
 class ScopedConnection More...
 
class  Signal
 
class  Signal< _Res(_ArgTypes...), Combiner >
 Signal implements a signal/slot mechanism. More...
 
class  Signal< void(_ArgTypes...)>
 Signal implements a signal/slot mechanism for the slots don't return a value. More...
 
class  SlotRegister
 SlotRegister can be used as a public member for connecting slots to a private Signal member. More...
 
class  Singleton
 Singleton template class. More...
 
class  SpecializedForAspect
 Declaration of the variadic template. More...
 
class  SpecializedForAspect< SpecAspect >
 SpecializedForAspect allows classes that inherit Composite to have constant-time access to a specific type of Aspect. More...
 
class  SpecializedForAspect< SpecAspect1, OtherSpecAspects... >
 This is the variadic version of the SpecializedForAspect class which allows you to include arbitrarily many specialized types in the specialization. More...
 
class  sub_ptr
 sub_ptr is a pointer to a Subject. More...
 
class  Subject
 The Subject class is a base class for any object that wants to report when it gets destroyed. More...
 
class  Timer
 The implementation of Timer class. More...
 
class  UriComponent
 
struct  Uri
 The Uri struct provides URI parsing and merging functionality based on RFC 3986. More...
 
class  VersionCounter
 VersionCounter is an interface for objects that count their versions. More...
 
class  Virtual
 This class is used to have CRTP functions inherit their template parameters virtually instead of directly. More...
 

Typedefs

template<class DerivedT , typename StateDataT , class CompositeT = Composite, void(*)(DerivedT *) updateState = &detail::NoOp<DerivedT*>>
using AspectWithState = detail::AspectWithState< CompositeTrackingAspect< CompositeT >, DerivedT, StateDataT, CompositeT, updateState >
 
template<class DerivedT , typename PropertiesDataT , class CompositeT = Composite, void(*)(DerivedT *) updateProperties = &detail::NoOp<DerivedT*>>
using AspectWithVersionedProperties = detail::AspectWithVersionedProperties< CompositeTrackingAspect< CompositeT >, DerivedT, PropertiesDataT, CompositeT, updateProperties >
 
using LocalResourceRetrieverPtr = std::shared_ptr< LocalResourceRetriever >
 
template<typename _Tp >
using aligned_vector = std::vector< _Tp, Eigen::aligned_allocator< _Tp > >
 
template<typename _Key , typename _Tp , typename _Compare = std::less<_Key>>
using aligned_map = std::map< _Key, _Tp, _Compare, Eigen::aligned_allocator< std::pair< const _Key, _Tp > >>
 
template<class T >
using optional = boost::optional< T >
 
template<class CompositeT , typename StateT >
using ProxyStateAspect = detail::ProxyStateAspect< common::CompositeTrackingAspect< CompositeT >, CompositeT, StateT >
 
template<class CompositeT , typename PropertiesT >
using ProxyPropertiesAspect = detail::ProxyPropertiesAspect< common::CompositeTrackingAspect< CompositeT >, CompositeT, PropertiesT >
 
using ResourcePtr = std::shared_ptr< Resource >
 
using ResourceRetrieverPtr = std::shared_ptr< ResourceRetriever >
 

Enumerations

enum  NoArgTag { NoArg }
 Used to tag arguments as blank for in variadic joiner classes such as common::CompositeJoiner and dynamics::NodeManagerJoiner. More...
 

Functions

template<typename ObjectType , class DataType , const DataType *(ObjectType::*)() const getData, typename ObjectMap = std::map<std::type_index, std::unique_ptr<ObjectType> >, typename DataMap = std::map<std::type_index, std::unique_ptr<DataType> >>
static void extractDataFromObjectTypeMap (DataMap &dataMap, const ObjectMap &objectMap)
 Type maps are std::map containers which map an object's Type Info to some instance or trait of that type. More...
 
template<typename ObjectType , class DataType , void(ObjectType::*)(const DataType &) setData, typename ObjectMap = std::map<std::type_index, std::unique_ptr<ObjectType> >, typename DataMap = std::map<std::type_index, std::unique_ptr<DataType> >>
static void setObjectsFromDataTypeMap (ObjectMap &objectMap, const DataMap &dataMap)
 Type maps are std::map containers which map an object's Type Info to some instance or trait of that type. More...
 
template<class T >
void createAspects (T *)
 Attach an arbitrary number of Aspects to the specified Composite type. More...
 
template<class T , class NextAspect , class... Aspects>
void createAspects (T *comp)
 
std::ostream & colorMsg (const std::string &_msg, int _color)
 
std::ostream & colorErr (const std::string &_msg, const std::string &_file, unsigned int _line, int _color)
 
template<typename _Tp , typename... _Args>
std::shared_ptr< _Tp > make_aligned_shared (_Args &&... __args)
 
template<typename T , typename... Args>
std::unique_ptr< T > make_unique (Args &&... args)
 
template<typename T >
static T getVectorObjectIfAvailable (std::size_t index, const std::vector< T > &vec)
 

Variables

template<class DerivedT , typename StateDataT , typename PropertiesDataT , class CompositeT , void(*)(DerivedT *) updateState, void(*)(DerivedT *) updateProperties>
constexpr void(* AspectWithStateAndVersionedProperties )(DerivedT *)
 

Typedef Documentation

◆ aligned_map

template<typename _Key , typename _Tp , typename _Compare = std::less<_Key>>
using dart::common::aligned_map = typedef std::map< _Key, _Tp, _Compare, Eigen::aligned_allocator<std::pair<const _Key, _Tp> >>

◆ aligned_vector

template<typename _Tp >
using dart::common::aligned_vector = typedef std::vector<_Tp, Eigen::aligned_allocator<_Tp> >

◆ AspectWithState

template<class DerivedT , typename StateDataT , class CompositeT = Composite, void(*)(DerivedT *) updateState = &detail::NoOp<DerivedT*>>
using dart::common::AspectWithState = typedef detail::AspectWithState< CompositeTrackingAspect<CompositeT>, DerivedT, StateDataT, CompositeT, updateState>

◆ AspectWithVersionedProperties

template<class DerivedT , typename PropertiesDataT , class CompositeT = Composite, void(*)(DerivedT *) updateProperties = &detail::NoOp<DerivedT*>>
using dart::common::AspectWithVersionedProperties = typedef detail::AspectWithVersionedProperties< CompositeTrackingAspect<CompositeT>, DerivedT, PropertiesDataT, CompositeT, updateProperties>

◆ LocalResourceRetrieverPtr

◆ optional

template<class T >
using dart::common::optional = typedef boost::optional<T>

◆ ProxyPropertiesAspect

template<class CompositeT , typename PropertiesT >
using dart::common::ProxyPropertiesAspect = typedef detail::ProxyPropertiesAspect< common::CompositeTrackingAspect<CompositeT>, CompositeT, PropertiesT>

◆ ProxyStateAspect

template<class CompositeT , typename StateT >
using dart::common::ProxyStateAspect = typedef detail::ProxyStateAspect< common::CompositeTrackingAspect<CompositeT>, CompositeT, StateT>

◆ ResourcePtr

using dart::common::ResourcePtr = typedef std::shared_ptr<Resource>

◆ ResourceRetrieverPtr

using dart::common::ResourceRetrieverPtr = typedef std::shared_ptr<ResourceRetriever>

Enumeration Type Documentation

◆ NoArgTag

Used to tag arguments as blank for in variadic joiner classes such as common::CompositeJoiner and dynamics::NodeManagerJoiner.

Enumerator
NoArg 

Function Documentation

◆ colorErr()

std::ostream & dart::common::colorErr ( const std::string &  _msg,
const std::string &  _file,
unsigned int  _line,
int  _color 
)

◆ colorMsg()

std::ostream & dart::common::colorMsg ( const std::string &  _msg,
int  _color 
)

◆ createAspects() [1/2]

template<class T >
void dart::common::createAspects ( T *  )

Attach an arbitrary number of Aspects to the specified Composite type.

◆ createAspects() [2/2]

template<class T , class NextAspect , class... Aspects>
void dart::common::createAspects ( T *  comp)

◆ extractDataFromObjectTypeMap()

template<typename ObjectType , class DataType , const DataType *(ObjectType::*)() const getData, typename ObjectMap = std::map<std::type_index, std::unique_ptr<ObjectType> >, typename DataMap = std::map<std::type_index, std::unique_ptr<DataType> >>
static void dart::common::extractDataFromObjectTypeMap ( DataMap &  dataMap,
const ObjectMap &  objectMap 
)
static

Type maps are std::map containers which map an object's Type Info to some instance or trait of that type.

For example, an ObjectMap will map an object's type to a std::unique_ptr of an instance of that object. a StateMap will map an Object's type to a std::unique_ptr of a State instance for that Object. Type maps are used for the dart::common::Aspect class.

This function will move data from an Object instance into a container where the data is sorted by the Object type that it belongs to. If the DataMap that is being filled with data already has an instance of the data for a particular Object type, it will perform a copy instead of a clone to improve performance.

◆ getVectorObjectIfAvailable()

template<typename T >
static T dart::common::getVectorObjectIfAvailable ( std::size_t  index,
const std::vector< T > &  vec 
)
static

◆ make_aligned_shared()

template<typename _Tp , typename... _Args>
std::shared_ptr< _Tp > dart::common::make_aligned_shared ( _Args &&...  __args)

◆ make_unique()

template<typename T , typename... Args>
std::unique_ptr< T > dart::common::make_unique ( Args &&...  args)
Deprecated:
Deprecated in 6.9. Use std::make_unique instead.

◆ setObjectsFromDataTypeMap()

template<typename ObjectType , class DataType , void(ObjectType::*)(const DataType &) setData, typename ObjectMap = std::map<std::type_index, std::unique_ptr<ObjectType> >, typename DataMap = std::map<std::type_index, std::unique_ptr<DataType> >>
static void dart::common::setObjectsFromDataTypeMap ( ObjectMap &  objectMap,
const DataMap &  dataMap 
)
static

Type maps are std::map containers which map an object's Type Info to some instance or trait of that type.

For example, an ObjectMap will map an object's type to a std::unique_ptr of an instance of that object. a StateMap will map an Object's type to a std::unique_ptr of a State instance for that Object. Type maps are used for the dart::common::Aspect class.

This function will take a type map of Data and pass its contents into the Objects contained in an ObjectMap for each corresponding Object type which is available.

Variable Documentation

◆ AspectWithStateAndVersionedProperties

template<class DerivedT , typename StateDataT , typename PropertiesDataT , class CompositeT , void(*)(DerivedT *) updateState, void(*)(DerivedT *) updateProperties>
constexpr void(* dart::common::AspectWithStateAndVersionedProperties)(DerivedT *) ( DerivedT *  )
constexpr