dart
Classes | Public Types | Public Member Functions | Static Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | List of all members
dart::common::detail::EmbeddedPropertiesAspect< BaseT, DerivedT, PropertiesDataT, PropertiesT, setEmbeddedProperties, getEmbeddedProperties > Class Template Reference
Inheritance diagram for dart::common::detail::EmbeddedPropertiesAspect< BaseT, DerivedT, PropertiesDataT, PropertiesT, setEmbeddedProperties, getEmbeddedProperties >:
Inheritance graph
[legend]
Collaboration diagram for dart::common::detail::EmbeddedPropertiesAspect< BaseT, DerivedT, PropertiesDataT, PropertiesT, setEmbeddedProperties, getEmbeddedProperties >:
Collaboration graph
[legend]

Classes

struct  ConvertIfProperties
 Used to identify constructor arguments that can be used as Properties. More...
 

Public Types

using Base = BaseT
 
using Derived = DerivedT
 
using Properties = PropertiesT
 
using PropertiesData = PropertiesDataT
 

Public Member Functions

 EmbeddedPropertiesAspect (const EmbeddedPropertiesAspect &)=delete
 
 EmbeddedPropertiesAspect ()
 Construct this Aspect without affecting the Properties.
 
template<typename T , typename... RemainingArgs>
 EmbeddedPropertiesAspect (const T &arg1, RemainingArgs &&... remainingArgs)
 Construct this Aspect. More...
 
void setAspectProperties (const Aspect::Properties &properties) override final
 
void setProperties (const Properties &properties)
 
const Aspect::PropertiesgetAspectProperties () const override final
 
const Properties & getProperties () const
 
std::unique_ptr< AspectcloneAspect () const override
 

Static Public Attributes

static constexpr void(* SetEmbeddedProperties )(Derived *, const Properties &) = setEmbeddedProperties
 
static constexpr const Properties &(* GetEmbeddedProperties )(const Derived *) = getEmbeddedProperties
 

Protected Types

enum  DelegateTag { Delegate }
 

Protected Member Functions

template<typename... RemainingArgs>
 EmbeddedPropertiesAspect (DelegateTag, const PropertiesData &properties, RemainingArgs &&... remainingArgs)
 Construct this Aspect using the PropertiesData, and pass the remaining arguments into the constructor of the Base class. More...
 
template<typename... BaseArgs>
 EmbeddedPropertiesAspect (DelegateTag, BaseArgs &&... args)
 Construct this Aspect without affecting the Properties, and pass all the arguments into the constructor of the Base class. More...
 
void setComposite (Composite *newComposite) override
 Pass the temporary Properties of this Aspect into the new Composite.
 
void loseComposite (Composite *oldComposite) override
 Save the embedded Properties of this Composite before we remove the Aspect.
 

Protected Attributes

std::unique_ptr< Properties > mTemporaryProperties
 After this Aspect is constructed and during transitions between Composite objects, this will hold the Properties of the Aspect. More...
 

Constructor & Destructor Documentation

◆ EmbeddedPropertiesAspect() [1/3]

template<class BaseT, class DerivedT, typename PropertiesDataT, typename PropertiesT = common::Aspect::MakeProperties<PropertiesDataT>, void(*)(DerivedT *, const PropertiesT &) setEmbeddedProperties = &DefaultSetEmbeddedProperties<DerivedT, PropertiesT>, const PropertiesT &(*)(const DerivedT *) getEmbeddedProperties = &DefaultGetEmbeddedProperties<DerivedT, PropertiesT>>
template<typename T , typename... RemainingArgs>
dart::common::detail::EmbeddedPropertiesAspect< BaseT, DerivedT, PropertiesDataT, PropertiesT, setEmbeddedProperties, getEmbeddedProperties >::EmbeddedPropertiesAspect ( const T &  arg1,
RemainingArgs &&...  remainingArgs 
)
inline

Construct this Aspect.

If the first argument contains PropertiesData, then it will be used by this Aspect. Otherwise, all arguments will be forwarded to the Base class.

◆ EmbeddedPropertiesAspect() [2/3]

template<class BaseT, class DerivedT, typename PropertiesDataT, typename PropertiesT = common::Aspect::MakeProperties<PropertiesDataT>, void(*)(DerivedT *, const PropertiesT &) setEmbeddedProperties = &DefaultSetEmbeddedProperties<DerivedT, PropertiesT>, const PropertiesT &(*)(const DerivedT *) getEmbeddedProperties = &DefaultGetEmbeddedProperties<DerivedT, PropertiesT>>
template<typename... RemainingArgs>
dart::common::detail::EmbeddedPropertiesAspect< BaseT, DerivedT, PropertiesDataT, PropertiesT, setEmbeddedProperties, getEmbeddedProperties >::EmbeddedPropertiesAspect ( DelegateTag  ,
const PropertiesData &  properties,
RemainingArgs &&...  remainingArgs 
)
inlineprotected

Construct this Aspect using the PropertiesData, and pass the remaining arguments into the constructor of the Base class.

◆ EmbeddedPropertiesAspect() [3/3]

template<class BaseT, class DerivedT, typename PropertiesDataT, typename PropertiesT = common::Aspect::MakeProperties<PropertiesDataT>, void(*)(DerivedT *, const PropertiesT &) setEmbeddedProperties = &DefaultSetEmbeddedProperties<DerivedT, PropertiesT>, const PropertiesT &(*)(const DerivedT *) getEmbeddedProperties = &DefaultGetEmbeddedProperties<DerivedT, PropertiesT>>
template<typename... BaseArgs>
dart::common::detail::EmbeddedPropertiesAspect< BaseT, DerivedT, PropertiesDataT, PropertiesT, setEmbeddedProperties, getEmbeddedProperties >::EmbeddedPropertiesAspect ( DelegateTag  ,
BaseArgs &&...  args 
)
inlineprotected

Construct this Aspect without affecting the Properties, and pass all the arguments into the constructor of the Base class.

Member Data Documentation

◆ mTemporaryProperties

template<class BaseT, class DerivedT, typename PropertiesDataT, typename PropertiesT = common::Aspect::MakeProperties<PropertiesDataT>, void(*)(DerivedT *, const PropertiesT &) setEmbeddedProperties = &DefaultSetEmbeddedProperties<DerivedT, PropertiesT>, const PropertiesT &(*)(const DerivedT *) getEmbeddedProperties = &DefaultGetEmbeddedProperties<DerivedT, PropertiesT>>
std::unique_ptr<Properties> dart::common::detail::EmbeddedPropertiesAspect< BaseT, DerivedT, PropertiesDataT, PropertiesT, setEmbeddedProperties, getEmbeddedProperties >::mTemporaryProperties
protected

After this Aspect is constructed and during transitions between Composite objects, this will hold the Properties of the Aspect.

Once the Aspect has been moved into a new Composite, these Properties will be pushed into the Composite and cleared.


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