Debian Codegraph @

Source/Config/CConfigData.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_CONFIG_CCONFIGDATA_H
22 #define KONCLUDE_CONFIG_CCONFIGDATA_H
23
24 // Libraries includes
25 #include <QString>
26 #include <QVariant>
27
28 // Namespace includes
29 #include "ConfigSettings.h"
30 #include "CConfigDescription.h"
31 #include "CConfigType.h"
32 #include "CIntegerConfigType.h"
33 #include "CDoubleConfigType.h"
34 #include "CStringConfigType.h"
35 #include "CStringListConfigType.h"
36
37
38 // Other includes
39
40
41 // Logger includes
42 #include "Logger/CLogger.h"
43
44
45 namespace Konclude {
46
47 namespace Config {
48
49 /*!
50 *
51 * \class CConfigData
52 * \author Andreas Steigmiller
53 * \version 0.1
54 * \brief TODO
55 *
56 */
57 class CConfigData {
58 // public methods
59 public:
60 //! Constructor
61 CConfigData(CConfigDescription *configDesciption, CConfigType *takeConfigValue);
62 CConfigData(CConfigDescription *configDesciption);
63
64 //! Destructor
65 virtual ~CConfigData();
66
67 virtual bool equals(CConfigData *data);
68
69 virtual bool supportsStringConvertion();
70 virtual bool readFromString(const QString &string);
71 virtual QString getString();
72
73 virtual bool supportsStringListConvertion();
74 virtual bool readFromStringList(const QStringList &string);
75 virtual QStringList getStringList();
76
77 virtual bool supportsIntegerConvertion();
78 virtual bool readFromInteger(qint64 integer);
79 virtual qint64 getInteger();
80
81 virtual bool supportsBooleanConvertion();
82 virtual bool readFromBoolean(bool boolean);
83 virtual bool getBoolean();
84
85 virtual bool supportsDoubleConvertion();
86 virtual bool readFromDouble(double value);
87 virtual double getDouble();
88
89
90 virtual CConfigDescription *getConfigDescription();
91 virtual CConfigType *getConfigType();
92
93 virtual qint64 getLevelLock();
94 virtual bool hasLock();
95 virtual CConfigData *setLevelLock(qint64 levelLock = -1);
96
97
98 // protected methods
99 protected:
100
101 // protected variables
102 protected:
103 CConfigDescription *configDes;
104 CConfigType *configVal;
105 qint64 lockLevel;
106
107 // private methods
108 private:
109
110 // private variables
111 private:
112
113 };
114
115 }; // end namespace Config
116
117 }; // end namespace Konclude
118
119 #endif // KONCLUDE_CONFIG_CCONFIGDATA_H