SRS-control 0.1.4
 
Loading...
Searching...
No Matches
ProtoMsgReader.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <memory>
5#include <string_view>
6
7namespace srs
8{
9 namespace process
10 {
13 } // namespace process
14
15 namespace reader
16 {
18 {
19 public:
23 ProtoMsg();
24
26 ProtoMsg(const ProtoMsg&) = delete;
27
29 ProtoMsg& operator=(const ProtoMsg&) = delete;
30
32 ProtoMsg(ProtoMsg&&) = default;
33
36
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
std::unique_ptr< process::Proto2StructConverter > proto_to_struct_converter_
A converter to transform Protobuf struct to native C++ struct.
ProtoMsg & operator=(ProtoMsg &&)=default
Default move assignment.
~ProtoMsg()
Default destructor.
ProtoMsg(const ProtoMsg &)=delete
Deleted copy constructor.
void convert(std::string_view msg, StructData &struct_data)
std::unique_ptr< process::ProtoDeserializer > proto_deserializer_
A converter to transform binary data to Protobuf struct.
ProtoMsg & operator=(const ProtoMsg &)=delete
Deleted copy assignment.
ProtoMsg(ProtoMsg &&)=default
Default move constructor.