NorMIT-nav
16.5
An IGT application
|
Helper class for storing variables in the patient file. More...
#include <cxPatientStorage.h>
Public Member Functions | |
PatientStorage (SessionStorageServicePtr sessionStorageService, QString baseNodeName, bool delayedLoad=false) | |
void | storeVariable (QString nodeName, boost::function< QString()> getValueFunction, boost::function< void(QString)> setValueFunction) |
storeVariable Store a variable in the patient file More... | |
Helper class for storing variables in the patient file.
Use boost::bind to supply get/set functions.
E.g.: storeVariable("variableName", boost::bind(&VariableToBeStoredClass::getValue, &variableToBeStored), boost::bind(&VariableToBeStoredClass::setValue, &variableToBeStored, _1));
or: storeVariable("variableName", boost::bind(&VariableToBeStoredClass::getValue, variableToBeStoredSmartPtr), boost::bind(&VariableToBeStoredClass::setValue, variableToBeStoredSmartPtr, _1));
Definition at line 64 of file cxPatientStorage.h.
cx::PatientStorage::PatientStorage | ( | SessionStorageServicePtr | sessionStorageService, |
QString | baseNodeName, | ||
bool | delayedLoad = false |
||
) |
Definition at line 40 of file cxPatientStorage.cpp.
void cx::PatientStorage::storeVariable | ( | QString | nodeName, |
boost::function< QString()> | getValueFunction, | ||
boost::function< void(QString)> | setValueFunction | ||
) |
storeVariable Store a variable in the patient file
nodeName | Name of the node to store |
getValueFunction | Suppy a get function returning a QString. Use boost::bind |
setValueFunction | Suppy a set function with a QString as parameter. Use boost::bind |
Definition at line 49 of file cxPatientStorage.cpp.