TorchCraftAI
A bot for machine learning research on StarCraft: Brood War
Classes | Public Types | Static Public Member Functions | List of all members
cherrypi::SubclassRegistry< Base, Args > Class Template Reference

#include <registry.h>

Classes

struct  SubclassInfo
 

Public Types

using Ctor = std::function< std::shared_ptr< Base >(Args...)>
 

Static Public Member Functions

static bool registerSubclass (std::type_index const &type, std::string const &name, Ctor ctor)
 
static SubclassInforecord (std::string const &name)
 
static std::vector< SubclassInfo * > subclasses ()
 
template<typename... CArgs>
static std::shared_ptr< Base > create (std::string const &name, CArgs &&...args)
 
static std::string name (std::type_index const &type)
 
template<typename Derived >
static std::string name ()
 

Member Typedef Documentation

template<typename Base , typename... Args>
using cherrypi::SubclassRegistry< Base, Args >::Ctor = std::function<std::shared_ptr<Base>(Args...)>

Member Function Documentation

template<typename Base , typename... Args>
template<typename... CArgs>
static std::shared_ptr<Base> cherrypi::SubclassRegistry< Base, Args >::create ( std::string const &  name,
CArgs &&...  args 
)
inlinestatic
template<typename Base , typename... Args>
static std::string cherrypi::SubclassRegistry< Base, Args >::name ( std::type_index const &  type)
inlinestatic
template<typename Base , typename... Args>
template<typename Derived >
static std::string cherrypi::SubclassRegistry< Base, Args >::name ( )
inlinestatic
template<typename Base , typename... Args>
static SubclassInfo* cherrypi::SubclassRegistry< Base, Args >::record ( std::string const &  name)
inlinestatic
template<typename Base , typename... Args>
static bool cherrypi::SubclassRegistry< Base, Args >::registerSubclass ( std::type_index const &  type,
std::string const &  name,
Ctor  ctor 
)
inlinestatic
template<typename Base , typename... Args>
static std::vector<SubclassInfo*> cherrypi::SubclassRegistry< Base, Args >::subclasses ( )
inlinestatic

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