Computer Assisted Medical Intervention Tool Kit  version 5.2
MMLMonitorDisplayFactory Class Reference

A Factory for creating MMLMonitorDiplay. More...

#include <MMLMonitorDisplayFactory.h>

+ Collaboration diagram for MMLMonitorDisplayFactory:

Public Member Functions

MMLMonitorDisplaycreateMonitorDisplay (std::string id, Monitor *monitor, MMLComponent *manager)
 Creates an MMLMonitorDisplay based on its string id or return null if there is no id in the map. More...
 
std::string getDisplayByType (Monitor::type type, const unsigned int i)
 get a display name by its type and index More...
 
unsigned int getNumberOfDisplaysByType (Monitor::type type)
 give the number of displays registered for a specified type More...
 
bool isRegistered (std::string id)
 Returns true if id is in the map. More...
 
template<typename C >
bool registerClass (std::string id)
 Register a class into the map for classes wich can display every types of monitors. More...
 
template<typename C >
bool registerClass (std::string id, Monitor::type type)
 Register a class into the map A registered class can be created using createMonitorDisplay(). More...
 

Static Public Member Functions

static MMLMonitorDisplayFactorygetInstance ()
 return the unique instance of the factory More...
 

Detailed Description

A Factory for creating MMLMonitorDiplay.

Member Function Documentation

◆ createMonitorDisplay()

MMLMonitorDisplay * MMLMonitorDisplayFactory::createMonitorDisplay ( std::string  id,
Monitor monitor,
MMLComponent manager 
)

Creates an MMLMonitorDisplay based on its string id or return null if there is no id in the map.

Referenced by MMLDisplay::connectMonitor().

+ Here is the caller graph for this function:

◆ getDisplayByType()

std::string MMLMonitorDisplayFactory::getDisplayByType ( Monitor::type  type,
const unsigned int  i 
)

get a display name by its type and index

Referenced by MMLDisplay::updateMonitorsTable().

+ Here is the caller graph for this function:

◆ getInstance()

MMLMonitorDisplayFactory * MMLMonitorDisplayFactory::getInstance ( )
static

return the unique instance of the factory

Referenced by MMLDisplay::connectMonitor(), and MMLDisplay::updateMonitorsTable().

+ Here is the caller graph for this function:

◆ getNumberOfDisplaysByType()

unsigned int MMLMonitorDisplayFactory::getNumberOfDisplaysByType ( Monitor::type  type)

give the number of displays registered for a specified type

Referenced by MMLDisplay::updateMonitorsTable().

+ Here is the caller graph for this function:

◆ isRegistered()

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

Returns true if id is in the map.

◆ registerClass() [1/2]

template<typename C >
bool MMLMonitorDisplayFactory::registerClass ( std::string  id)
inline

Register a class into the map for classes wich can display every types of monitors.

C is a subclass of MMLMonitorDisplay.

Parameters
idunique id to associate with the Class C

References Monitor::typeCount.

◆ registerClass() [2/2]

template<typename C >
bool MMLMonitorDisplayFactory::registerClass ( std::string  id,
Monitor::type  type 
)
inline

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

C is a subclass of MMLMonitorDisplay.

Parameters
idunique id to associate with the Class C
typethe type of monitor the class can display

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