cleanCppProject  0.2.0
version.h
Go to the documentation of this file.
1 #pragma once
2 #include <string>
3 
4 
5 namespace Version
6 {
7 /// Get time of build in format like: Feb 20 2016 14:38:27
8 std::string getBuildTime();
9 
10 int getMajor(); ///< Returns Major part of version
11 int getMinor(); ///< Returns Minor part of version
12 int getPatch(); ///< Return Patch part of version
13 
14 /**
15  * Returns version in one big number with format:
16  *
17  * * MMMMmmmmpppp (M-Major, m-minor, p-patch)
18  *
19  * So 1.2.3 will be 100020003 (leading zeroes are not displayed)
20  * @return long integer with version
21  */
22 long long getVersionNumber();
23 
24 /**
25  * Returns version string with version in format:
26  * * vMajor.Minor.Patch VersionType
27  * * v1.2.3 beta
28  */
29 std::string getVersionShort();
30 
31 /**
32  * Returns Version + Date + Build machine
33  *
34  * Will produce result similar to:
35  * 1.2.6 beta / Feb 20 2016 14:42:41 / buildMachine
36  */
37 std::string getVersionLong();
38 
39 /**
40  * Returns name of the build machine.
41  *
42  * Can be changed with cmake .. -DVERSION_HOST=newName
43  */
44 std::string getBuildMachine();
45 }
std::string getVersionLong()
Returns Version + Date + Build machine.
std::string getBuildTime()
Get time of build in format like: Feb 20 2016 14:38:27.
int getMinor()
Returns Minor part of version.
std::string getBuildMachine()
Returns name of the build machine.
int getPatch()
Return Patch part of version.
std::string getVersionShort()
Returns version string with version in format:
int getMajor()
Returns Major part of version.
Definition: version.h:5
long long getVersionNumber()
Returns version in one big number with format: