Computer Assisted Medical Intervention Tool Kit  version 6.0
Loading...
Searching...
No Matches
SimulatorFactory Class Reference

A factory to create Simulator. More...

#include <SimulatorFactory.h>

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.
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.
std::string getInteractiveSimulator (const unsigned int index)
 get a interactive simulator name by its index
std::string getNonInteractiveSimulator (const unsigned int index)
 get a non interactive simulator name by its index
int getNumberOfInteractiveSimulators ()
 give the number of interactive simulators registered
int getNumberOfNonInteractiveSimulators ()
 give the number of interactive simulators registered
bool isInteractive (std::string id)
 return true if the registered simulator id is interactive
bool isRegistered (std::string id)
 Returns true if id is in the map.
template<typename C>
bool registerClass (std::string id, bool isInteractive)
 Register a class into the map A registered class can be created using createMonitorDisplay().

Static Public Member Functions

static SimulatorFactorygetInstance ()
 return the unique instance of the factory

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().

◆ 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(), and registerClass().

◆ isRegistered()

bool SimulatorFactory::isRegistered ( std::string id)

Returns true if id is in the map.

Referenced by MonitoringManagerFactory::createManager().

◆ 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().

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

References isInteractive().


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