![]() |
Computer Assited Medical Intervention Tool Kit
|
A Factory for creating MMLMonitorDiplay. More...
#include <MMLMonitorDisplayFactory.h>
Public Member Functions | |
| MMLMonitorDisplay * | 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. | |
| std::string | getDisplayByType (Monitor::type type, const unsigned int i) |
| get a display name by its type and index | |
| unsigned int | getNumberOfDisplaysByType (Monitor::type type) |
| give the number of displays registered for a specified type | |
| bool | isRegistered (std::string id) |
| Returns true if id is in the map. | |
| 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() | |
| template<typename C > | |
| bool | registerClass (std::string id) |
| Register a class into the map for classes wich can display every types of monitors. | |
Static Public Member Functions | |
| static MMLMonitorDisplayFactory * | getInstance () |
| return the unique instance of the factory | |
Private Types | |
| typedef MMLMonitorDisplay *(* | CreateMonitorDisplayFunctionPointer )(Monitor *monitor, MMLComponent *manager) |
Private Member Functions | |
| MMLMonitorDisplayFactory () | |
Static Private Member Functions | |
| template<typename C > | |
| static MMLMonitorDisplay * | createTheMonitorDisplay (Monitor *monitor, MMLComponent *manager) |
| function whose pointers are inserted into the map | |
Private Attributes | |
| std::vector< std::string > | displaysByType [Monitor::typeCount] |
| list of displays by type | |
| std::map< std::string, CreateMonitorDisplayFunctionPointer > | mapObjectCreator |
| A map between MonitorDisplay name as string to functions (CreateMonitorDisplayFunctionPointer) | |
Static Private Attributes | |
| static MMLMonitorDisplayFactory * | instance = NULL |
| unique instance of the factory | |
A Factory for creating MMLMonitorDiplay.
|
private |
|
private |
Referenced by getInstance().
| 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.
References mapObjectCreator.
Referenced by MMLDisplay::connectMonitor().
|
inlinestaticprivate |
function whose pointers are inserted into the map
| C | type of MMLMonitorDisplay |
| std::string MMLMonitorDisplayFactory::getDisplayByType | ( | Monitor::type | type, |
| const unsigned int | i | ||
| ) |
get a display name by its type and index
References displaysByType.
Referenced by MMLDisplay::updateMonitorsTable().
|
static |
return the unique instance of the factory
References instance, and MMLMonitorDisplayFactory().
Referenced by MMLDisplay::connectMonitor(), and MMLDisplay::updateMonitorsTable().
| unsigned int MMLMonitorDisplayFactory::getNumberOfDisplaysByType | ( | Monitor::type | type | ) |
give the number of displays registered for a specified type
References displaysByType.
Referenced by MMLDisplay::updateMonitorsTable().
| bool MMLMonitorDisplayFactory::isRegistered | ( | std::string | id | ) |
Returns true if id is in the map.
References mapObjectCreator.
|
inline |
Register a class into the map A registered class can be created using createMonitorDisplay()
| C | a subclass of MMLMonitorDisplay |
| id | unique id to associate with the Class C |
| type | the type of monitor the class can display |
References displaysByType, and mapObjectCreator.
|
inline |
Register a class into the map for classes wich can display every types of monitors.
| C | a subclass of MMLMonitorDisplay |
| id | unique id to associate with the Class C |
References displaysByType, and mapObjectCreator.
|
private |
list of displays by type
Referenced by getDisplayByType(), getNumberOfDisplaysByType(), and registerClass().
|
staticprivate |
unique instance of the factory
Referenced by getInstance().
|
private |
A map between MonitorDisplay name as string to functions (CreateMonitorDisplayFunctionPointer)
Referenced by createMonitorDisplay(), isRegistered(), and registerClass().
1.8.1.2