Debian Codegraph @

Source/Config/CConfigDataReader.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_CCONFIGDATAREADER_H
22 #define KONCLUDE_CONFIG_CCONFIGDATAREADER_H
23
24 // Libraries includes
25 #include <QString>
26
27 // Namespace includes
28 #include "ConfigSettings.h"
29 #include "CConfiguration.h"
30 #include "CConfigData.h"
31 #include "CConfigurationProvider.h"
32
33
34 // Other includes
35
36
37 // Logger includes
38 #include "Logger/CLogger.h"
39
40
41 namespace Konclude {
42
43 namespace Config {
44
45 /*!
46 *
47 * \class CConfigDataReader
48 * \author Andreas Steigmiller
49 * \version 0.1
50 * \brief TODO
51 *
52 */
53 class CConfigDataReader {
54 // public methods
55 public:
56 //! Constructor
57 CConfigDataReader();
58
59 //! Destructor
60 virtual ~CConfigDataReader();
61
62 static QString readConfigString(CConfiguration *config, const QString &configString, const QString &defaultValue = QString(), bool *errorFlag = 0);
63 static qint64 readConfigInteger(CConfiguration *config, const QString &configString, qint64 defaultValue = 0, bool *errorFlag = 0);
64 static double readConfigDouble(CConfiguration *config, const QString &configString, double defaultValue = 0, bool *errorFlag = 0);
65 static bool readConfigBoolean(CConfiguration *config, const QString &configString, bool defaultValue = false, bool *errorFlag = 0);
66 static QStringList readConfigStringList(CConfiguration *config, const QString &configString, const QStringList& defaultValue = QStringList(), bool *errorFlag = 0);
67
68 static QString readConfigString(CConfigurationProvider *configProv, const QString &configString, const QString &defaultValue = QString(), bool *errorFlag = 0);
69 static qint64 readConfigInteger(CConfigurationProvider *configProv, const QString &configString, qint64 defaultValue = 0, bool *errorFlag = 0);
70 static double readConfigDouble(CConfigurationProvider *configProv, const QString &configString, double defaultValue = 0, bool *errorFlag = 0);
71 static bool readConfigBoolean(CConfigurationProvider *configProv, const QString &configString, bool defaultValue = false, bool *errorFlag = 0);
72 static QStringList readConfigStringList(CConfigurationProvider *configProv, const QString &configString, const QStringList& defaultValue = QStringList(), bool *errorFlag = 0);
73
74 // protected methods
75 protected:
76
77 // protected variables
78 protected:
79
80 // private methods
81 private:
82
83 // private variables
84 private:
85
86 };
87
88 }; // end namespace Config
89
90 }; // end namespace Konclude
91
92 #endif // KONCLUDE_CONFIG_CCONFIGDATAREADER_H