DART  6.10.1
dart::common::detail::AspectWithState< BaseT, DerivedT, StateDataT, CompositeT, updateState > Class Template Reference

AspectWithProtectedState generates implementations of the State managing functions for an Aspect class. More...

#include <AspectWithVersion.hpp>

Inheritance diagram for dart::common::detail::AspectWithState< BaseT, DerivedT, StateDataT, CompositeT, updateState >:
dart::common::detail::AspectWithVersionedProperties< AspectWithState< DerivedT, StateDataT, Composite, &detail::NoOp< DerivedT * > >, DerivedT, PropertiesDataT, Composite, &detail::NoOp< DerivedT * > > dart::common::AspectWithStateAndVersionedProperties< DerivedT, StateDataT, PropertiesDataT, CompositeT, updateState, updateProperties >

Public Types

using Base = BaseT
 
using Derived = DerivedT
 
using StateData = StateDataT
 
using CompositeType = CompositeT
 
using State = Aspect::MakeState< StateData >
 
using AspectImplementation = AspectWithState< Base, Derived, StateData, CompositeT, updateState >
 

Public Member Functions

 AspectWithState (const AspectWithState &)=delete
 
 AspectWithState (const StateData &state=StateData())
 Construct using a StateData instance. More...
 
template<typename... BaseArgs>
 AspectWithState (const StateData &state, BaseArgs &&... args)
 Construct this Aspect and pass args into the constructor of the Base class. More...
 
void setAspectState (const Aspect::State &otherState) override final
 
const Aspect::StategetAspectState () const override final
 
void setState (const StateData &state)
 Set the State of this Aspect. More...
 
const StategetState () const
 Get the State of this Aspect. More...
 
std::unique_ptr< AspectcloneAspect () const override
 

Static Public Attributes

constexpr static void(* UpdateState )(Derived *) = updateState
 

Protected Attributes

State mState
 State of this Aspect. More...
 

Detailed Description

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

AspectWithProtectedState generates implementations of the State managing functions for an Aspect class.

Member Typedef Documentation

◆ AspectImplementation

template<class BaseT , class DerivedT , typename StateDataT , class CompositeT = Composite, void(*)(DerivedT *) updateState = &NoOp<DerivedT*>>
using dart::common::detail::AspectWithState< BaseT, DerivedT, StateDataT, CompositeT, updateState >::AspectImplementation = AspectWithState<Base, Derived, StateData, CompositeT, updateState>

◆ Base

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

◆ CompositeType

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

◆ Derived

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

◆ State

template<class BaseT , class DerivedT , typename StateDataT , class CompositeT = Composite, void(*)(DerivedT *) updateState = &NoOp<DerivedT*>>
using dart::common::detail::AspectWithState< BaseT, DerivedT, StateDataT, CompositeT, updateState >::State = Aspect::MakeState<StateData>

◆ StateData

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

Constructor & Destructor Documentation

◆ AspectWithState() [1/3]

template<class BaseT , class DerivedT , typename StateDataT , class CompositeT = Composite, void(*)(DerivedT *) updateState = &NoOp<DerivedT*>>
dart::common::detail::AspectWithState< BaseT, DerivedT, StateDataT, CompositeT, updateState >::AspectWithState ( const AspectWithState< BaseT, DerivedT, StateDataT, CompositeT, updateState > &  )
delete

◆ AspectWithState() [2/3]

template<class BaseT , class DerivedT , typename StateDataT , class CompositeT = Composite, void(*)(DerivedT *) updateState = &NoOp<DerivedT*>>
dart::common::detail::AspectWithState< BaseT, DerivedT, StateDataT, CompositeT, updateState >::AspectWithState ( const StateData state = StateData())

Construct using a StateData instance.

◆ AspectWithState() [3/3]

template<class BaseT , class DerivedT , typename StateDataT , class CompositeT = Composite, void(*)(DerivedT *) updateState = &NoOp<DerivedT*>>
template<typename... BaseArgs>
dart::common::detail::AspectWithState< BaseT, DerivedT, StateDataT, CompositeT, updateState >::AspectWithState ( const StateData state,
BaseArgs &&...  args 
)
inline

Construct this Aspect and pass args into the constructor of the Base class.

Member Function Documentation

◆ cloneAspect()

template<class BaseT , class DerivedT , typename StateData , class CompositeT , void(*)(DerivedT *) updateState>
std::unique_ptr< Aspect > dart::common::detail::AspectWithState< BaseT, DerivedT, StateData, CompositeT, updateState >::cloneAspect
override

◆ getAspectState()

template<class BaseT , class DerivedT , typename StateData , class CompositeT , void(*)(DerivedT *) updateState>
const Aspect::State * dart::common::detail::AspectWithState< BaseT, DerivedT, StateData, CompositeT, updateState >::getAspectState
finaloverride

◆ getState()

template<class BaseT , class DerivedT , typename StateDataT , class CompositeT , void(*)(DerivedT *) updateState>
auto dart::common::detail::AspectWithState< BaseT, DerivedT, StateDataT, CompositeT, updateState >::getState

Get the State of this Aspect.

◆ setAspectState()

template<class BaseT , class DerivedT , typename StateData , class CompositeT , void(*)(DerivedT *) updateState>
void dart::common::detail::AspectWithState< BaseT, DerivedT, StateData, CompositeT, updateState >::setAspectState ( const Aspect::State otherState)
finaloverride

◆ setState()

template<class BaseT , class DerivedT , typename StateData , class CompositeT , void(*)(DerivedT *) updateState>
void dart::common::detail::AspectWithState< BaseT, DerivedT, StateData, CompositeT, updateState >::setState ( const StateData state)

Set the State of this Aspect.

Member Data Documentation

◆ mState

template<class BaseT , class DerivedT , typename StateDataT , class CompositeT = Composite, void(*)(DerivedT *) updateState = &NoOp<DerivedT*>>
State dart::common::detail::AspectWithState< BaseT, DerivedT, StateDataT, CompositeT, updateState >::mState
protected

State of this Aspect.

◆ UpdateState

template<class BaseT , class DerivedT , typename StateDataT , class CompositeT = Composite, void(*)(DerivedT *) updateState = &NoOp<DerivedT*>>
constexpr static void(* dart::common::detail::AspectWithState< BaseT, DerivedT, StateDataT, CompositeT, updateState >::UpdateState) (Derived *) = updateState
staticconstexpr