DART  6.10.1
dart::common::EmbeddedPropertiesAspect< CompositeT, PropertiesDataT > Class Template Reference

This is the implementation of a standard embedded-properties Aspect. More...

#include <EmbeddedAspect.hpp>

Inheritance diagram for dart::common::EmbeddedPropertiesAspect< CompositeT, PropertiesDataT >:
dart::common::detail::EmbeddedPropertiesAspect< CompositeTrackingAspect< CompositeT >, EmbeddedPropertiesAspect< CompositeT, PropertiesDataT >, PropertiesDataT > dart::common::CompositeTrackingAspect< CompositeT > dart::common::Aspect

Public Types

using Base = CompositeTrackingAspect< CompositeT >
 
using Derived = EmbeddedPropertiesAspect< CompositeT, PropertiesDataT >
 
using Impl = detail::EmbeddedPropertiesAspect< Base, Derived, PropertiesDataT >
 
using Properties = typename Impl::Properties
 
using PropertiesData = typename Impl::PropertiesData
 
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>
 EmbeddedPropertiesAspect (Args &&... args)
 
virtual ~EmbeddedPropertiesAspect ()=default
 
void setAspectProperties (const Aspect::Properties &properties) override final
 
void setProperties (const Properties &properties)
 
const Aspect::PropertiesgetAspectProperties () const override final
 
const PropertiesgetProperties () const
 
std::unique_ptr< AspectcloneAspect () 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 setAspectState (const State &otherState)
 Set the State of this Aspect. By default, this does nothing. More...
 
virtual const StategetAspectState () const
 Get the State of this Aspect. More...
 

Static Public Attributes

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

Protected Types

enum  DelegateTag
 

Protected Member Functions

void setComposite (Composite *newComposite) override
 Pass the temporary Properties of this Aspect into the new Composite. More...
 
void loseComposite (Composite *oldComposite) override
 Save the embedded Properties of this Composite before we remove the Aspect. More...
 

Protected Attributes

std::unique_ptr< PropertiesmTemporaryProperties
 After this Aspect is constructed and during transitions between Composite objects, this will hold the Properties of the Aspect. More...
 
CompositeT * mComposite
 Pointer to the current Composite of this Aspect. More...
 

Detailed Description

template<class CompositeT, typename PropertiesDataT>
class dart::common::EmbeddedPropertiesAspect< CompositeT, PropertiesDataT >

This is the implementation of a standard embedded-properties Aspect.

Inherit the EmbedProperties (next class down in the header) to use this Aspect implementation.

For more control over how your embedded-properties Aspect is implemented, you can use the detail::EmbeddedPropertiesAspect class.

Member Typedef Documentation

◆ Base

template<class CompositeT , typename PropertiesDataT >
using dart::common::EmbeddedPropertiesAspect< CompositeT, PropertiesDataT >::Base = CompositeTrackingAspect<CompositeT>

◆ Derived

template<class CompositeT , typename PropertiesDataT >
using dart::common::EmbeddedPropertiesAspect< CompositeT, PropertiesDataT >::Derived = EmbeddedPropertiesAspect<CompositeT, PropertiesDataT>

◆ Impl

template<class CompositeT , typename PropertiesDataT >
using dart::common::EmbeddedPropertiesAspect< CompositeT, PropertiesDataT >::Impl = detail::EmbeddedPropertiesAspect<Base, Derived, PropertiesDataT>

◆ MakeProperties

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

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

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

◆ Properties

template<class CompositeT , typename PropertiesDataT >
using dart::common::EmbeddedPropertiesAspect< CompositeT, PropertiesDataT >::Properties = typename Impl::Properties

◆ PropertiesData

template<class CompositeT , typename PropertiesDataT >
using dart::common::EmbeddedPropertiesAspect< CompositeT, PropertiesDataT >::PropertiesData = typename Impl::PropertiesData

Member Enumeration Documentation

◆ DelegateTag

Constructor & Destructor Documentation

◆ EmbeddedPropertiesAspect()

template<class CompositeT , typename PropertiesDataT >
template<typename... Args>
dart::common::EmbeddedPropertiesAspect< CompositeT, PropertiesDataT >::EmbeddedPropertiesAspect ( Args &&...  args)
inline

◆ ~EmbeddedPropertiesAspect()

Member Function Documentation

◆ cloneAspect()

