Fraxinus  18.10
An IGT application
cxSessionStorageService.h
Go to the documentation of this file.
1 /*=========================================================================
2 This file is part of CustusX, an Image Guided Therapy Application.
3 
4 Copyright (c) SINTEF Department of Medical Technology.
5 All rights reserved.
6 
7 CustusX is released under a BSD 3-Clause license.
8 
9 See Lisence.txt (https://github.com/SINTEFMedtek/CustusX/blob/master/License.txt) for details.
10 =========================================================================*/
11 
12 #ifndef CXSESSIONSTORAGESERVICE_H
13 #define CXSESSIONSTORAGESERVICE_H
14 
15 #include "cxResourceExport.h"
16 
17 #include "boost/shared_ptr.hpp"
18 #include <QString>
19 #include <QObject>
20 #include "cxForwardDeclarations.h"
21 
22 class QDomElement;
23 
24 #define SessionStorageService_iid "cx::SessionStorageService"
25 
26 namespace cx
27 {
28 typedef boost::shared_ptr<class SessionStorageService> SessionStorageServicePtr;
29 
42 class cxResource_EXPORT SessionStorageService : public QObject
43 {
44  Q_OBJECT
45 public:
47  virtual ~SessionStorageService();
48 
49  virtual void load(QString dir) = 0;
50  virtual void save() = 0;
51  virtual void clear() = 0;
52  virtual bool isValid() const = 0;
53  virtual QString getRootFolder() const = 0;
54 
55  virtual bool isNull() const = 0;
56  static SessionStorageServicePtr getNullObject();
57 
58  QString getSubFolder(QString relative);
59 
60 signals:
61  void cleared();
62  void sessionChanged();
63  void isSaving(QDomElement& root);
64  void isSavingSecond(QDomElement& root);
65  void isLoading(QDomElement& root);
66  void isLoadingSecond(QDomElement& root);
67 };
68 
69 } // namespace cx
70 
72 
73 #endif // CXSESSIONSTORAGESERVICE_H
boost::shared_ptr< class SessionStorageService > SessionStorageServicePtr
#define SessionStorageService_iid
Namespace for all CustusX production code.