FIFE
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
version.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2005-2013 by the FIFE team *
3  * http://www.fifengine.net *
4  * This file is part of FIFE. *
5  * *
6  * FIFE is free software; you can redistribute it and/or *
7  * modify it under the terms of the GNU Lesser General Public *
8  * License as published by the Free Software Foundation; either *
9  * version 2.1 of the License, or (at your option) any later version. *
10  * *
11  * This library is distributed in the hope that it will be useful, *
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
14  * Lesser General Public License for more details. *
15  * *
16  * You should have received a copy of the GNU Lesser General Public *
17  * License along with this library; if not, write to the *
18  * Free Software Foundation, Inc., *
19  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
20  ***************************************************************************/
21 
22 #ifndef FIFE_VERSION_H
23 #define FIFE_VERSION_H
24 
25 // These version numbers should be checked and updated
26 // as part of the release process for FIFE.
27 #define FIFE_MAJOR_VERSION 0
28 #define FIFE_MINOR_VERSION 3
29 #define FIFE_SUBMINOR_VERSION 5
30 
31 // -------------------------------------------------------------------------
32 // Do not update anything below this line!
33 // -------------------------------------------------------------------------
34 
35 #define FIFE_STR(s) # s
36 #define FIFE_XSTR(s) FIFE_STR(s)
37 
38 #define FIFE_DOT(a,b) a ## . ## b
39 #define FIFE_XDOT(a,b) FIFE_DOT(a,b)
40 
41 #define FIFE_VERSION_STRING \
42  FIFE_XDOT( \
43  FIFE_XDOT(FIFE_MAJOR_VERSION, FIFE_MINOR_VERSION), \
44  FIFE_SUBMINOR_VERSION \
45  )
46 
51 namespace FIFE {
52  inline const char* getVersion() {
54  }
55 
56  inline int getMajor() {
57  return FIFE_MAJOR_VERSION;
58  }
59 
60  inline int getMinor() {
61  return FIFE_MINOR_VERSION;
62  }
63 
64  inline int getSubMinor() {
65  return FIFE_SUBMINOR_VERSION;
66  }
67 
68  inline int getRevision() {
69 #ifdef FIFE_REVISION
70  return FIFE_REVISION;
71 #else
72  //This is useless since moving to git so we return a bogus number.
73  //The next release will not include this at all.
74  return 9999;
75 #endif
76  }
77 } //FIFE
78 
79 //cleanup
80 #undef FIFE_STR
81 #undef FIFE_XSTR
82 #undef FIFE_DOT
83 #undef FIFE_XDOT
84 #undef FIFE_VERSION_STRING
85 
86 #endif //FIFE_VERSION_H
87 
#define FIFE_XSTR(s)
Definition: version.h:36
#define FIFE_MAJOR_VERSION
Definition: version.h:27
#define FIFE_SUBMINOR_VERSION
Definition: version.h:29
int getMinor()
Definition: version.h:60
const char * getVersion()
Definition: version.h:52
int getSubMinor()
Definition: version.h:64
int getMajor()
Definition: version.h:56
#define FIFE_MINOR_VERSION
Definition: version.h:28
int getRevision()
Definition: version.h:68
#define FIFE_VERSION_STRING
Definition: version.h:41