std::unique_ptr<Aspect> dart::common::detail::EmbeddedPropertiesAspect< CompositeTrackingAspect< CompositeT > , EmbeddedPropertiesAspect< CompositeT, PropertiesDataT > , PropertiesDataT, common::Aspect::MakeProperties<PropertiesDataT> , &DefaultSetEmbeddedProperties<EmbeddedPropertiesAspect< CompositeT, PropertiesDataT > , common::Aspect::MakeProperties<PropertiesDataT> > , &DefaultGetEmbeddedProperties<EmbeddedPropertiesAspect< CompositeT, PropertiesDataT > , common::Aspect::MakeProperties<PropertiesDataT> > >::cloneAspect ( ) const
inlineoverridevirtualinherited

Implements dart::common::Aspect.

◆ getAspectProperties()

const Aspect::Properties* dart::common::detail::EmbeddedPropertiesAspect< CompositeTrackingAspect< CompositeT > , EmbeddedPropertiesAspect< CompositeT, PropertiesDataT > , PropertiesDataT, common::Aspect::MakeProperties<PropertiesDataT> , &DefaultSetEmbeddedProperties<EmbeddedPropertiesAspect< CompositeT, PropertiesDataT > , common::Aspect::MakeProperties<PropertiesDataT> > , &DefaultGetEmbeddedProperties<EmbeddedPropertiesAspect< CompositeT, PropertiesDataT > , common::Aspect::MakeProperties<PropertiesDataT> > >::getAspectProperties ( ) const
inlinefinaloverridevirtualinherited

Reimplemented from dart::common::Aspect.

◆ getAspectState()

◆ getComposite() [1/2]

CompositeT * dart::common::CompositeTrackingAspect< CompositeT >::getComposite
inherited

Get the Composite of this Aspect.

◆ getComposite() [2/2]

const CompositeT * dart::common::CompositeTrackingAspect< CompositeT >::getComposite
inherited

Get the Composite of this Aspect.

◆ getProperties()

const Properties& dart::common::detail::EmbeddedPropertiesAspect< CompositeTrackingAspect< CompositeT > , EmbeddedPropertiesAspect< CompositeT, PropertiesDataT > , PropertiesDataT, common::Aspect::MakeProperties<PropertiesDataT> , &DefaultSetEmbeddedProperties<EmbeddedPropertiesAspect< CompositeT, PropertiesDataT > , common::Aspect::MakeProperties<PropertiesDataT> > , &DefaultGetEmbeddedProperties<EmbeddedPropertiesAspect< CompositeT, PropertiesDataT > , common::Aspect::MakeProperties<PropertiesDataT> > >::getProperties ( ) const
inlineinherited

◆ hasComposite()

bool dart::common::CompositeTrackingAspect< CompositeT >::hasComposite
inherited

Returns true if this Aspect has a Composite that matches CompositeType.

◆ loseComposite()

void dart::common::detail::EmbeddedPropertiesAspect< CompositeTrackingAspect< CompositeT > , EmbeddedPropertiesAspect< CompositeT, PropertiesDataT > , PropertiesDataT, common::Aspect::MakeProperties<PropertiesDataT> , &DefaultSetEmbeddedProperties<EmbeddedPropertiesAspect< CompositeT, PropertiesDataT > , common::Aspect::MakeProperties<PropertiesDataT> > , &DefaultGetEmbeddedProperties<EmbeddedPropertiesAspect< CompositeT, PropertiesDataT > , common::Aspect::MakeProperties<PropertiesDataT> > >::loseComposite ( Composite oldComposite)
inlineoverrideprotectedvirtualinherited

Save the embedded Properties of this Composite before we remove the Aspect.

Reimplemented from dart::common::CompositeTrackingAspect< CompositeT >.

◆ setAspectProperties()

void dart::common::detail::EmbeddedPropertiesAspect< CompositeTrackingAspect< CompositeT > , EmbeddedPropertiesAspect< CompositeT, PropertiesDataT > , PropertiesDataT, common::Aspect::MakeProperties<PropertiesDataT> , &DefaultSetEmbeddedProperties<EmbeddedPropertiesAspect< CompositeT, PropertiesDataT > , common::Aspect::MakeProperties<PropertiesDataT> > , &DefaultGetEmbeddedProperties<EmbeddedPropertiesAspect< CompositeT, PropertiesDataT > , common::Aspect::MakeProperties<PropertiesDataT> > >::setAspectProperties ( const Aspect::Properties someProperties)
inlinefinaloverridevirtualinherited

