Graphitti
A toolkit/software architecture to ease creating high-performance neural network simulators
Loading...
Searching...
No Matches
Factory< T > Class Template Reference

Public Member Functions

std::unique_ptr< T > createType (const std::string &className)
 
 Factory (const Factory &factory)=delete
 Delete copy and move methods to avoid copy instances of the singleton.
 
Factoryoperator= (const Factory &factory)=delete
 
 Factory (Factory &&factory)=delete
 
Factoryoperator= (Factory &&factory)=delete
 

Static Public Member Functions

static FactorygetInstance ()
 

Detailed Description

template<typename T>
class Factory< T >

Definition at line 84 of file Factory.h.

Member Function Documentation

◆ createType()

template<typename T >
std::unique_ptr< T > Factory< T >::createType ( const std::string & className)
inline
Parameters
classNameclass name.
Returns
Unique pointer to an instance if className is found in createFunctionsMap map, nullptr otherwise.

Definition at line 103 of file Factory.h.

◆ getInstance()

template<typename T >
static Factory & Factory< T >::getInstance ( )
inlinestatic

Acts as constructor, returns the instance of singleton object for the instantiated type.

Definition at line 91 of file Factory.h.


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