27 #ifndef SIMULATOR_SIMULATORFACTORY_H 28 #define SIMULATOR_SIMULATORFACTORY_H 55 if (mapObjectCreator.find(
id) != mapObjectCreator.end()) {
58 mapObjectCreator.insert( std::pair<std::string,CreateSimulatorFunctionPointer>(
id, &createTheSimulator<C> ) );
59 mapObjectCreator2.insert( std::pair<std::string,CreateSimulatorFunctionPointer2>(
id, &createTheSimulator2<C> ) );
60 mapInteractive.insert(std::pair<std::string,bool>(
id,isInteractive));
62 interactiveSimulators.push_back(
id);
64 nonInteractiveSimulators.push_back(
id);
70 bool isRegistered(std::string
id);
79 int getNumberOfInteractiveSimulators();
82 int getNumberOfNonInteractiveSimulators();
85 std::string getInteractiveSimulator(
const unsigned int index);
88 std::string getNonInteractiveSimulator(
const unsigned int index);
91 bool isInteractive(std::string
id);
118 return new C(monitoringManager);
132 return new C(monitoringManager,file);
150 #endif // SIMULATOR_SIMULATORFACTORY_H std::map< std::string, bool > mapInteractive
map between Simulator name as string to booleen, true if interactive
Definition: SimulatorFactory.h:136
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:105
A factory to create Simulator.
Definition: SimulatorFactory.h:40
std::vector< std::string > interactiveSimulators
list of interactive simulators
Definition: SimulatorFactory.h:139
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:131
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:102
static SimulatorFactory * instance
unique instance of the factory
Definition: SimulatorFactory.h:145
std::vector< std::string > nonInteractiveSimulators
list of non interactive simulators
Definition: SimulatorFactory.h:142
static Simulator * createTheSimulator(MonitoringManager *monitoringManager)
map the simulator name with the 1 parameter constructor.
Definition: SimulatorFactory.h:117
#define MML_API
Definition: MMLAPI.h:43