Reimplemented from dart::common::Aspect.

◆ setAspectState()

◆ setComposite()

void dart::common::detail::EmbeddedPropertiesAspect< CompositeTrackingAspect< CompositeT > , EmbeddedPropertiesAspect< CompositeT, PropertiesDataT > , PropertiesDataT, common::Aspect::MakeProperties<PropertiesDataT> , &DefaultSetEmbeddedProperties<EmbeddedPropertiesAspect< CompositeT, PropertiesDataT > , common::Aspect::MakeProperties<PropertiesDataT> > , &DefaultGetEmbeddedProperties<EmbeddedPropertiesAspect< CompositeT, PropertiesDataT > , common::Aspect::MakeProperties<PropertiesDataT> > >::setComposite ( Composite newComposite)
inlineoverrideprotectedvirtualinherited

Pass the temporary Properties of this Aspect into the new Composite.

Reimplemented from dart::common::CompositeTrackingAspect< CompositeT >.

◆ setProperties()

void dart::common::detail::EmbeddedPropertiesAspect< CompositeTrackingAspect< CompositeT > , EmbeddedPropertiesAspect< CompositeT, PropertiesDataT > , PropertiesDataT, common::Aspect::MakeProperties<PropertiesDataT> , &DefaultSetEmbeddedProperties<EmbeddedPropertiesAspect< CompositeT, PropertiesDataT > , common::Aspect::MakeProperties<PropertiesDataT> > , &DefaultGetEmbeddedProperties<EmbeddedPropertiesAspect< CompositeT, PropertiesDataT > , common::Aspect::MakeProperties<PropertiesDataT> > >::setProperties ( const Properties properties)
inlineinherited

Member Data Documentation

◆ GetEmbeddedProperties

constexpr static const Properties&(* dart::common::detail::EmbeddedPropertiesAspect< CompositeTrackingAspect< CompositeT > , EmbeddedPropertiesAspect< CompositeT, PropertiesDataT > , PropertiesDataT, common::Aspect::MakeProperties<PropertiesDataT> , &DefaultSetEmbeddedProperties<EmbeddedPropertiesAspect< CompositeT, PropertiesDataT > , common::Aspect::MakeProperties<PropertiesDataT> > , &DefaultGetEmbeddedProperties<EmbeddedPropertiesAspect< CompositeT, PropertiesDataT > , common::Aspect::MakeProperties<PropertiesDataT> > >::GetEmbeddedProperties) (const Derived *)
staticconstexprinherited

◆ mComposite

CompositeT * dart::common::CompositeTrackingAspect< CompositeT >::mComposite
protectedinherited

Pointer to the current Composite of this Aspect.

◆ mTemporaryProperties

std::unique_ptr<Properties> dart::common::detail::EmbeddedPropertiesAspect< CompositeTrackingAspect< CompositeT > , EmbeddedPropertiesAspect< CompositeT, PropertiesDataT > , PropertiesDataT, common::Aspect::MakeProperties<PropertiesDataT> , &DefaultSetEmbeddedProperties<EmbeddedPropertiesAspect< CompositeT, PropertiesDataT > , common::Aspect::MakeProperties<PropertiesDataT> > , &DefaultGetEmbeddedProperties<EmbeddedPropertiesAspect< CompositeT, PropertiesDataT > , common::Aspect::MakeProperties<PropertiesDataT> > >::mTemporaryProperties
protectedinherited

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.

◆ SetEmbeddedProperties

constexpr static void(* dart::common::detail::EmbeddedPropertiesAspect< CompositeTrackingAspect< CompositeT > , EmbeddedPropertiesAspect< CompositeT, PropertiesDataT > , PropertiesDataT, common::Aspect::MakeProperties<PropertiesDataT> , &DefaultSetEmbeddedProperties<EmbeddedPropertiesAspect< CompositeT, PropertiesDataT > , common::Aspect::MakeProperties<PropertiesDataT> > , &DefaultGetEmbeddedProperties<EmbeddedPropertiesAspect< CompositeT, PropertiesDataT > , common::Aspect::MakeProperties<PropertiesDataT> > >::SetEmbeddedProperties) (Derived *, const Properties &)
staticconstexprinherited