Dragon - C++ API
A Computation Graph Virtual Machine Based Deep Learning Framework
Public Types | Public Member Functions | List of all members
dragon::Registry< SrcType, ObjType, Args > Class Template Reference

#include <registry.h>

Public Types

typedef std::function< ObjType *(Args ...)> Creator
 

Public Member Functions

void Register (const SrcType &key, Creator creator)
 
ObjType * Create (const SrcType &key, Args ... args)
 
bool Has (const SrcType &key)
 
vector< SrcType > keys ()
 

Member Typedef Documentation

◆ Creator

template<class SrcType, class ObjType, class... Args>
typedef std::function<ObjType*(Args ...)> dragon::Registry< SrcType, ObjType, Args >::Creator

Member Function Documentation

◆ Create()

template<class SrcType, class ObjType, class... Args>
ObjType* dragon::Registry< SrcType, ObjType, Args >::Create ( const SrcType &  key,
Args ...  args 
)
inline

◆ Has()

template<class SrcType, class ObjType, class... Args>
bool dragon::Registry< SrcType, ObjType, Args >::Has ( const SrcType &  key)
inline

◆ keys()

template<class SrcType, class ObjType, class... Args>
vector<SrcType> dragon::Registry< SrcType, ObjType, Args >::keys ( )
inline

◆ Register()

template<class SrcType, class ObjType, class... Args>
void dragon::Registry< SrcType, ObjType, Args >::Register ( const SrcType &  key,
Creator  creator 
)
inline

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