Computer Assisted Medical Intervention Tool Kit  version 5.2
 
Loading...
Searching...
No Matches
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.
 
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().

+ 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: