A factory to create Simulator. More...
#include <SimulatorFactory.h>
Collaboration diagram for SimulatorFactory:Public Member Functions | |
| Simulator * | createSimulator (std::string id, MonitoringManager *monitoringManager) |
| Creates a Simulator based on its string id or return nullptr if there is no id in the map. More... | |
| Simulator * | createSimulator (std::string id, MonitoringManager *monitoringManager, const char *file) |
| Creates a Simulator using a specific simulator file based on its string id or return nullptr if there is no id in the map. More... | |
| std::string | getInteractiveSimulator (const unsigned int index) |
| get a interactive simulator name by its index More... | |
| std::string | getNonInteractiveSimulator (const unsigned int index) |
| get a non interactive simulator name by its index More... | |
| int | getNumberOfInteractiveSimulators () |
| give the number of interactive simulators registered More... | |
| int | getNumberOfNonInteractiveSimulators () |
| give the number of interactive simulators registered More... | |
| bool | isInteractive (std::string id) |
| return true if the registered simulator id is interactive More... | |
| bool | isRegistered (std::string id) |
| Returns true if id is in the map. More... | |
| template<typename C > | |
| bool | registerClass (std::string id, bool isInteractive) |
| Register a class into the map A registered class can be created using createMonitorDisplay() More... | |
Static Public Member Functions | |
| static SimulatorFactory * | getInstance () |
| return the unique instance of the factory More... | |
A factory to create Simulator.
| Simulator * SimulatorFactory::createSimulator | ( | std::string | id, |
| MonitoringManager * | monitoringManager | ||
| ) |
Creates a Simulator based on its string id or return nullptr if there is no id in the map.
| Simulator * SimulatorFactory::createSimulator | ( | std::string | id, |
| MonitoringManager * | monitoringManager, | ||
| const char * | file | ||
| ) |
Creates a Simulator using a specific simulator file based on its string id or return nullptr if there is no id in the map.
|
static |
return the unique instance of the factory
Referenced by MonitoringManagerFactory::createManager().
Here is the caller graph for this function:| std::string SimulatorFactory::getInteractiveSimulator | ( | const unsigned int | index | ) |
get a interactive simulator name by its index
| std::string SimulatorFactory::getNonInteractiveSimulator | ( | const unsigned int | index | ) |
get a non interactive simulator name by its index
| int SimulatorFactory::getNumberOfInteractiveSimulators | ( | ) |
give the number of interactive simulators registered
| int SimulatorFactory::getNumberOfNonInteractiveSimulators | ( | ) |
give the number of interactive simulators registered
| bool SimulatorFactory::isInteractive | ( | std::string | id | ) |
return true if the registered simulator id is interactive
Referenced by MonitoringManagerFactory::createManager().
Here is the caller graph for this function:| bool SimulatorFactory::isRegistered | ( | std::string | id | ) |
Returns true if id is in the map.
Referenced by MonitoringManagerFactory::createManager().
Here is the caller graph for this function:
|
inline |
Register a class into the map A registered class can be created using createMonitorDisplay()
| C | a subclass of Simulator |
| id | unique id to associate with the Class C |