DART  6.6.2
dart::common::CompositeJoiner< Base1, Base2 > Class Template Reference

CompositeJoiner allows classes that inherit from various SpecializedForAspect types to be inherited by a single derived class. More...

#include <CompositeJoiner.hpp>

Inheritance diagram for dart::common::CompositeJoiner< Base1, Base2 >:

Public Member Functions

 CompositeJoiner ()=default
 Default constructor. More...
 
virtual ~CompositeJoiner ()=default
 
template<typename Base1Arg , typename... Base2Args>
 CompositeJoiner (Base1Arg &&arg1, Base2Args &&... args2)
 This constructor allows one argument to be passed to the Base1 constructor and arbitrarily many arguments to be passed to the Base2 constructor. More...
 
template<typename Base1Arg >
 CompositeJoiner (Base1Arg &&arg1, NoArgTag)
 This constructor passes one argument to the Base1 constructor and no arguments to the Base2 constructor. More...
 
template<typename... Base2Args>
 CompositeJoiner (NoArgTag, Base2Args &&... args2)
 This constructor passes no arguments to the Base1 constructor and arbitrarily many arguments to the Base2 constructor. More...
 
template<class T >
bool has () const
 
template<class T >
T * get ()
 
template<class T >
const T * get () const
 
template<class T >
void set (const T *aspect)
 
template<class T >
void set (std::unique_ptr< T > &&aspect)
 
template<class T , typename ... Args>
T * createAspect (Args &&... args)
 
template<class T >
void removeAspect ()
 
template<class T >
std::unique_ptr< T > releaseAspect ()
 

Static Public Member Functions

template<class T >
static constexpr bool isSpecializedFor ()
 

Detailed Description

template<class Base1, class Base2>
class dart::common::CompositeJoiner< Base1, Base2 >

CompositeJoiner allows classes that inherit from various SpecializedForAspect types to be inherited by a single derived class.

This class solves the diamond-of-death problem for multiple SpecializedForAspect inheritance.

Constructor & Destructor Documentation

◆ CompositeJoiner() [1/4]

template<class Base1 , class Base2 >
dart::common::CompositeJoiner< Base1, Base2 >::CompositeJoiner ( )
default

Default constructor.

◆ ~CompositeJoiner()

template<class Base1 , class Base2 >
virtual dart::common::CompositeJoiner< Base1, Base2 >::~CompositeJoiner ( )
virtualdefault

◆ CompositeJoiner() [2/4]

template<class Base1 , class Base2 >
template<typename Base1Arg , typename... Base2Args>
dart::common::CompositeJoiner< Base1, Base2 >::CompositeJoiner ( Base1Arg &&  arg1,
Base2Args &&...  args2 
)

This constructor allows one argument to be passed to the Base1 constructor and arbitrarily many arguments to be passed to the Base2 constructor.

◆ CompositeJoiner() [3/4]

template<class Base1 , class Base2 >
template<typename Base1Arg >
dart::common::CompositeJoiner< Base1, Base2 >::CompositeJoiner ( Base1Arg &&  arg1,
NoArgTag   
)

This constructor passes one argument to the Base1 constructor and no arguments to the Base2 constructor.

◆ CompositeJoiner() [4/4]

template<class Base1 , class Base2 >
template<typename... Base2Args>
dart::common::CompositeJoiner< Base1, Base2 >::CompositeJoiner ( NoArgTag  ,
Base2Args &&...  args2 
)

This constructor passes no arguments to the Base1 constructor and arbitrarily many arguments to the Base2 constructor.

Member Function Documentation

◆ createAspect()

template<class Base1 , class Base2 >
template<class T , typename ... Args>
T * dart::common::CompositeJoiner< Base1, Base2 >::createAspect ( Args &&...  args)

◆ get() [1/2]

template<class Base1 , class Base2 >
template<class T >
T * dart::common::CompositeJoiner< Base1, Base2 >::get

◆ get() [2/2]

template<class Base1 , class Base2 >
template<class T >
const T * dart::common::CompositeJoiner< Base1, Base2 >::get

◆ has()

template<class Base1 , class Base2 >
template<class T >
bool dart::common::CompositeJoiner< Base1, Base2 >::has

◆ isSpecializedFor()

template<class Base1 , class Base2 >
template<class T >
constexpr bool dart::common::CompositeJoiner< Base1, Base2 >::isSpecializedFor
staticconstexpr

◆ releaseAspect()

template<class Base1 , class Base2 >
template<class T >
std::unique_ptr< T > dart::common::CompositeJoiner< Base1, Base2 >::releaseAspect

◆ removeAspect()

template<class Base1 , class Base2 >
template<class T >
void dart::common::CompositeJoiner< Base1, Base2 >::removeAspect

◆ set() [1/2]

template<class Base1 , class Base2 >
template<class T >
void dart::common::CompositeJoiner< Base1, Base2 >::set ( const T *  aspect)

◆ set() [2/2]

template<class Base1 , class Base2 >
template<class T >
void dart::common::CompositeJoiner< Base1, Base2 >::set ( std::unique_ptr< T > &&  aspect)