dart
Public Member Functions | Static Public Member Functions | List of all members
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 >:
Inheritance graph
[legend]
Collaboration diagram for dart::common::CompositeJoiner< Base1, Base2 >:
Collaboration graph
[legend]

Public Member Functions

 CompositeJoiner ()=default
 Default constructor.
 
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/3]

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() [2/3]

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() [3/3]

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.


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