]> vaikene.ee Git - evaf/blob - src/libs/Common/env.h
592db2c2917cde6a6a51df436f6af169d9744cc2
[evaf] / src / libs / Common / env.h
1 /**
2 * @file Common/env.h
3 * @brief iEnv interface implementation
4 * @author Enar Vaikene
5 *
6 * Copyright (c) 2011 Enar Vaikene
7 *
8 * This file is part of the eVaf C++ cross-platform application development framework.
9 *
10 * This file can be used under the terms of the GNU General Public License
11 * version 3.0 as published by the Free Software Foundation and appearing in
12 * the file LICENSE included in the packaging of this file. Please review the
13 * the following information to ensure the GNU General Public License version
14 * 3.0 requirements will be met: http://www.gnu.org/copyleft/gpl.html.
15 *
16 * Alternatively, this file may be used in accordance with the Commercial License
17 * Agreement provided with the Software.
18 */
19
20 #ifndef __COMMON_ENV_H
21 #define __COMMON_ENV_H
22
23 #include "ienv.h"
24
25 #include <QObject>
26 #include <QString>
27
28 namespace eVaf {
29 namespace Common {
30 namespace Internal {
31
32 /**
33 * iEnv interface implementation
34 */
35 class Env : public iEnv
36 {
37 Q_OBJECT
38
39 public:
40
41 Env();
42
43 virtual ~Env();
44
45 /**
46 * Initializes the iEnv interface implementation
47 * @return True if ok; false if the initialization fails
48 */
49 bool init();
50
51 /*
52 iEnv interface
53 */
54
55 virtual QString const rootDir() const { return mRootDir; }
56
57 virtual QString const dataRootDir() const;
58
59 virtual QString const binDir() const { return mBinDir; }
60
61 virtual QString const etcDir() const;
62
63 virtual QString const logDir() const;
64
65 virtual QString const docDir() const;
66
67 virtual QString const qtPluginsDir() const;
68
69
70 private: // Members
71
72 QString mRootDir;
73 mutable QString mDataRootDir;
74 QString mBinDir;
75 mutable QString mQtPluginsDir;
76 mutable QString mEtcDir;
77 mutable QString mLogDir;
78 mutable QString mDocDir;
79
80 };
81
82 } // namespace eVaf::Common::Internal
83 } // namespace eVaf::Common
84 } // namespace eVaf
85
86 #endif // env.h