DART
6.7.3
|
This is the implementation of a standard embedded-state Aspect. More...
#include <EmbeddedAspect.hpp>
Public Types | |
using | Base = CompositeTrackingAspect< CompositeT > |
using | Derived = EmbeddedStateAspect< CompositeT, StateDataT > |
using | Impl = detail::EmbeddedStateAspect< Base, Derived, StateDataT > |
using | State = typename Impl::State |
using | StateData = typename Impl::StateData |
enum | DelegateTag |
template<class Mixin > | |
using | MakeState = MakeCloneable< State, Mixin > |
Use the MakeState class to easily create a State extension from an existing class or struct. More... | |
template<class Mixin > | |
using | MakeProperties = MakeCloneable< Properties, Mixin > |
Use the MakeProperties class to easily create a Properties extension from an existing class or struct. More... | |
Public Member Functions | |
template<typename... Args> | |
EmbeddedStateAspect (Args &&... args) | |
virtual | ~EmbeddedStateAspect ()=default |
void | setAspectState (const Aspect::State &state) override final |
void | setState (const State &state) |
Set the State of this Aspect. More... | |
const Aspect::State * | getAspectState () const override final |
const State & | getState () const |
Get the State of this Aspect. More... | |
std::unique_ptr< Aspect > | cloneAspect () const override |
CompositeT * | getComposite () |
Get the Composite of this Aspect. More... | |
const CompositeT * | getComposite () const |
Get the Composite of this Aspect. More... | |
bool | hasComposite () const |
Returns true if this Aspect has a Composite that matches CompositeType. More... | |
virtual void | setAspectProperties (const Properties &someProperties) |
Set the Properties of this Aspect. By default, this does nothing. More... | |
virtual const Properties * | getAspectProperties () const |
Get the Properties of this Aspect. More... | |
Static Public Attributes | |
constexpr static void(* | SetEmbeddedState )(Derived *, const State &) |
constexpr static const State &(* | GetEmbeddedState )(const Derived *) |
Protected Member Functions | |
void | setComposite (Composite *newComposite) override |
Pass the temporary State of this Aspect into the new Composite. More... | |
void | loseComposite (Composite *oldComposite) override |
Save the embedded State of this Composite before we remove the Aspect. More... | |
Protected Attributes | |
std::unique_ptr< State > | mTemporaryState |
After this Aspect is constructed and during transitions between Composite objects, this will hold the State of the Aspect. More... | |
CompositeT * | mComposite |
Pointer to the current Composite of this Aspect. More... | |
This is the implementation of a standard embedded-state Aspect.
Inherit the EmbedState class (next class down in the header) to use this Aspect implementation.
For more control over how your embedded-state Aspect is implemented, you can use the detail::EmbeddedStateAspect class.
using dart::common::EmbeddedStateAspect< CompositeT, StateDataT >::Base = CompositeTrackingAspect<CompositeT> |
using dart::common::EmbeddedStateAspect< CompositeT, StateDataT >::Derived = EmbeddedStateAspect<CompositeT, StateDataT> |
using dart::common::EmbeddedStateAspect< CompositeT, StateDataT >::Impl = detail::EmbeddedStateAspect<Base, Derived, StateDataT> |
|
inherited |
Use the MakeProperties class to easily create a Properties extension from an existing class or struct.
|
inherited |
Use the MakeState class to easily create a State extension from an existing class or struct.
using dart::common::EmbeddedStateAspect< CompositeT, StateDataT >::State = typename Impl::State |
using dart::common::EmbeddedStateAspect< CompositeT, StateDataT >::StateData = typename Impl::StateData |
|
inherited |
|
inline |
|
virtualdefault |
|
inlineoverridevirtualinherited |
Implements dart::common::Aspect.
|
virtualinherited |
Get the Properties of this Aspect.
By default, this returns a nullptr which implies that the Aspect has no properties.
Reimplemented in dart::common::detail::EmbeddedPropertiesAspect< detail::EmbeddedStateAspect< CompositeTrackingAspect< CompositeT >, EmbeddedStateAndPropertiesAspect< CompositeT, StateDataT, PropertiesDataT >, StateDataT >, EmbeddedStateAndPropertiesAspect< CompositeT, StateDataT, PropertiesDataT >, PropertiesDataT >, and dart::common::detail::EmbeddedPropertiesAspect< CompositeTrackingAspect< CompositeT >, EmbeddedPropertiesAspect< CompositeT, PropertiesDataT >, PropertiesDataT >.
|
inlinefinaloverridevirtualinherited |
Reimplemented from dart::common::Aspect.
|
inherited |
|
inherited |
|
inlineinherited |
Get the State of this Aspect.
|
inherited |
|
inlineoverrideprotectedvirtualinherited |
Save the embedded State of this Composite before we remove the Aspect.
Reimplemented from dart::common::CompositeTrackingAspect< CompositeT >.
|
virtualinherited |
Set the Properties of this Aspect. By default, this does nothing.
Reimplemented in dart::common::detail::EmbeddedPropertiesAspect< detail::EmbeddedStateAspect< CompositeTrackingAspect< CompositeT >, EmbeddedStateAndPropertiesAspect< CompositeT, StateDataT, PropertiesDataT >, StateDataT >, EmbeddedStateAndPropertiesAspect< CompositeT, StateDataT, PropertiesDataT >, PropertiesDataT >, and dart::common::detail::EmbeddedPropertiesAspect< CompositeTrackingAspect< CompositeT >, EmbeddedPropertiesAspect< CompositeT, PropertiesDataT >, PropertiesDataT >.
|
inlinefinaloverridevirtualinherited |
Reimplemented from dart::common::Aspect.
|
inlineoverrideprotectedvirtualinherited |
Pass the temporary State of this Aspect into the new Composite.
Reimplemented from dart::common::CompositeTrackingAspect< CompositeT >.
|
inlineinherited |
Set the State of this Aspect.
|
staticconstexprinherited |
|
protectedinherited |
|
protectedinherited |
|
staticconstexprinherited |