dart
Public Types | Public Member Functions | List of all members
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.

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.


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