DART  6.10.1
dart::common::FactoryRegistrar< KeyT, BaseT, DerivedT, HeldT, Args > Class Template Referencefinal

Helper class to register a object creator function to the Singleton. More...

#include <Factory.hpp>

Public Types

using This = FactoryRegistrar< KeyT, BaseT, DerivedT, HeldT >
 
using FactoryType = Factory< KeyT, BaseT, HeldT, Args... >
 
using SingletonFactory = Singleton< FactoryType >
 
using Creator = typename FactoryType::Creator
 

Public Member Functions

 FactoryRegistrar (const KeyT &key, Creator creator)
 Constructor. More...
 
 FactoryRegistrar (const KeyT &key)
 Constructor. More...
 

Detailed Description

template<typename KeyT, typename BaseT, typename DerivedT, typename HeldT = std::shared_ptr<BaseT>, typename... Args>
class dart::common::FactoryRegistrar< KeyT, BaseT, DerivedT, HeldT, Args >

Helper class to register a object creator function to the Singleton.

Member Typedef Documentation

◆ Creator

template<typename KeyT , typename BaseT , typename DerivedT , typename HeldT = std::shared_ptr<BaseT>, typename... Args>
using dart::common::FactoryRegistrar< KeyT, BaseT, DerivedT, HeldT, Args >::Creator = typename FactoryType::Creator

◆ FactoryType

template<typename KeyT , typename BaseT , typename DerivedT , typename HeldT = std::shared_ptr<BaseT>, typename... Args>
using dart::common::FactoryRegistrar< KeyT, BaseT, DerivedT, HeldT, Args >::FactoryType = Factory<KeyT, BaseT, HeldT, Args...>

◆ SingletonFactory

template<typename KeyT , typename BaseT , typename DerivedT , typename HeldT = std::shared_ptr<BaseT>, typename... Args>
using dart::common::FactoryRegistrar< KeyT, BaseT, DerivedT, HeldT, Args >::SingletonFactory = Singleton<FactoryType>

◆ This

template<typename KeyT , typename BaseT , typename DerivedT , typename HeldT = std::shared_ptr<BaseT>, typename... Args>
using dart::common::FactoryRegistrar< KeyT, BaseT, DerivedT, HeldT, Args >::This = FactoryRegistrar<KeyT, BaseT, DerivedT, HeldT>

Constructor & Destructor Documentation

◆ FactoryRegistrar() [1/2]

template<typename KeyT , typename BaseT , typename DerivedT , typename HeldT , typename... Args>
dart::common::FactoryRegistrar< KeyT, BaseT, DerivedT, HeldT, Args >::FactoryRegistrar ( const KeyT &  key,
Creator  creator 
)

Constructor.

Interanlly, this constructor registers Derived class with the key and the default creator function.

◆ FactoryRegistrar() [2/2]

template<typename KeyT , typename BaseT , typename DerivedT , typename HeldT , typename... Args>
dart::common::FactoryRegistrar< KeyT, BaseT, DerivedT, HeldT, Args >::FactoryRegistrar ( const KeyT &  key)
explicit

Constructor.

Interanlly, this constructor registers Derived class with the key and the default creator function.