Fraxinus  16.5.0-fx-rc1
An IGT application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
cx::SessionStorageService Class Referenceabstract

#include <cxSessionStorageService.h>

Inheritance diagram for cx::SessionStorageService:
cx::SessionStorageServiceImpl cx::SessionStorageServiceNull cx::SessionStorageServiceProxy

Signals

void cleared ()
 emitted when session is cleared, before isLoading is called More...
 
void sessionChanged ()
 emitted after change to a new session (new or loaded or cleared) More...
 
void isSaving (QDomElement &root)
 xml storage is available More...
 
void isSavingSecond (QDomElement &root)
 Triggered after the isSaving signal, to allow for data that. More...
 
void isLoading (QDomElement &root)
 emitted while loading a session. Xml storage is available, getRootFolder() is set to loaded value. More...
 
void isLoadingSecond (QDomElement &root)
 Emitted after the isLoading signal, to allow for structures that must be loaded after core structures like PatientModel. More...
 

Public Member Functions

 SessionStorageService ()
 
virtual ~SessionStorageService ()
 
virtual void load (QString dir)=0
 load session from dir, or create new session in this location if none exist More...
 
virtual void save ()=0
 Save all application data to XML file. More...
 
virtual void clear ()=0
 
virtual bool isValid () const =0
 
virtual QString getRootFolder () const =0
 
virtual bool isNull () const =0
 
QString getSubFolder (QString relative)
 return and create a folder/path relative to root. Created if necessary. More...
 

Static Public Member Functions

static SessionStorageServicePtr getNullObject ()
 

Detailed Description

Persistent storage for the current session.

The storage consist of a root folder unique for this session, and an xml input/output. The folder structured is available whenever session isValid(). The xml tree is available during load/save only. Clients are supposed to listen to isSaving/isLoading, then save/load their xml data.

Date
2014-12-01
Author
Christian Askeland

Definition at line 63 of file cxSessionStorageService.h.

Constructor & Destructor Documentation

cx::SessionStorageService::SessionStorageService ( )

Definition at line 40 of file cxSessionStorageService.cpp.

cx::SessionStorageService::~SessionStorageService ( )
virtual

Definition at line 45 of file cxSessionStorageService.cpp.

Member Function Documentation

virtual void cx::SessionStorageService::clear ( )
pure virtual
void cx::SessionStorageService::cleared ( )
signal

emitted when session is cleared, before isLoading is called

SessionStorageServicePtr cx::SessionStorageService::getNullObject ( )
static

Definition at line 63 of file cxSessionStorageService.cpp.

virtual QString cx::SessionStorageService::getRootFolder ( ) const
pure virtual
QString cx::SessionStorageService::getSubFolder ( QString  relative)

return and create a folder/path relative to root. Created if necessary.

Definition at line 71 of file cxSessionStorageService.cpp.

void cx::SessionStorageService::isLoading ( QDomElement &  root)
signal

emitted while loading a session. Xml storage is available, getRootFolder() is set to loaded value.

void cx::SessionStorageService::isLoadingSecond ( QDomElement &  root)
signal

Emitted after the isLoading signal, to allow for structures that must be loaded after core structures like PatientModel.

virtual bool cx::SessionStorageService::isNull ( ) const
pure virtual
void cx::SessionStorageService::isSaving ( QDomElement &  root)
signal

xml storage is available

void cx::SessionStorageService::isSavingSecond ( QDomElement &  root)
signal

Triggered after the isSaving signal, to allow for data that.

virtual bool cx::SessionStorageService::isValid ( ) const
pure virtual
virtual void cx::SessionStorageService::load ( QString  dir)
pure virtual

load session from dir, or create new session in this location if none exist

Implemented in cx::SessionStorageServiceImpl, cx::SessionStorageServiceProxy, and cx::SessionStorageServiceNull.

virtual void cx::SessionStorageService::save ( )
pure virtual

Save all application data to XML file.

Implemented in cx::SessionStorageServiceImpl, cx::SessionStorageServiceProxy, and cx::SessionStorageServiceNull.

void cx::SessionStorageService::sessionChanged ( )
signal

emitted after change to a new session (new or loaded or cleared)


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