INET Framework for OMNeT++/OMNEST
inet::ChunkSerializer Class Referenceabstract

#include <ChunkSerializer.h>

Inheritance diagram for inet::ChunkSerializer:
inet::BitCountChunkSerializer inet::BitsChunkSerializer inet::ByteCountChunkSerializer inet::BytesChunkSerializer inet::EmptyChunkSerializer inet::FieldsChunkSerializer inet::physicallayer::ApskPhyHeaderSerializer inet::SequenceChunkSerializer inet::SliceChunkSerializer

Public Member Functions

virtual void serialize (MemoryOutputStream &stream, const Ptr< const Chunk > &chunk, b offset, b length) const =0
 Serializes a chunk into a stream by writing the bytes representing the chunk at the end of the stream. More...
 
virtual const Ptr< Chunkdeserialize (MemoryInputStream &stream, const std::type_info &typeInfo) const =0
 Deserializes a chunk from a stream by reading the bytes at the current position of the stream. More...
 

Static Public Attributes

static b totalSerializedLength = b(0)
 
static b totalDeserializedLength = b(0)
 

Member Function Documentation

◆ deserialize()

virtual const Ptr<Chunk> inet::ChunkSerializer::deserialize ( MemoryInputStream stream,
const std::type_info &  typeInfo 
) const
pure virtual

Deserializes a chunk from a stream by reading the bytes at the current position of the stream.

The returned chunk will be an instance of the provided type. The current stream position is updated according to the length of the returned chunk.

Implemented in inet::FieldsChunkSerializer, inet::BitCountChunkSerializer, inet::BitsChunkSerializer, inet::ByteCountChunkSerializer, inet::BytesChunkSerializer, inet::EmptyChunkSerializer, inet::SequenceChunkSerializer, inet::SliceChunkSerializer, and inet::physicallayer::ApskPhyHeaderSerializer.

◆ serialize()

virtual void inet::ChunkSerializer::serialize ( MemoryOutputStream stream,
const Ptr< const Chunk > &  chunk,
b  offset,
b  length 
) const
pure virtual

Serializes a chunk into a stream by writing the bytes representing the chunk at the end of the stream.

The offset and length parameters allow to write only a part of the data.

Implemented in inet::FieldsChunkSerializer, inet::BitCountChunkSerializer, inet::BitsChunkSerializer, inet::ByteCountChunkSerializer, inet::BytesChunkSerializer, inet::EmptyChunkSerializer, inet::SequenceChunkSerializer, inet::SliceChunkSerializer, and inet::physicallayer::ApskPhyHeaderSerializer.

Member Data Documentation

◆ totalDeserializedLength

◆ totalSerializedLength


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