adtf_file_library  0.13.1
Public Member Functions | List of all members
adtf_file::StreamTypeSerializers Class Reference

Container class for StreamTypeSerializer. More...

#include <adtf_file_writer.h>

Inheritance diagram for adtf_file::StreamTypeSerializers:
[legend]
Collaboration diagram for adtf_file::StreamTypeSerializers:
[legend]

Public Member Functions

void add (const std::shared_ptr< StreamTypeSerializer > &serializer)
 Adds a StreamTypeSerializer instance to the container. More...
 
void serialize (const StreamType &stream_type, OutputStream &stream) const
 Serialzes the given stream type into the given stream. It will use the StreamTypeSerializer supporting the meta type of the given stream type. More...
 
std::string getAdtf2TypeId (const StreamType &stream_type)
 Get the ADTF 2 type id of the stream_type. More...
 

Detailed Description

Container class for StreamTypeSerializer.

Member Function Documentation

◆ add()

void adtf_file::StreamTypeSerializers::add ( const std::shared_ptr< StreamTypeSerializer > &  serializer)
inline

Adds a StreamTypeSerializer instance to the container.

Remarks
only one StreamTypeSerializer supporting StreamTypeSerializer::getMetaType should be added.
Parameters
serializerthe serializer instance to add

◆ getAdtf2TypeId()

std::string adtf_file::StreamTypeSerializers::getAdtf2TypeId ( const StreamType stream_type)
inline

Get the ADTF 2 type id of the stream_type.

Parameters
stream_typethe stream type to retireve the ADTF 2 type id for
Returns
std::string the ADTF 2 type id
Return values
emptystd::string() if no StreamTypeSerializer supports ADTF 2 types for the meta type of stream_type

◆ serialize()

void adtf_file::StreamTypeSerializers::serialize ( const StreamType stream_type,
OutputStream stream 
) const
inline

Serialzes the given stream type into the given stream. It will use the StreamTypeSerializer supporting the meta type of the given stream type.

Remarks
only PropertyStreamType is supported!
Parameters
stream_typethe stream type to serialize
streamthe stream to write to
Exceptions
std::runtime_errorif no added serializer supports the meta type of the given stream_type

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

Copyright © CARIAD SE.
Generated on Fri Apr 19 2024 by doxygen 1.9.1
GIT Commit Hash: 82d535f82776c20b12fc60740bdae991b62444a7