7 #ifndef REACTOR_FACTORY_H
8 #define REACTOR_FACTORY_H
22 static ReactorFactory* factory() {
23 ScopedLock lock(reactor_mutex);
25 s_factory =
new ReactorFactory;
30 virtual void deleteFactory() {
31 ScopedLock lock(reactor_mutex);
40 virtual ReactorBase* newReactor(
int n);
41 virtual ReactorBase* newReactor(
const std::string& reactorType);
44 static ReactorFactory* s_factory;
45 static mutex_t reactor_mutex;
49 inline ReactorBase* newReactor(
const std::string& model,
53 f = ReactorFactory::factory();
55 return f->newReactor(model);
Base class for factories.
File contains the FactoryBase class declarations.