NorMIT-nav  2023.01.05-dev+develop.0da12
An IGT application
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 42 of file cxSessionStorageService.h.

Constructor & Destructor Documentation

◆ SessionStorageService()

cx::SessionStorageService::SessionStorageService ( )

Definition at line 19 of file cxSessionStorageService.cpp.

◆ ~SessionStorageService()

cx::SessionStorageService::~SessionStorageService ( )
virtual

Definition at line 24 of file cxSessionStorageService.cpp.

Member Function Documentation

◆ clear()

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

◆ cleared

void cx::SessionStorageService::cleared ( )
signal

emitted when session is cleared, before isLoading is called

◆ getNullObject()

SessionStorageServicePtr cx::SessionStorageService::getNullObject ( )
static

Definition at line 42 of file cxSessionStorageService.cpp.

◆ getRootFolder()

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

◆ getSubFolder()

QString cx::SessionStorageService::getSubFolder ( QString  relative)

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

Definition at line 50 of file cxSessionStorageService.cpp.

◆ isLoading

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

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

◆ isLoadingSecond

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.

◆ isNull()

virtual bool cx::SessionStorageService::isNull ( ) const
pure virtual

◆ isSaving

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

xml storage is available

◆ isSavingSecond

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

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

◆ isValid()

virtual bool cx::SessionStorageService::isValid ( ) const
pure virtual

◆ load()

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.

◆ save()

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

Save all application data to XML file.

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

◆ sessionChanged

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: