|
INET Framework for OMNeT++/OMNEST
|
#include <ChunkSerializer.h>
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< Chunk > | deserialize (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) |
|
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.
|
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.