X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=docs%2Fd0%2Fdd7%2F_version_8h_source.html;h=d453d16566fda3774511f2ae59c823a19e3ed00e;hb=f4b867c54c5061c6b84800c1de474811a5dbc8d8;hp=abeac7329e102b038040693cf927dfe55d419152;hpb=02292e75a25dce7a7291d6ae51919d3fce0ac5da;p=mutilities%2FMUtilities.git diff --git a/docs/d0/dd7/_version_8h_source.html b/docs/d0/dd7/_version_8h_source.html index abeac73..d453d16 100644 --- a/docs/d0/dd7/_version_8h_source.html +++ b/docs/d0/dd7/_version_8h_source.html @@ -67,7 +67,7 @@ $(function() {
Version.h
-
1 // MuldeR's Utilities for Qt
3 // Copyright (C) 2004-2018 LoRd_MuldeR <MuldeR2@GMX.de>
4 //
5 // This library is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU Lesser General Public
7 // License as published by the Free Software Foundation; either
8 // version 2.1 of the License, or (at your option) any later version.
9 //
10 // This library is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 // Lesser General Public License for more details.
14 //
15 // You should have received a copy of the GNU Lesser General Public
16 // License along with this library; if not, write to the Free Software
17 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 //
19 // http://www.gnu.org/licenses/lgpl-2.1.txt
21 
22 #pragma once
23 
24 //MUtils
25 #include <MUtils/Global.h>
26 
27 //Qt
28 #include <QString>
29 #include <QDate>
30 #include <QTime>
31 
32 namespace MUtils
33 {
34  class Version
35  {
36  public:
37  //Get Library Version Numbers
38  MUTILS_API static const quint32 &lib_version_major(void);
39  MUTILS_API static const quint32 &lib_version_minor(void);
40 
41  //Get Library Build Date/Time
42  MUTILS_API static const QDate lib_build_date(void);
43  MUTILS_API static const QTime lib_build_time(void);
44 
45  //Get Application Build Date/Time
46  MUTILS_API static const QDate app_build_date(const char *const date_str = build_date_raw());
47  MUTILS_API static const QTime app_build_time(const char *const time_str = build_time_raw());
48 
49  //Compiler detection
50  static const char *const compiler_version(void)
51  {
52  static const char *const COMPILER_VERS =
53  #if defined(__INTEL_COMPILER)
54  #if (__INTEL_COMPILER >= 1500)
55  "ICL 15." MUTILS_MAKE_STRING(__INTEL_COMPILER_BUILD_DATE);
56  #elif (__INTEL_COMPILER >= 1400)
57  "ICL 14." MUTILS_MAKE_STRING(__INTEL_COMPILER_BUILD_DATE);
58  #elif (__INTEL_COMPILER >= 1300)
59  "ICL 13." MUTILS_MAKE_STRING(__INTEL_COMPILER_BUILD_DATE);
60  #elif (__INTEL_COMPILER >= 1200)
61  "ICL 12." MUTILS_MAKE_STRING(__INTEL_COMPILER_BUILD_DATE);
62  #elif (__INTEL_COMPILER >= 1100)
63  "ICL 11.x";
64  #elif (__INTEL_COMPILER >= 1000)
65  "ICL 10.x";
66  #else
67  #error Compiler is not supported!
68  #endif
69  #elif defined(_MSC_VER)
70  #if (_MSC_VER == 1915)
71  #if((_MSC_FULL_VER >= 191526726) && (_MSC_FULL_VER <= 191526732))
72  "MSVC 2017.8";
73  #else
74  #error Compiler version is not supported yet!
75  #endif
76  #elif (_MSC_VER == 1914)
77  #if((_MSC_FULL_VER >= 191426430) && (_MSC_FULL_VER <= 191426433))
78  "MSVC 2017.7";
79  #else
80  #error Compiler version is not supported yet!
81  #endif
82  #elif (_MSC_VER == 1913)
83  #if((_MSC_FULL_VER >= 191326128) && (_MSC_FULL_VER <= 191326132))
84  "MSVC 2017.6";
85  #else
86  #error Compiler version is not supported yet!
87  #endif
88  #elif (_MSC_VER == 1912)
89  #if((_MSC_FULL_VER >= 191225830) && (_MSC_FULL_VER <= 191225835))
90  "MSVC 2017.5";
91  #else
92  #error Compiler version is not supported yet!
93  #endif
94  #elif (_MSC_VER == 1911)
95  #if((_MSC_FULL_VER >= 191125542) && (_MSC_FULL_VER <= 191125547))
96  "MSVC 2017.4";
97  #elif((_MSC_FULL_VER >= 191125506) && (_MSC_FULL_VER <= 191125508))
98  "MSVC 2017.3";
99  #else
100  #error Compiler version is not supported yet!
101  #endif
102  #elif (_MSC_VER == 1910)
103  #if ((_MSC_FULL_VER >= 191025017) && (_MSC_FULL_VER <= 191025019))
104  "MSVC 2017.2";
105  #else
106  #error Compiler version is not supported yet!
107  #endif
108  #elif (_MSC_VER == 1900)
109  #if (_MSC_FULL_VER == 190023026)
110  "MSVC 2015";
111  #elif (_MSC_FULL_VER == 190023506)
112  "MSVC 2015.1";
113  #elif (_MSC_FULL_VER == 190023918)
114  "MSVC 2015.2";
115  #elif (_MSC_FULL_VER == 190024210) || (_MSC_FULL_VER == 190024215)
116  "MSVC 2015.3";
117  #else
118  #error Compiler version is not supported yet!
119  #endif
120  #elif (_MSC_VER == 1800)
121  #if (_MSC_FULL_VER == 180021005)
122  "MSVC 2013";
123  #elif (_MSC_FULL_VER == 180030501)
124  "MSVC 2013.2";
125  #elif (_MSC_FULL_VER == 180030723)
126  "MSVC 2013.3";
127  #elif (_MSC_FULL_VER == 180031101)
128  "MSVC 2013.4";
129  #elif (_MSC_FULL_VER == 180040629)
130  "MSVC 2013.5";
131  #else
132  #error Compiler version is not supported yet!
133  #endif
134  #elif (_MSC_VER == 1700)
135  #if (_MSC_FULL_VER == 170050727)
136  "MSVC 2012";
137  #elif (_MSC_FULL_VER == 170051106)
138  "MSVC 2012.1";
139  #elif (_MSC_FULL_VER == 170060315)
140  "MSVC 2012.2";
141  #elif (_MSC_FULL_VER == 170060610)
142  "MSVC 2012.3";
143  #elif (_MSC_FULL_VER == 170061030)
144  "MSVC 2012.4";
145  #else
146  #error Compiler version is not supported yet!
147  #endif
148  #elif (_MSC_VER == 1600)
149  #if (_MSC_FULL_VER >= 160040219)
150  "MSVC 2010-SP1";
151  #else
152  "MSVC 2010";
153  #endif
154  #elif (_MSC_VER == 1500)
155  #if (_MSC_FULL_VER >= 150030729)
156  "MSVC 2008-SP1";
157  #else
158  "MSVC 2008";
159  #endif
160  #else
161  #error Compiler is not supported!
162  #endif
163  #else
164  #error Compiler is not supported!
165  #endif
166  return COMPILER_VERS;
167  }
168 
169  //Architecture detection
170  static const char *const compiler_arch(void)
171  {
172  static const char *const COMPILER_ARCH =
173  #if defined(_M_X64)
174  "x64";
175  #elif defined(_M_IX86)
176  "x86";
177  #else
178  #error Architecture is not supported!
179  #endif
180  return COMPILER_ARCH;
181  }
182 
183  private:
184  //Raw Build date
185  static const char *const build_date_raw(void)
186  {
187  static const char *const RAW_BUILD_DATE = __DATE__;
188  return RAW_BUILD_DATE;
189  }
190 
191  //Raw Build time
192  static const char *const build_time_raw(void)
193  {
194  static const char *const RAW_BUILD_TIME = __TIME__;
195  return RAW_BUILD_TIME;
196  }
197 
198  //Disable construction
199  Version(void) { throw 666; }
200  Version(const Version&) { throw 666; }
201  };
202 }
203 
Definition: Version.h:34
+
1 // MuldeR's Utilities for Qt
3 // Copyright (C) 2004-2018 LoRd_MuldeR <MuldeR2@GMX.de>
4 //
5 // This library is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU Lesser General Public
7 // License as published by the Free Software Foundation; either
8 // version 2.1 of the License, or (at your option) any later version.
9 //
10 // This library is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 // Lesser General Public License for more details.
14 //
15 // You should have received a copy of the GNU Lesser General Public
16 // License along with this library; if not, write to the Free Software
17 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 //
19 // http://www.gnu.org/licenses/lgpl-2.1.txt
21 
22 #pragma once
23 
24 //MUtils
25 #include <MUtils/Global.h>
26 
27 //Qt
28 #include <QString>
29 #include <QDate>
30 #include <QTime>
31 
32 namespace MUtils
33 {
34  class Version
35  {
36  public:
37  //Get Library Version Numbers
38  MUTILS_API static const quint32 &lib_version_major(void);
39  MUTILS_API static const quint32 &lib_version_minor(void);
40 
41  //Get Library Build Date/Time
42  MUTILS_API static const QDate lib_build_date(void);
43  MUTILS_API static const QTime lib_build_time(void);
44 
45  //Get Application Build Date/Time
46  MUTILS_API static const QDate app_build_date(const char *const date_str = build_date_raw());
47  MUTILS_API static const QTime app_build_time(const char *const time_str = build_time_raw());
48 
49  //Compiler detection
50  static const char *const compiler_version(void)
51  {
52  static const char *const COMPILER_VERS =
53  #if defined(__INTEL_COMPILER)
54  #if (__INTEL_COMPILER >= 1500)
55  "ICL 15." MUTILS_MAKE_STRING(__INTEL_COMPILER_BUILD_DATE);
56  #elif (__INTEL_COMPILER >= 1400)
57  "ICL 14." MUTILS_MAKE_STRING(__INTEL_COMPILER_BUILD_DATE);
58  #elif (__INTEL_COMPILER >= 1300)
59  "ICL 13." MUTILS_MAKE_STRING(__INTEL_COMPILER_BUILD_DATE);
60  #elif (__INTEL_COMPILER >= 1200)
61  "ICL 12." MUTILS_MAKE_STRING(__INTEL_COMPILER_BUILD_DATE);
62  #elif (__INTEL_COMPILER >= 1100)
63  "ICL 11.x";
64  #elif (__INTEL_COMPILER >= 1000)
65  "ICL 10.x";
66  #else
67  #error Compiler is not supported!
68  #endif
69  #elif defined(_MSC_VER)
70  #if (_MSC_VER == 1916)
71  #if((_MSC_FULL_VER >= 191627024) && (_MSC_FULL_VER <= 191627024))
72  "MSVC 2017.9";
73  #else
74  #error Compiler version is not supported yet!
75  #endif
76  #elif (_MSC_VER == 1915)
77  #if((_MSC_FULL_VER >= 191526726) && (_MSC_FULL_VER <= 191526732))
78  "MSVC 2017.8";
79  #else
80  #error Compiler version is not supported yet!
81  #endif
82  #elif (_MSC_VER == 1914)
83  #if((_MSC_FULL_VER >= 191426430) && (_MSC_FULL_VER <= 191426433))
84  "MSVC 2017.7";
85  #else
86  #error Compiler version is not supported yet!
87  #endif
88  #elif (_MSC_VER == 1913)
89  #if((_MSC_FULL_VER >= 191326128) && (_MSC_FULL_VER <= 191326132))
90  "MSVC 2017.6";
91  #else
92  #error Compiler version is not supported yet!
93  #endif
94  #elif (_MSC_VER == 1912)
95  #if((_MSC_FULL_VER >= 191225830) && (_MSC_FULL_VER <= 191225835))
96  "MSVC 2017.5";
97  #else
98  #error Compiler version is not supported yet!
99  #endif
100  #elif (_MSC_VER == 1911)
101  #if((_MSC_FULL_VER >= 191125542) && (_MSC_FULL_VER <= 191125547))
102  "MSVC 2017.4";
103  #elif((_MSC_FULL_VER >= 191125506) && (_MSC_FULL_VER <= 191125508))
104  "MSVC 2017.3";
105  #else
106  #error Compiler version is not supported yet!
107  #endif
108  #elif (_MSC_VER == 1910)
109  #if ((_MSC_FULL_VER >= 191025017) && (_MSC_FULL_VER <= 191025019))
110  "MSVC 2017.2";
111  #else
112  #error Compiler version is not supported yet!
113  #endif
114  #elif (_MSC_VER == 1900)
115  #if (_MSC_FULL_VER == 190023026)
116  "MSVC 2015";
117  #elif (_MSC_FULL_VER == 190023506)
118  "MSVC 2015.1";
119  #elif (_MSC_FULL_VER == 190023918)
120  "MSVC 2015.2";
121  #elif (_MSC_FULL_VER == 190024210) || (_MSC_FULL_VER == 190024215)
122  "MSVC 2015.3";
123  #else
124  #error Compiler version is not supported yet!
125  #endif
126  #elif (_MSC_VER == 1800)
127  #if (_MSC_FULL_VER == 180021005)
128  "MSVC 2013";
129  #elif (_MSC_FULL_VER == 180030501)
130  "MSVC 2013.2";
131  #elif (_MSC_FULL_VER == 180030723)
132  "MSVC 2013.3";
133  #elif (_MSC_FULL_VER == 180031101)
134  "MSVC 2013.4";
135  #elif (_MSC_FULL_VER == 180040629)
136  "MSVC 2013.5";
137  #else
138  #error Compiler version is not supported yet!
139  #endif
140  #elif (_MSC_VER == 1700)
141  #if (_MSC_FULL_VER == 170050727)
142  "MSVC 2012";
143  #elif (_MSC_FULL_VER == 170051106)
144  "MSVC 2012.1";
145  #elif (_MSC_FULL_VER == 170060315)
146  "MSVC 2012.2";
147  #elif (_MSC_FULL_VER == 170060610)
148  "MSVC 2012.3";
149  #elif (_MSC_FULL_VER == 170061030)
150  "MSVC 2012.4";
151  #else
152  #error Compiler version is not supported yet!
153  #endif
154  #elif (_MSC_VER == 1600)
155  #if (_MSC_FULL_VER >= 160040219)
156  "MSVC 2010-SP1";
157  #else
158  "MSVC 2010";
159  #endif
160  #elif (_MSC_VER == 1500)
161  #if (_MSC_FULL_VER >= 150030729)
162  "MSVC 2008-SP1";
163  #else
164  "MSVC 2008";
165  #endif
166  #else
167  #error Compiler is not supported!
168  #endif
169  #else
170  #error Compiler is not supported!
171  #endif
172  return COMPILER_VERS;
173  }
174 
175  //Architecture detection
176  static const char *const compiler_arch(void)
177  {
178  static const char *const COMPILER_ARCH =
179  #if defined(_M_X64)
180  "x64";
181  #elif defined(_M_IX86)
182  "x86";
183  #else
184  #error Architecture is not supported!
185  #endif
186  return COMPILER_ARCH;
187  }
188 
189  private:
190  //Raw Build date
191  static const char *const build_date_raw(void)
192  {
193  static const char *const RAW_BUILD_DATE = __DATE__;
194  return RAW_BUILD_DATE;
195  }
196 
197  //Raw Build time
198  static const char *const build_time_raw(void)
199  {
200  static const char *const RAW_BUILD_TIME = __TIME__;
201  return RAW_BUILD_TIME;
202  }
203 
204  //Disable construction
205  Version(void) { throw 666; }
206  Version(const Version&) { throw 666; }
207  };
208 }
209 
Definition: Version.h:34
This file contains miscellaneous functions that are generally useful for Qt-based applications...
Global MUtils namespace.
Definition: CPUFeatures.h:37