XX CMake Package
Loading...
Searching...
No Matches
XXSharedData.h
Go to the documentation of this file.
1#ifndef XXSharedDataH
2#define XXSharedDataH
3
4#include <QSharedMemory>
5
6#include <QList>
7
8namespace XX
9{
12
13 template <typename DataBlock>
15 {
16 public:
17 class List : public QList<SharedData*>
18 {
19 public:
20 List() = default;
22 };
23
24 class Guard
25 {
26 public:
27 Guard(SharedData* instance);
29
30 private:
31 SharedData* instance;
32 };
33
34 public:
35 SharedData(const QString& uniqueName, bool readOnly);
36 virtual ~SharedData();
37
38 public:
39 const QString& getErrorString() const;
40
41 protected:
42 DataBlock* dataBlock;
44
45 private:
46 QSharedMemory sharedMemory;
47 QString errorString;
48 };
49} // namespace XX
50
51#ifndef XXSharedDataHPP
52#include "XXSharedData.hpp"
53#endif // NOT XXSharedDataHPP
54
55#endif // NOT XXSharedDataH
Guard(SharedData *instance)
const QString & getErrorString() const
SharedData(const QString &uniqueName, bool readOnly)
DataBlock * dataBlock
Definition XXSharedData.h:42
bool readOnly
Definition XXSharedData.h:43
virtual ~SharedData()
Definition XXPopulatedAbstract.h:11