VAPOR3 3.9.4
Version.h
Go to the documentation of this file.
1//************************************************************************
2// *
3// Copyright (C) 2004 *
4// University Corporation for Atmospheric Research *
5// All Rights Reserved *
6// *
7//************************************************************************/
8//
9// File:
10//
11// Author: John Clyne
12// National Center for Atmospheric Research
13// PO 3000, Boulder, Colorado
14//
15// Date: Tue Jul 11 11:59:53 MDT 2006
16//
17// Description: Version information.
18//
19
27
28#ifndef _Version_h_
29#define _Version_h_
30
31#include <string>
32#include <cstdlib>
33#include <vapor/MyBase.h>
34#include <vapor/common.h>
35#include <vapor/CMakeConfig.h>
36
37using namespace std;
38
39namespace Wasp {
40
41//
42class COMMON_API Version : public MyBase {
43public:
45 //
46 static int GetMajor() { return (_majorVersion); }
47
49 //
50 static int GetMinor() { return (_minorVersion); }
51
53 //
54 static int GetMinorMinor() { return (_minorMinorVersion); }
55
57 //
58 static string GetRC() { return (VERSION_RC); }
59
60 static string GetBuildType() { return (BUILD_TYPE); }
61
67 //
68 static const string &GetVersionString();
69
74 //
75 static const string &GetFullVersionString();
76
78 //
79 static const string GetBuildHash();
80
86 //
87 static const string &GetDateString()
88 {
89 _dateString.assign(VERSION_DATE);
90 return (_dateString);
91 }
92
95 //
96 static void Parse(std::string ver, int &major, int &minor, int &minorminor, string &rc);
97
98 static int Compare(int major, int minor, int minorminor);
99 static int Compare(std::string ver1, std::string ver2);
100
101private:
102 static const int _majorVersion;
103 static const int _minorVersion;
104 static const int _minorMinorVersion;
105 static string _formatString;
106 static string _dateString;
107};
108} // namespace Wasp
109
110#endif
const CMakeConfigStringType VERSION_RC
const CMakeConfigStringType VERSION_DATE
const CMakeConfigStringType BUILD_TYPE
Wasp base class.
Definition: MyBase.h:67
static const string & GetDateString()
Definition: Version.h:87
static string GetRC()
Return the sub minor version number.
Definition: Version.h:58
static int Compare(std::string ver1, std::string ver2)
static const string & GetFullVersionString()
static const string & GetVersionString()
static int GetMajor()
Return the major version number.
Definition: Version.h:46
static int GetMinorMinor()
Return the sub minor version number.
Definition: Version.h:54
static void Parse(std::string ver, int &major, int &minor, int &minorminor, string &rc)
static string GetBuildType()
Definition: Version.h:60
static const string GetBuildHash()
Return the git hash of the current build.
static int GetMinor()
Return the minor version number.
Definition: Version.h:50
static int Compare(int major, int minor, int minorminor)
#define COMMON_API
Definition: common.h:72
Definition: CFuncs.h:31