Mir
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
src
include
common
mir
protobuf
google_protobuf_guard.h
Go to the documentation of this file.
1
/*
2
* Copyright © 2012 Canonical Ltd.
3
*
4
* This program is free software: you can redistribute it and/or modify it
5
* under the terms of the GNU Lesser General Public License version 3,
6
* as published by the Free Software Foundation.
7
*
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU Lesser General Public License for more details.
12
*
13
* You should have received a copy of the GNU Lesser General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
15
*
16
* Authored by: Alan Griffiths <alan@octopull.co.uk>
17
*/
18
19
#ifndef MIR_PROTOBUF_GOOGLE_PROTOBUF_GUARD_H_
20
#define MIR_PROTOBUF_GOOGLE_PROTOBUF_GUARD_H_
21
22
namespace
mir
23
{
24
26
namespace
protobuf
27
{
28
void
google_protobuf_guard
();
29
}
30
}
31
32
// Any translation unit that includes this header will get this as part
33
// of its initialization, and, in turn, this ensures that protobuf gets
34
// initialized (and cleaned up) in a sensible sequence.
35
namespace
36
{
37
bool
force_google_protobuf_init{(
mir::protobuf::google_protobuf_guard
(),
true
)};
38
}
39
40
#endif
/* MIR_PROTOBUF_GOOGLE_PROTOBUF_GUARD_H_ */
mir
All things Mir.
Definition:
buffer_stream.h:37
mir::protobuf::google_protobuf_guard
void google_protobuf_guard()
Definition:
google_protobuf_guard.cpp:51
Copyright © 2012,2013 Canonical Ltd.
Generated on Tue Mar 24 16:15:19 UTC 2015