dart
Classes | Public Types | Public Member Functions | Protected Member Functions | Friends | List of all members
dart::common::Aspect Class Referenceabstract
Inheritance diagram for dart::common::Aspect:
Inheritance graph
[legend]

Classes

class  Properties
 If your Aspect has Properties, then that Properties class should inherit this Aspect::Properties class. More...
 
class  State
 If your Aspect has a State, then that State class should inherit this Aspect::State class. More...
 

Public Types

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

virtual ~Aspect ()=default
 Virtual destructor.
 
virtual std::unique_ptr< AspectcloneAspect () const =0
 Clone this Aspect into a new composite.
 
virtual void setAspectState (const State &otherState)
 Set the State of this Aspect. By default, this does nothing.
 
virtual const StategetAspectState () const
 Get the State of this Aspect. More...
 
virtual void setAspectProperties (const Properties &someProperties)
 Set the Properties of this Aspect. By default, this does nothing.
 
virtual const PropertiesgetAspectProperties () const
 Get the Properties of this Aspect. More...
 

Protected Member Functions

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...
 

Friends

class Composite
 

Member Typedef Documentation

◆ MakeProperties

template<class Mixin >
using dart::common::Aspect::MakeProperties = MakeCloneable<Properties, Mixin>

Use the MakeProperties class to easily create a Properties extension from an existing class or struct.

◆ MakeState

template<class Mixin >
using dart::common::Aspect::MakeState = MakeCloneable<State, Mixin>

Use the MakeState class to easily create a State extension from an existing class or struct.

Member Function Documentation

◆ getAspectProperties()

const Aspect::Properties * dart::common::Aspect::getAspectProperties ( ) const
virtual

Get the Properties of this Aspect.

By default, this returns a nullptr which implies that the Aspect has no properties.

Reimplemented in StatefulAspect< T >.

◆ getAspectState()

const Aspect::State * dart::common::Aspect::getAspectState ( ) const
virtual

Get the State of this Aspect.

By default, this returns a nullptr which implies that the Aspect is stateless.

Reimplemented in StatefulAspect< T >.

◆ loseComposite()

void dart::common::Aspect::loseComposite ( Composite oldComposite)
protectedvirtual

◆ setComposite()

void dart::common::Aspect::setComposite ( Composite newComposite)
protectedvirtual

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