Computer Assisted Medical Intervention Tool Kit  version 5.2
SimulatorFactory Class Reference

A factory to create Simulator. More...

#include <SimulatorFactory.h>

+ Collaboration diagram for SimulatorFactory:

Public Member Functions

SimulatorcreateSimulator (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...
 
SimulatorcreateSimulator (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 SimulatorFactorygetInstance ()
 return the unique instance of the factory More...
 

Detailed Description

A factory to create Simulator.

Member Function Documentation

◆ createSimulator() [1/2]

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.

◆ createSimulator() [2/2]

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.

◆ getInstance()

SimulatorFactory * SimulatorFactory::getInstance ( )
static

return the unique instance of the factory

Referenced by MonitoringManagerFactory::createManager().

+ Here is the caller graph for this function:

◆ getInteractiveSimulator()

std::string SimulatorFactory::getInteractiveSimulator ( const unsigned int  index)

get a interactive simulator name by its index

◆ getNonInteractiveSimulator()

std::string SimulatorFactory::getNonInteractiveSimulator ( const unsigned int  index)

get a non interactive simulator name by its index

◆ getNumberOfInteractiveSimulators()

int SimulatorFactory::getNumberOfInteractiveSimulators ( )

give the number of interactive simulators registered

◆ getNumberOfNonInteractiveSimulators()

int SimulatorFactory::getNumberOfNonInteractiveSimulators ( )

give the number of interactive simulators registered

◆ isInteractive()

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:

◆ isRegistered()

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:

◆ registerClass()

template<typename C >
bool SimulatorFactory::registerClass ( std::string  id,
bool  isInteractive 
)
inline

Register a class into the map A registered class can be created using createMonitorDisplay()

Parameters
Ca subclass of Simulator
idunique id to associate with the Class C

The documentation for this class was generated from the following files: