dart
Public Types | Public Member Functions | Protected Attributes | List of all members
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 >:
Inheritance graph
[legend]
Collaboration diagram for dart::common::EmbedState< DerivedT, StateDataT >:
Collaboration graph
[legend]

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)
 
const AspectState & getAspectState () const
 

Protected Attributes

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

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

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.


The documentation for this class was generated from the following file: