Debian Codegraph @

Source/Utilities/Container/CQtSet.h

raw
1 /*
2 * Copyright (C) 2013-2015, 2019 by the Konclude Developer Team.
3 *
4 * This file is part of the reasoning system Konclude.
5 * For details and support, see <http://konclude.com/>.
6 *
7 * Konclude is free software: you can redistribute it and/or modify
8 * it under the terms of version 3 of the GNU Lesser General Public
9 * License (LGPLv3) as published by the Free Software Foundation.
10 *
11 * Konclude is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU (Lesser) General Public License for more details.
15 *
16 * You should have received a copy of the GNU (Lesser) General Public
17 * License along with Konclude. If not, see <http://www.gnu.org/licenses/>.
18 *
19 */
20
21 #ifndef KONCLUDE_UTILITIES_CONTAINER_CQTSET_H
22 #define KONCLUDE_UTILITIES_CONTAINER_CQTSET_H
23
24 // Namespace includes
25 #include "ContainerSettings.h"
26
27 #ifdef KONCLUDE_EMPLOY_QT_SET_CONTAINER
28
29 // Library includes
30 #include <QSet>
31
32 // Other includes
33 #include "Context/CContext.h"
34
35 // Logger includes
36 #include "Logger/CLogger.h"
37
38
39 namespace Konclude {
40
41 using namespace Context;
42
43 namespace Utilities {
44
45 namespace Container {
46
47
48 /*!
49 *
50 * \class CQtSet
51 * \author Andreas Steigmiller
52 * \version 0.1
53 * \brief TODO
54 *
55 */
56 template<class T>
57 class CQtSet : public QSet<T> {
58 // public methods
59 public:
60 inline CQtSet() : QSet<T>() {}
61 inline CQtSet(CContext* context) : QSet<T>() {}
62 inline CQtSet(const CQtSet<T>& other) : QSet<T>(other) {}
63 inline CQtSet(const CQtSet<T>& other, CContext* context) : QSet<T>(other) {}
64 inline CQtSet(const QSet<T>& other) : QSet<T>(other) {}
65 inline CQtSet(const QSet<T>& other, CContext* context) : QSet<T>(other) {}
66
67
68 inline CQtSet<T>* init(CContext* context = nullptr) {
69 QSet<T>::clear();
70 return this;
71 }
72
73 inline CQtSet<T>* init(const CQtSet<T>& other, CContext* context = nullptr) {
74 this->operator =(other);
75 return this;
76 }
77
78 inline CQtSet<T>* init(const CQtSet<T>* other, CContext* context = nullptr) {
79 if (other) {
80 this->operator =(*other);
81 } else {
82 QSet<T>::clear();
83 }
84 return this;
85 }
86
87
88 // protected methods
89 protected:
90
91 // protected variables
92 protected:
93
94 // private methods
95 private:
96
97 // private variables
98 private:
99 };
100
101 }; // end namespace Container
102
103 }; // end namespace Utilities
104
105 }; // end namespace Konclude
106
107 #include "CQtSet.cpp"
108
109 #endif // KONCLUDE_EMPLOY_QT_SET_CONTAINER
110
111 #endif // KONCLUDE_UTILITIES_CONTAINER_CQTSET_H