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);
42 virtual ReactorBase* newReactor(
int n);
43 virtual ReactorBase* newReactor(
const std::string& reactorType);
46 static ReactorFactory* s_factory;
47 static mutex_t reactor_mutex;
51 inline ReactorBase* newReactor(
const std::string& model,
55 f = ReactorFactory::factory();
57 return f->newReactor(model);
Base class for factories.
File contains the FactoryBase class declarations.