Fraxinus  16.5.0-fx-rc9
An IGT application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
cx::PatientStorage Class Reference

Helper class for storing variables in the patient file. More...

#include <cxPatientStorage.h>

Inheritance diagram for cx::PatientStorage:

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

Detailed Description

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));

Date
Sep 07, 2015
Author
Ole Vegard Solberg, SINTEF

Definition at line 64 of file cxPatientStorage.h.

Constructor & Destructor Documentation

cx::PatientStorage::PatientStorage ( SessionStorageServicePtr  sessionStorageService,
QString  baseNodeName,
bool  delayedLoad = false 
)

Definition at line 40 of file cxPatientStorage.cpp.

Member Function Documentation

void cx::PatientStorage::storeVariable ( QString  nodeName,
boost::function< QString()>  getValueFunction,
boost::function< void(QString)>  setValueFunction 
)

storeVariable Store a variable in the patient file

Parameters
nodeNameName of the node to store
getValueFunctionSuppy a get function returning a QString. Use boost::bind
setValueFunctionSuppy a set function with a QString as parameter. Use boost::bind

Definition at line 49 of file cxPatientStorage.cpp.


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