Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
z
Classes
Class List
Class Hierarchy
Class Members
All
:
[
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
[
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
y
Enumerations
a
b
c
d
e
f
h
i
k
l
m
n
o
p
r
s
t
u
v
w
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Properties
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
Related Functions
:
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
z
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
grpc
include
grpcpp
impl
codegen
grpcpp/impl/codegen/grpc_library.h
Go to the documentation of this file.
1
/*
2
*
3
* Copyright 2016 gRPC authors.
4
*
5
* Licensed under the Apache License, Version 2.0 (the "License");
6
* you may not use this file except in compliance with the License.
7
* You may obtain a copy of the License at
8
*
9
* http://www.apache.org/licenses/LICENSE-2.0
10
*
11
* Unless required by applicable law or agreed to in writing, software
12
* distributed under the License is distributed on an "AS IS" BASIS,
13
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
* See the License for the specific language governing permissions and
15
* limitations under the License.
16
*
17
*/
18
19
#ifndef GRPCPP_IMPL_CODEGEN_GRPC_LIBRARY_H
20
#define GRPCPP_IMPL_CODEGEN_GRPC_LIBRARY_H
21
22
// IWYU pragma: private, include <grpcpp/impl/grpc_library.h>
23
24
#include <
grpcpp/impl/codegen/core_codegen_interface.h
>
25
26
namespace
grpc
{
27
28
class
GrpcLibraryInterface
{
29
public
:
30
virtual
~GrpcLibraryInterface
() =
default
;
31
virtual
void
init
() = 0;
32
virtual
void
shutdown
() = 0;
33
};
34
37
extern
GrpcLibraryInterface
*
g_glip
;
38
40
class
GrpcLibraryCodegen
{
41
public
:
42
explicit
GrpcLibraryCodegen
(
bool
call_grpc_init =
true
)
43
:
grpc_init_called_
(
false
) {
44
if
(call_grpc_init) {
45
GPR_CODEGEN_ASSERT
(
g_glip
&&
46
"gRPC library not initialized. See "
47
"grpc::internal::GrpcLibraryInitializer."
);
48
g_glip
->
init
();
49
grpc_init_called_
=
true
;
50
}
51
}
52
virtual
~GrpcLibraryCodegen
() {
53
if
(
grpc_init_called_
) {
54
GPR_CODEGEN_ASSERT
(
g_glip
&&
55
"gRPC library not initialized. See "
56
"grpc::internal::GrpcLibraryInitializer."
);
57
g_glip
->
shutdown
();
58
}
59
}
60
61
private
:
62
bool
grpc_init_called_
;
63
};
64
65
}
// namespace grpc
66
67
#endif // GRPCPP_IMPL_CODEGEN_GRPC_LIBRARY_H
grpc::GrpcLibraryCodegen::~GrpcLibraryCodegen
virtual ~GrpcLibraryCodegen()
Definition:
grpcpp/impl/codegen/grpc_library.h:52
grpc
Definition:
grpcpp/alarm.h:33
false
#define false
Definition:
setup_once.h:323
core_codegen_interface.h
grpc::GrpcLibraryCodegen
Classes that require gRPC to be initialized should inherit from this class.
Definition:
grpcpp/impl/codegen/grpc_library.h:40
grpc::GrpcLibraryInterface
Definition:
grpcpp/impl/codegen/grpc_library.h:28
grpc::GrpcLibraryInterface::~GrpcLibraryInterface
virtual ~GrpcLibraryInterface()=default
grpc::GrpcLibraryCodegen::GrpcLibraryCodegen
GrpcLibraryCodegen(bool call_grpc_init=true)
Definition:
grpcpp/impl/codegen/grpc_library.h:42
grpc::g_glip
GrpcLibraryInterface * g_glip
Definition:
codegen_init.cc:30
GPR_CODEGEN_ASSERT
#define GPR_CODEGEN_ASSERT(x)
Codegen specific version of GPR_ASSERT.
Definition:
grpcpp/impl/codegen/core_codegen_interface.h:151
grpc::GrpcLibraryCodegen::grpc_init_called_
bool grpc_init_called_
Definition:
grpcpp/impl/codegen/grpc_library.h:62
grpc::GrpcLibraryInterface::init
virtual void init()=0
grpc::GrpcLibraryInterface::shutdown
virtual void shutdown()=0
grpc
Author(s):
autogenerated on Thu Mar 13 2025 02:59:47