Google Cloud Bigtable C++ Client  1.1.0
A C++ Client Library for Google Cloud Bigtable
version.h
Go to the documentation of this file.
1 // Copyright 2017 Google Inc.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_VERSION_H_
16 #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_VERSION_H_
17 
18 #include "google/cloud/bigtable/version_info.h"
19 #include "google/cloud/version.h"
20 #include <string>
21 
22 #define BIGTABLE_CLIENT_NS
25 
26 namespace google {
27 namespace cloud {
28 /**
29  * Contains all the Cloud Bigtable C++ client APIs.
30  */
31 namespace bigtable {
32 /**
33  * The inlined, versioned namespace for the Cloud Bigtable C++ client APIs.
34  *
35  * Applications may need to link multiple versions of the Cloud Bigtable C++
36  * client, for example, if they link a library that uses an older version of
37  * the client than they do. This namespace is inlined, so applications can use
38  * `bigtable::Foo` in their source, but the symbols are versioned, i.e., the
39  * symbol becomes `bigtable::v1::Foo`.
40  *
41  * Note that, consistent with the semver.org guidelines, the v0 version makes
42  * no guarantees with respect to backwards compatibility.
43  */
44 inline namespace BIGTABLE_CLIENT_NS {
45 /**
46  * The Cloud Bigtable C++ Client major version.
47  *
48  * @see https://semver.org/spec/v2.0.0.html for details.
49  */
50 int constexpr version_major() { return BIGTABLE_CLIENT_VERSION_MAJOR; }
51 
52 /**
53  * The Cloud Bigtable C++ Client minor version.
54  *
55  * @see https://semver.org/spec/v2.0.0.html for details.
56  */
57 int constexpr version_minor() { return BIGTABLE_CLIENT_VERSION_MINOR; }
58 
59 /**
60  * The Cloud Bigtable C++ Client patch version.
61  *
62  * @see https://semver.org/spec/v2.0.0.html for details.
63  */
64 int constexpr version_patch() { return BIGTABLE_CLIENT_VERSION_PATCH; }
65 
66 /// A single integer representing the Major/Minor/Patch version.
67 int constexpr version() {
68  return 100 * (100 * version_major() + version_minor()) + version_patch();
69 }
70 
71 /// The version as a string, in MAJOR.MINOR.PATCH+gitrev format.
72 std::string version_string();
73 
74 } // namespace BIGTABLE_CLIENT_NS
75 } // namespace bigtable
76 } // namespace cloud
77 } // namespace google
78 
79 #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_VERSION_H_
#define GOOGLE_CLOUD_CPP_VEVAL(Ma, Mi)
int constexpr version_patch()
The Cloud Bigtable C++ Client patch version.
Definition: version.h:64
int constexpr version_minor()
The Cloud Bigtable C++ Client minor version.
Definition: version.h:57
#define BIGTABLE_CLIENT_VERSION_MAJOR
Definition: version_info.h:18
std::string version_string()
The version as a string, in MAJOR.MINOR.PATCH+gitrev format.
Definition: version.cc:24
#define BIGTABLE_CLIENT_VERSION_PATCH
Definition: version_info.h:20
int constexpr version_major()
The Cloud Bigtable C++ Client major version.
Definition: version.h:50
#define BIGTABLE_CLIENT_VERSION_MINOR
Definition: version_info.h:19
#define BIGTABLE_CLIENT_NS
Definition: version.h:22
int constexpr version()
A single integer representing the Major/Minor/Patch version.
Definition: version.h:67
Contains all the Cloud Bigtable C++ client APIs.