Google Cloud Bigtable C++ Client  1.1.0
A C++ Client Library for Google Cloud Bigtable
version.cc
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 #include "google/cloud/bigtable/version.h"
16 #include "google/cloud/internal/build_info.h"
17 #include <sstream>
18 
19 namespace google {
20 namespace cloud {
21 namespace bigtable {
22 inline namespace BIGTABLE_CLIENT_NS {
23 // NOLINTNEXTLINE(readability-identifier-naming)
24 std::string version_string() {
25  static std::string const kVersion = [] {
26  std::ostringstream os;
27  os << "v" << version_major() << "." << version_minor() << "."
28  << version_patch();
29  if (!google::cloud::internal::is_release()) {
30  os << "+" << google::cloud::internal::build_metadata();
31  }
32  return os.str();
33  }();
34  return kVersion;
35 }
36 } // namespace BIGTABLE_CLIENT_NS
37 } // namespace bigtable
38 } // namespace cloud
39 } // namespace google
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
std::string version_string()
The version as a string, in MAJOR.MINOR.PATCH+gitrev format.
Definition: version.cc:24
int constexpr version_major()
The Cloud Bigtable C++ Client major version.
Definition: version.h:50
#define BIGTABLE_CLIENT_NS
Definition: version.h:22
Contains all the Cloud Bigtable C++ client APIs.