VSM C++ SDK
Vehicle Specific Modules SDK
ugcs::vsm::internal::Singleton_creator< T, class > Class Template Reference

Helper class for singletons instantiation. More...

#include <singleton.h>

Static Public Member Functions

static std::shared_ptr< T > Create ()
 Get singleton instance for a class which does not have default constructor. More...
 
template<typename... Args>
static std::shared_ptr< T > Create (Args &&...args)
 Create singleton instance. More...
 

Detailed Description

template<class T, class = void>
class ugcs::vsm::internal::Singleton_creator< T, class >

Helper class for singletons instantiation.

It deals with classes both having and not having default constructor.

Member Function Documentation

template<class T , class = void>
static std::shared_ptr<T> ugcs::vsm::internal::Singleton_creator< T, class >::Create ( )
inlinestatic

Get singleton instance for a class which does not have default constructor.

It is never created without arguments, so return null.

template<class T , class = void>
template<typename... Args>
static std::shared_ptr<T> ugcs::vsm::internal::Singleton_creator< T, class >::Create ( Args &&...  args)
inlinestatic

Create singleton instance.

Parameters
argsArguments for singleton class constructor.
Returns
Pointer to the created object.

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