version.hpp
1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/*************************************************************************
*
* REALM CONFIDENTIAL
* __________________
*
* [2011] - [2015] Realm Inc
* All Rights Reserved.
*
* NOTICE: All information contained herein is, and remains
* the property of Realm Incorporated and its suppliers,
* if any. The intellectual and technical concepts contained
* herein are proprietary to Realm Incorporated
* and its suppliers and may be covered by U.S. and Foreign Patents,
* patents in process, and are protected by trade secret or copyright law.
* Dissemination of this information or reproduction of this material
* is strictly forbidden unless prior written permission is obtained
* from Realm Incorporated.
*
**************************************************************************/
#ifndef REALM_VERSION_HPP
#define REALM_VERSION_HPP
#include <string>
#include <sstream>
#define REALM_VER_MAJOR 0
#define REALM_VER_MINOR 97
#define REALM_VER_PATCH 4
#define REALM_PRODUCT_NAME "realm-core"
#define REALM_QUOTE2(X) #X
#define REALM_QUOTE(X) REALM_QUOTE2(X)
#define REALM_VER_STRING REALM_QUOTE(REALM_VER_MAJOR) "." REALM_QUOTE(REALM_VER_MINOR) "." REALM_QUOTE(REALM_VER_PATCH)
#define REALM_VER_CHUNK "[" REALM_PRODUCT_NAME "-" REALM_VER_STRING "]"
namespace realm {
enum Feature {
feature_Debug,
feature_Replication
};
class Version {
public:
static int get_major() { return REALM_VER_MAJOR; }
static int get_minor() { return REALM_VER_MINOR; }
static int get_patch() { return REALM_VER_PATCH; }
static std::string get_version();
static bool is_at_least(int major, int minor, int patch);
static bool has_feature(Feature feature);
};
} // namespace realm
#endif // REALM_VERSION_HPP