LibNRG  0.0.1
Networking for Real-time Games library
 All Classes Files Functions Variables Friends
nrg_version.h
Go to the documentation of this file.
1 /*
2  LibNRG - Networking for Real-time Games
3 
4  Copyright (C) 2012-2014 Alex Baines <alex@abaines.me.uk>
5 
6  This software is provided 'as-is', without any express or implied
7  warranty. In no event will the authors be held liable for any damages
8  arising from the use of this software.
9 
10  Permission is granted to anyone to use this software for any purpose,
11  including commercial applications, and to alter it and redistribute it
12  freely, subject to the following restrictions:
13 
14  1. The origin of this software must not be misrepresented; you must not
15  claim that you wrote the original software. If you use this software
16  in a product, an acknowledgment in the product documentation would be
17  appreciated but is not required.
18  2. Altered source versions must be plainly marked as such, and must not be
19  misrepresented as being the original software.
20  3. This notice may not be removed or altered from any source distribution.
21 */
25 #ifndef NRG_VERSION_H_
26 #define NRG_VERSION_H_
27 #include "nrg_core.h"
28 namespace nrg {
29 
31 struct Version {
32  uint16_t v_major, v_minor, v_patch;
33 
36  : v_major(0)
37  , v_minor(0)
38  , v_patch(0){
39 
40  }
41 
43  Version(uint16_t a, uint16_t b, uint16_t c)
44  : v_major(a)
45  , v_minor(b)
46  , v_patch(c){
47 
48  }
49 
52  bool operator>(const Version&) const ;
53  bool operator<(const Version&) const ;
54  bool operator>=(const Version&) const ;
55  bool operator<=(const Version&) const ;
56  bool operator==(const Version&) const ;
57  bool operator!=(const Version&) const ;
59 };
60 
62 Version getLibVersion(void);
63 
65 bool isVersionCompatible(const Version& v);
66 
67 }
68 
69 #endif
70 
A class to store the version of the library.
Definition: nrg_version.h:31
Version(uint16_t a, uint16_t b, uint16_t c)
Construct with major, minor and patch version a, b, and c respectively.
Definition: nrg_version.h:43
Version()
Default constructor.
Definition: nrg_version.h:35
Common defines and includes used by all the other nrg header files.