SRS-control 0.1.4
 
Loading...
Searching...
No Matches
srs::reader::ProtoMsg Class Reference

#include <ProtoMsgReader.hpp>

Collaboration diagram for srs::reader::ProtoMsg:

Public Member Functions

 ProtoMsg ()
 
 ProtoMsg (const ProtoMsg &)=delete
 Deleted copy constructor.
 
ProtoMsgoperator= (const ProtoMsg &)=delete
 Deleted copy assignment.
 
 ProtoMsg (ProtoMsg &&)=default
 Default move constructor.
 
ProtoMsgoperator= (ProtoMsg &&)=default
 Default move assignment.
 
 ~ProtoMsg ()
 Default destructor.
 
void convert (std::string_view msg, StructData &struct_data)
 
auto convert (std::string_view msg) -> const StructData &
 

Private Attributes

std::unique_ptr< process::Proto2StructConverterproto_to_struct_converter_
 A converter to transform Protobuf struct to native C++ struct.
 
std::unique_ptr< process::ProtoDeserializerproto_deserializer_
 A converter to transform binary data to Protobuf struct.
 

Detailed Description

Definition at line 17 of file ProtoMsgReader.hpp.

Constructor & Destructor Documentation

◆ ProtoMsg() [1/3]

srs::reader::ProtoMsg::ProtoMsg ( )

Constructor allocates the memeory for member variables

Definition at line 7 of file ProtoMsgReader.cpp.

◆ ProtoMsg() [2/3]

srs::reader::ProtoMsg::ProtoMsg ( const ProtoMsg & )
delete

Deleted copy constructor.

◆ ProtoMsg() [3/3]

srs::reader::ProtoMsg::ProtoMsg ( ProtoMsg && )
default

Default move constructor.

◆ ~ProtoMsg()

srs::reader::ProtoMsg::~ProtoMsg ( )
default

Default destructor.

Member Function Documentation

◆ convert() [1/2]

auto srs::reader::ProtoMsg::convert ( std::string_view msg) -> const StructData&

Convert binary data to a struct, owned by ProtoMsgReader.

Description.

Parameters
msgThe input binary data.
Returns
The const reference to the internal struct data.

Definition at line 21 of file ProtoMsgReader.cpp.

◆ convert() [2/2]

void srs::reader::ProtoMsg::convert ( std::string_view msg,
StructData & struct_data )

Convert binary data to a struct (inout).

Parameters
msgThe input binary data.
struct_dataThe struct data to store the deserialized binary data.

Definition at line 15 of file ProtoMsgReader.cpp.

◆ operator=() [1/2]

ProtoMsg & srs::reader::ProtoMsg::operator= ( const ProtoMsg & )
delete

Deleted copy assignment.

◆ operator=() [2/2]

ProtoMsg & srs::reader::ProtoMsg::operator= ( ProtoMsg && )
default

Default move assignment.

Member Data Documentation

◆ proto_deserializer_

std::unique_ptr<process::ProtoDeserializer> srs::reader::ProtoMsg::proto_deserializer_
private

A converter to transform binary data to Protobuf struct.

Definition at line 64 of file ProtoMsgReader.hpp.

◆ proto_to_struct_converter_

std::unique_ptr<process::Proto2StructConverter> srs::reader::ProtoMsg::proto_to_struct_converter_
private

A converter to transform Protobuf struct to native C++ struct.

Definition at line 61 of file ProtoMsgReader.hpp.


The documentation for this class was generated from the following files: