dart
|
Classes | |
struct | Data |
Public Types | |
using | State = Aspect::MakeState< Data > |
using | Properties = Aspect::MakeProperties< Data > |
![]() | |
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 | |
StatefulAspect (const StatefulAspect &other) | |
StatefulAspect (const T &state) | |
StatefulAspect (const T &state, const T &properties) | |
std::unique_ptr< Aspect > | cloneAspect () const override final |
Clone this Aspect into a new composite. | |
void | setAspectState (const Aspect::State &otherState) override |
Set the State of this Aspect. By default, this does nothing. | |
const Aspect::State * | getAspectState () const override |
Get the State of this Aspect. More... | |
void | setAspectProperties (const Aspect::Properties &someProperties) override |
Set the Properties of this Aspect. By default, this does nothing. | |
const Aspect::Properties * | getAspectProperties () const override |
Get the Properties of this Aspect. More... | |
void | randomize () |
![]() | |
virtual | ~Aspect ()=default |
Virtual destructor. | |
![]() | |
virtual | ~Subject () |
Destructor will notify all Observers that it is destructing. | |
Public Attributes | |
State | mState |
Properties | mProperties |
Additional Inherited Members | |
![]() | |
virtual void | setComposite (Composite *newComposite) |
This function will be triggered (1) after the Aspect has been created [transfer will be false] and (2) after the Aspect has been transferred to a new Composite [transfer will be true]. More... | |
virtual void | loseComposite (Composite *oldComposite) |
This function will be triggered if your Aspect is about to be removed from its Composite. More... | |
![]() | |
void | sendDestructionNotification () const |
Send a destruction notification to all Observers. More... | |
void | addObserver (Observer *_observer) const |
Add an Observer to the list of Observers. | |
void | removeObserver (Observer *_observer) const |
Remove an Observer from the list of Observers. | |
![]() | |
std::set< Observer * > | mObservers |
List of current Observers. | |
|
inlineoverridevirtual |
Get the Properties of this Aspect.
By default, this returns a nullptr which implies that the Aspect has no properties.
Reimplemented from dart::common::Aspect.
|
inlineoverridevirtual |
Get the State of this Aspect.
By default, this returns a nullptr which implies that the Aspect is stateless.
Reimplemented from dart::common::Aspect.