Apply the new ground_level method.
[crawl.git] / crawl-ref / source / version.h
blob52c8d0e47036164d04e8d7686d31415ba01d28df
1 /*
2 * File: version.h
3 * Summary: Contains version information
4 */
6 #ifndef VERSION_H
7 #define VERSION_H
9 #define CRAWL "Dungeon Crawl Stone Soup"
11 namespace Version
13 //! The short version string.
14 /*!
15 * This version will generally match the last version tag. For instance,
16 * if the last tag of Crawl before this build was '0.1.2', you'd see
17 * '0.1.2'. This version number does not include some rather important
18 * extra information useful for getting the exact revision (the Git commit
19 * hash and the number of revisions since the tag). For that extra information,
20 * use Version::Long() instead.
22 * For extracting individual components of the version, you should use the
23 * Major(), Minor(), Revision() and Build() functions.
25 std::string Short();
27 //! The long version string.
28 /*!
29 * This string contains detailed version information about the CrissCross
30 * build in use. The string will always start with the Git tag that this
31 * build descended from. If this build is not an exact match for a given
32 * tag, this string will also include the number of commits since the tag
33 * and the Git commit id (the SHA-1 hash).
35 std::string Long();
37 //! The major version number.
38 /*!
39 * This is the first number to appear in a version tag. For instance,
40 * if the tag is '0.1.2.3', this function would return '0'.
42 int Major();
44 //! The minor version number.
45 /*!
46 * This is the second number to appear in a version tag. For instance,
47 * if the tag is '0.1.2.3', this function would return '1'.
49 int Minor();
51 //! The revision number.
52 /*!
53 * This is the third number to appear in a version tag. For instance,
54 * if the tag is '0.1.2.3', this function would return '2'.
56 int Revision();
58 //! The build number.
59 /*!
60 * This is the fourth number to appear in a version tag. For instance,
61 * if the tag is '0.1.2.3', this function would return '3'.
63 int Build();
65 typedef enum {
66 DEV, /*!< In-development version (does not exactly match a tag). i.e. '0.1.2-3-g3af4131'. */
67 ALPHA, /*!< An alpha release. i.e. '0.1.2-a3' */
68 BETA, /*!< A beta release. i.e. '0.1.2-b3' */
69 RC, /*!< A release candidate. i.e. '0.1.2-rc3' */
70 FINAL /*!< A final release. i.e. '0.1.2' */
71 } Class;
73 //! The release class.
74 /*!
75 * Indicates the type of release. For instance, if you have a tag such
76 * as '0.1.2-b1', the class is 'BETA'. Valid suffixes are '-a', '-b',
77 * '-rc'. If the version string does not precisely match a tag, then it
78 * is considered an in-development version.
80 Class ReleaseType();
82 //! The release ID.
83 /*!
84 * If this is a special type of release (alpha, beta, rc), then this
85 * will return the alpha/beta/rc number. Otherwise, this returns 0.
87 int ReleaseID();
89 //! The compiler used.
90 /*!
91 * Names the compiler used to genrate the executable.
93 std::string Compiler();
95 //! The compiling operating system.
96 /*!
97 * Names the operating system that the executable was compiled on.
99 std::string BuildOS();
101 //! The compiling operating system's version.
103 * Specifies the version of the OS that the executable was compiled on.
105 std::string BuildOSVersion();
107 //! The machine type.
109 * Names the machine type (e.g., "i686") the executable was compiled on.
111 std::string BuildMachine();
113 //! The processor type.
115 * Names the processor type the executable was compiled on.
117 std::string BuildProcessor();
119 //! The CFLAGS.
121 * Returns the CFLAGS the executable was compiled with.
123 std::string CFLAGS();
125 //! The LDFLAGS.
127 * Returns the flags the executable was linked with.
129 std::string LDFLAGS();
132 std::string compilation_info();
134 #endif