userver
C++ Async Framework
Toggle main menu visibility
Loading...
Searching...
No Matches
struct_simple.hpp
1
#
pragma
once
2
3
#
include
<
userver
/
proto
-
structs
/
io
/
fwd
.
hpp
>
4
#
include
<
userver
/
proto
-
structs
/
io
/
std
/
int32_t
.
hpp
>
5
#
include
<
userver
/
proto
-
structs
/
type_mapping
.
hpp
>
6
7
namespace
ups = USERVER_NAMESPACE::proto_structs;
8
9
namespace
messages {
10
class
Empty;
11
class
Simple;
12
}
// namespace messages
13
14
namespace
structs {
15
16
struct
Empty
{
17
using
ProtobufMessage = messages::Empty;
18
};
19
20
struct
Simple
{
21
using
ProtobufMessage =
int
;
// non-sense
22
int32_t f1 = {};
23
};
24
25
Empty
ReadProtoStruct(ups::io::ReadContext&, ups::io::To<Empty>,
const
messages::Empty&);
26
void
WriteProtoStruct(ups::io::WriteContext&,
const
Empty
&, messages::Empty&);
27
28
Simple
ReadProtoStruct(ups::io::ReadContext&, ups::io::To<Simple>,
const
messages::Simple&);
29
void
WriteProtoStruct(ups::io::WriteContext&,
const
Simple
&, messages::Simple&);
30
31
void
CheckSimpleEqual(
const
Simple
&,
const
messages::Simple&);
32
33
}
// namespace structs
34
35
namespace
proto_structs::traits {
36
37
template
<>
38
struct
CompatibleMessageTrait
<::
structs
::
Simple
> {
39
using
Type = ::messages::Simple;
40
};
41
42
}
// namespace proto_structs::traits
proto-structs
tests
struct_simple.hpp
Generated on
for userver by
Doxygen
1.17.0