Debian Codegraph @

Source/Config/CConfigurationGroup.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_CCONFIGURATIONGROUP_H
22 #define KONCLUDE_CONFIG_CCONFIGURATIONGROUP_H
23
24 // Libraries includes
25 #include <QVector>
26 #include <QReadWriteLock>
27
28
29 // Namespace includes
30 #include "CConfigDescription.h"
31 #include "CConfigData.h"
32 #include "CConfigType.h"
33
34 // Other includes
35 #include "Utilities/CDynRefVector.hpp"
36
37 // Logger includes
38 #include "Logger/CLogger.h"
39
40
41 namespace Konclude {
42
43 using namespace Utilities;
44
45 namespace Config {
46
47 /*!
48 *
49 * \class CConfigurationGroup
50 * \author Andreas Steigmiller
51 * \version 0.1
52 * \brief TODO
53 *
54 */
55 class CConfigurationGroup {
56 // public methods
57 public:
58 //! Constructor
59 CConfigurationGroup();
60
61 //! Destructor
62 virtual ~CConfigurationGroup();
63
64 virtual qint64 addConfigProperty(CConfigDescription *takeConfigDescription, CConfigData *takeDefaultConfigValue);
65 virtual qint64 addConfigProperty(CConfigDescription *takeConfigDescription, CConfigType *takeDefaultConfigType);
66 virtual qint64 addConfigProperty(CConfigDescription *takeConfigDescription);
67
68 virtual CConfigDescription *getConfigDescription(qint64 index);
69 virtual CConfigDescription *getConfigDescription(const QString &name);
70
71 virtual CConfigData *getConfigDefaultData(qint64 index);
72 virtual CConfigData *getConfigDefaultData(const QString &name);
73
74
75 virtual CConfigurationGroup *setConfigDefaultData(qint64 index, CConfigData *takeDefaultConfigValue);
76
77
78 virtual qint64 getConfigPropertyCount();
79
80 virtual qint64 getConfigIndex(const QString &name);
81
82 virtual CConfigurationGroup* getReferencedConfigurationGroup();
83
84 virtual QList<CConfigDescription*> getConfigDescriptonList();
85
86 // protected methods
87 protected:
88
89 // protected variables
90 protected:
91 CDynRefVector<CConfigDescription> configDesVector;
92 CDynRefVector<CConfigData> configDataVector;
93
94 QLinkedList<CConfigDescription *> configDesContainer;
95 QLinkedList<CConfigData *> configDataContainer;
96
97 QHash<QString,qint64> propertyNameIndexHash;
98
99 QReadWriteLock readWriteSync;
100
101 // private methods
102 private:
103
104 // private variables
105 private:
106
107 };
108
109 }; // end namespace Config
110
111 }; // end namespace Konclude
112
113 #endif // KONCLUDE_CONFIG_CCONFIGURATIONGROUP_H