27 #ifndef SIMULATOR_SIMULATORFACTORY_H 28 #define SIMULATOR_SIMULATORFACTORY_H 55 if (mapObjectCreator.find(
id) != mapObjectCreator.end()) {
59 mapObjectCreator.insert(std::pair<std::string, CreateSimulatorFunctionPointer>(
id, &createTheSimulator<C>));
60 mapObjectCreator2.insert(std::pair<std::string, CreateSimulatorFunctionPointer2>(
id, &createTheSimulator2<C>));
61 mapInteractive.insert(std::pair<std::string, bool>(
id, isInteractive));
63 interactiveSimulators.push_back(
id);
66 nonInteractiveSimulators.push_back(
id);
73 bool isRegistered(std::string
id);
82 int getNumberOfInteractiveSimulators();
85 int getNumberOfNonInteractiveSimulators();
88 std::string getInteractiveSimulator(
const unsigned int index);
91 std::string getNonInteractiveSimulator(
const unsigned int index);
94 bool isInteractive(std::string
id);
121 return new C(monitoringManager);
135 return new C(monitoringManager, file);
153 #endif // SIMULATOR_SIMULATORFACTORY_H std::map< std::string, bool > mapInteractive
map between Simulator name as string to booleen, true if interactive
Definition: SimulatorFactory.h:139
std::map< std::string, CreateSimulatorFunctionPointer2 > mapObjectCreator2
A map between Simulator name as string to functions (for the 2nd constructor that uses a simulator fi...
Definition: SimulatorFactory.h:108
A factory to create Simulator.
Definition: SimulatorFactory.h:40
std::vector< std::string > interactiveSimulators
list of interactive simulators
Definition: SimulatorFactory.h:142
static Simulator * createTheSimulator2(MonitoringManager *monitoringManager, const char *file)
map the simulator name with the 2 parameters constructor (using the given specific simulator file) ...
Definition: SimulatorFactory.h:134
A simulator engine is used to compute the displacements of all atoms of the model.
Definition: Simulator.h:46
bool registerClass(std::string id, bool isInteractive)
Register a class into the map A registered class can be created using createMonitorDisplay() ...
Definition: SimulatorFactory.h:54
Manager of the benchmark tests.
Definition: MonitoringManager.h:50
std::map< std::string, CreateSimulatorFunctionPointer > mapObjectCreator
A map between Simulator name as string to functions.
Definition: SimulatorFactory.h:105
static SimulatorFactory * instance
unique instance of the factory
Definition: SimulatorFactory.h:148
std::vector< std::string > nonInteractiveSimulators
list of non interactive simulators
Definition: SimulatorFactory.h:145
static Simulator * createTheSimulator(MonitoringManager *monitoringManager)
map the simulator name with the 1 parameter constructor.
Definition: SimulatorFactory.h:120
#define MML_API
Definition: MMLAPI.h:43