COVISE Core
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
coConfigConstants.h
Go to the documentation of this file.
1 /* This file is part of COVISE.
2 
3  You can use it under the terms of the GNU Lesser General Public License
4  version 2.1 or later, see lgpl-2.1.txt.
5 
6  * License: LGPL 2+ */
7 
8 #ifndef COCONFIGCONSTANTS_H
9 #define COCONFIGCONSTANTS_H
10 
11 #define CO_CONFIG_TRANSFORM_FILE "transform.xml"
12 
13 #include <util/coTypes.h>
14 #include <QString>
15 #include <QStringList>
16 
17 namespace covise
18 {
19 
21 {
22 
23 public:
25  {
26  Default = -1,
27  Global = 1,
29  Additional
30  };
31 
32  static const QStringList &getArchList();
33  static const QString &getHostname();
34  static const QString &getBackend();
35 
36  static void setBackend(const QString &backend);
37  static void setRank(int rank);
38  static int getRank();
39 
40 protected:
42  virtual ~coConfigConstants();
43 
44 private:
45  QString backend;
46  QString hostname;
47  QStringList archlist;
48  int rank;
49 
51 
52  void initXerces();
53  void terminateXerces();
54 };
55 
57 {
58 
59 private:
62 
63 public:
64  static const QString &getDefaultTransformFileName();
65 
66  static const QString &getDefaultLocalConfigFileName();
67  static const QString &getDefaultGlobalConfigFileName();
68 
69  static const QString &getDefaultLocalConfigFilePath();
70  static const QString &getDefaultGlobalConfigFilePath();
71 
72  static const QStringList &getSearchPath();
73 
74 private:
76  {
77 
78  if (instance)
79  {
80  return instance;
81  }
82  else
83  {
84  return new coConfigDefaultPaths();
85  }
86  }
87 
89 
90  void setNames();
91  QString configGlobal, configLocal, defaultTransform, configGlobalPath, configLocalPath;
92  QStringList searchPath;
93 };
94 }
95 #endif
QStringList archlist
Definition: coConfigConstants.h:47
#define CONFIGEXPORT
Definition: coExport.h:337
QStringList searchPath
Definition: coConfigConstants.h:92
QString hostname
Definition: coConfigConstants.h:46
Definition: coConfigConstants.h:28
static coConfigDefaultPaths * getInstance()
Definition: coConfigConstants.h:75
int rank
Definition: coConfigConstants.h:48
QString backend
Definition: coConfigConstants.h:45
ConfigScope
Definition: coConfigConstants.h:24
Definition: coConfigConstants.h:56
static coConfigConstants * instance
Definition: coConfigConstants.h:50
static coConfigDefaultPaths * instance
Definition: coConfigConstants.h:88
QString configLocalPath
Definition: coConfigConstants.h:91
Definition: coConfigConstants.h:20