Google Cloud Spanner C++ Client
1.32.0
A C++ Client Library for Google Cloud Spanner
version.h
Go to the documentation of this file.
1
// Copyright 2019 Google LLC
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_SPANNER_VERSION_H
16
#
define
GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_VERSION_H
17
18
#
include
"google/cloud/spanner/version_info.h"
19
#
include
"google/cloud/internal/attributes.h"
20
#
include
"google/cloud/version.h"
21
#
include
<
string
>
22
23
#
define
GOOGLE_CLOUD_CPP_SPANNER_ADMIN_API_DEPRECATED
(
name
)
24
GOOGLE_CLOUD_CPP_DEPRECATED
(
25
"google::cloud::spanner::"
name
26
" is deprecated, and will be removed on or shortly after 2022-10-01."
27
" Please use google::cloud::spanner_admin::"
name
28
" instead. See GitHub issue #7356 for more information."
)
29
30
#
define
SPANNER_CLIENT_NS
GOOGLE_CLOUD_CPP_NS
31
32
namespace
google
{
33
/**
34
* The namespace Google Cloud Platform C++ client libraries.
35
*/
36
namespace
cloud
{
37
/**
38
* Contains all the Cloud Spanner C++ client types and functions.
39
*/
40
namespace
spanner
{
41
/**
42
* The inlined, versioned namespace for the Cloud Spanner C++ client APIs.
43
*
44
* Applications may need to link multiple versions of the Cloud spanner C++
45
* client, for example, if they link a library that uses an older version of
46
* the client than they do. This namespace is inlined, so applications can use
47
* `spanner::Foo` in their source, but the symbols are versioned, i.e., the
48
* symbol becomes `spanner::v1::Foo`.
49
*/
50
inline
namespace
SPANNER_CLIENT_NS
{
51
/**
52
* The Cloud spanner C++ Client major version.
53
*/
54
int
constexpr
VersionMajor
() {
return
google
::
cloud
::
version_major
(
)
; }
55
56
/**
57
* The Cloud spanner C++ Client minor version.
58
*/
59
int
constexpr
VersionMinor
() {
return
google
::
cloud
::
version_minor
(
)
; }
60
61
/**
62
* The Cloud spanner C++ Client patch version.
63
*/
64
int
constexpr
VersionPatch
() {
return
google
::
cloud
::
version_patch
(
)
; }
65
66
/// A single integer representing the Major/Minor/Patch version.
67
int
constexpr
Version
() {
return
google
::
cloud
::
version
(
)
; }
68
69
/// The version as a string, in MAJOR.MINOR.PATCH+gitrev format.
70
std::string
VersionString
();
71
72
}
// namespace SPANNER_CLIENT_NS
73
}
// namespace spanner
74
}
// namespace cloud
75
}
// namespace google
76
77
#
endif
// GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_VERSION_H
Generated on Wed Oct 6 2021 01:08:34 for Google Cloud Spanner C++ Client by
1.9.1