srs-control
0.2.2
Toggle main menu visibility
Loading...
Searching...
No Matches
ProtoMsgReader.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include "
srs/data/SRSDataStructs.hpp
"
4
#include <memory>
5
#include <string_view>
6
7
namespace
srs
8
{
9
namespace
process
10
{
11
class
Proto2StructConverter
;
12
class
ProtoDeserializer
;
13
}
// namespace process
14
15
namespace
reader
16
{
17
class
ProtoMsg
18
{
19
public
:
23
ProtoMsg
();
24
26
ProtoMsg
(
const
ProtoMsg
&) =
delete
;
27
29
ProtoMsg
&
operator=
(
const
ProtoMsg
&) =
delete
;
30
32
ProtoMsg
(
ProtoMsg
&&) =
default
;
33
35
ProtoMsg
&
operator=
(
ProtoMsg
&&) =
default
;
36
38
~ProtoMsg
();
39
46
void
convert
(std::string_view msg,
StructData
& struct_data);
47
57
auto
convert
(std::string_view msg) ->
const
StructData
&;
58
59
private
:
61
std::unique_ptr<process::Proto2StructConverter>
proto_to_struct_converter_
;
62
64
std::unique_ptr<process::ProtoDeserializer>
proto_deserializer_
;
65
};
66
}
// namespace reader
67
}
// namespace srs
SRSDataStructs.hpp
srs::process::Proto2StructConverter
Definition
ProtoToStructConverter.hpp:10
srs::process::ProtoDeserializer
Definition
ProtoDeserializer.hpp:11
srs::reader::ProtoMsg::proto_to_struct_converter_
std::unique_ptr< process::Proto2StructConverter > proto_to_struct_converter_
A converter to transform Protobuf struct to native C++ struct.
Definition
ProtoMsgReader.hpp:61
srs::reader::ProtoMsg::ProtoMsg
ProtoMsg()
Definition
ProtoMsgReader.cpp:10
srs::reader::ProtoMsg::operator=
ProtoMsg & operator=(ProtoMsg &&)=default
Default move assignment.
srs::reader::ProtoMsg::~ProtoMsg
~ProtoMsg()
Default destructor.
srs::reader::ProtoMsg::ProtoMsg
ProtoMsg(const ProtoMsg &)=delete
Deleted copy constructor.
srs::reader::ProtoMsg::convert
void convert(std::string_view msg, StructData &struct_data)
Definition
ProtoMsgReader.cpp:18
srs::reader::ProtoMsg::proto_deserializer_
std::unique_ptr< process::ProtoDeserializer > proto_deserializer_
A converter to transform binary data to Protobuf struct.
Definition
ProtoMsgReader.hpp:64
srs::reader::ProtoMsg::operator=
ProtoMsg & operator=(const ProtoMsg &)=delete
Deleted copy assignment.
srs::reader::ProtoMsg::ProtoMsg
ProtoMsg(ProtoMsg &&)=default
Default move constructor.
srs::process
Definition
ConverterConcepts.hpp:6
srs::reader
Definition
ProtoMsgReader.cpp:9
srs
Definition
Application.cpp:45
srs::StructData
Definition
SRSDataStructs.hpp:59
backend
srs
readers
ProtoMsgReader.hpp
Impressum
Datenschutzerklärung
Generated by
1.17.0