DART  6.6.2
dart::common::EmbedState< DerivedT, StateDataT > Class Template Reference

Inherit this class to embed a State into your Composite object. More...

#include <EmbeddedAspect.hpp>

Inheritance diagram for dart::common::EmbedState< DerivedT, StateDataT >:
dart::common::RequiresAspect< common::EmbeddedStateAspect< DerivedT, StateDataT > >

Public Types

using Derived = DerivedT
 
using Aspect = common::EmbeddedStateAspect< Derived, StateDataT >
 
using AspectState = typename Aspect::State
 
using AspectStateData = typename Aspect::StateData
 
using Base = common::RequiresAspect< Aspect >
 

Public Member Functions

template<typename... Args>
 EmbedState (Args &&... args)
 
virtual ~EmbedState ()=default
 
const AspectStategetAspectState () const
 

Protected Attributes

AspectState mAspectState
 Aspect::State data, directly accessible to your derived class. More...
 

Detailed Description

template<class DerivedT, typename StateDataT>
class dart::common::EmbedState< DerivedT, StateDataT >

Inherit this class to embed a State into your Composite object.

DerivedT is the name of your class and StateDataT is a "plain-old data" structure that holds your state information.

Your derived class must implement the following functions:

void setAspectState(const AspectState& state);
typename Aspect::State AspectState
Definition: EmbeddedAspect.hpp:98

To embed both state and properties information, use EmbedStateAndProperties.

It is possible to customize the way an EmbeddedStateAspect interacts with your Composite by using the dart::common::detail::EmbeddedStateAspect class directly instead of inheriting this class.

Member Typedef Documentation

◆ Aspect

template<class DerivedT , typename StateDataT >
using dart::common::EmbedState< DerivedT, StateDataT >::Aspect = common::EmbeddedStateAspect<Derived, StateDataT>

◆ AspectState

template<class DerivedT , typename StateDataT >
using dart::common::EmbedState< DerivedT, StateDataT >::AspectState = typename Aspect::State

◆ AspectStateData

template<class DerivedT , typename StateDataT >
using dart::common::EmbedState< DerivedT, StateDataT >::AspectStateData = typename Aspect::StateData

◆ Base

template<class DerivedT , typename StateDataT >
using dart::common::EmbedState< DerivedT, StateDataT >::Base = common::RequiresAspect<Aspect>

◆ Derived

template<class DerivedT , typename StateDataT >
using dart::common::EmbedState< DerivedT, StateDataT >::Derived = DerivedT

Constructor & Destructor Documentation

◆ EmbedState()

template<class DerivedT , typename StateDataT >
template<typename... Args>
dart::common::EmbedState< DerivedT, StateDataT >::EmbedState ( Args &&...  args)
inline

◆ ~EmbedState()

template<class DerivedT , typename StateDataT >
virtual dart::common::EmbedState< DerivedT, StateDataT >::~EmbedState ( )
virtualdefault

Member Function Documentation

◆ getAspectState()

template<class DerivedT , typename StateDataT >
const AspectState& dart::common::EmbedState< DerivedT, StateDataT >::getAspectState ( ) const
inline

Member Data Documentation

◆ mAspectState

template<class DerivedT , typename StateDataT >
AspectState dart::common::EmbedState< DerivedT, StateDataT >::mAspectState
protected

Aspect::State data, directly accessible to your derived class.