2#include "TypeFactory.h"
8 boost::container::flat_map<id_and_hash, Module*>
modules_map;
12 template<
class ...args>
14 auto idnhash = std::make_pair(
id, type_id);
20 modules_map.insert(std::make_pair(idnhash, module));
Definition ModuleFactory.h:5
Module * removeModule(int id, size_t type_id)
boost::container::flat_map< id_and_hash, Module * > modules_map
Definition ModuleFactory.h:8
std::pair< int, size_t > id_and_hash
Definition ModuleFactory.h:7
TypeFactory< Module *, size_t, boost::function< Module *()> > factory
Definition ModuleFactory.h:6
Module * createModule(int id, size_t type_id, args &&... a)
Definition ModuleFactory.h:13
void registerType(size_t type_id, boost::function< Module *()> make)