IBR-DTNSuite 0.6

dtn::data::DefaultSerializer Class Reference

#include <Serializer.h>

Inheritance diagram for dtn::data::DefaultSerializer:
Collaboration diagram for dtn::data::DefaultSerializer:

List of all members.

Public Member Functions

 DefaultSerializer (std::ostream &stream)
 DefaultSerializer (std::ostream &stream, const Dictionary &d)
virtual ~DefaultSerializer ()
virtual Serializeroperator<< (const dtn::data::Bundle &obj)
virtual Serializeroperator<< (const dtn::data::PrimaryBlock &obj)
virtual Serializeroperator<< (const dtn::data::Block &obj)
virtual Serializeroperator<< (const dtn::data::BundleFragment &obj)
virtual size_t getLength (const dtn::data::Bundle &obj)
virtual size_t getLength (const dtn::data::PrimaryBlock &obj) const
virtual size_t getLength (const dtn::data::Block &obj) const

Protected Member Functions

Serializerserialize (const dtn::data::PayloadBlock &obj, size_t clip_offset, size_t clip_length)
void rebuildDictionary (const dtn::data::Bundle &obj)
bool isCompressable (const dtn::data::Bundle &obj) const

Protected Attributes

std::ostream & _stream
Dictionary _dictionary
bool _compressable

Detailed Description

Definition at line 83 of file Serializer.h.


Constructor & Destructor Documentation

dtn::data::DefaultSerializer::DefaultSerializer ( std::ostream &  stream)

Default serializer.

Parameters:
streamStream to write to

Definition at line 21 of file Serializer.cpp.

dtn::data::DefaultSerializer::DefaultSerializer ( std::ostream &  stream,
const Dictionary d 
)

Initialize the Serializer with a default dictionary. This will be used to write the right values in the EID reference part of blocks.

Parameters:
streamStream to write to
dThe default dictionary

Definition at line 26 of file Serializer.cpp.

virtual dtn::data::DefaultSerializer::~DefaultSerializer ( ) [inline, virtual]

Destructor

Definition at line 103 of file Serializer.h.


Member Function Documentation

size_t dtn::data::DefaultSerializer::getLength ( const dtn::data::Bundle obj) [virtual]
size_t dtn::data::DefaultSerializer::getLength ( const dtn::data::Block obj) const [virtual]
bool dtn::data::DefaultSerializer::isCompressable ( const dtn::data::Bundle obj) const [protected]
Serializer & dtn::data::DefaultSerializer::operator<< ( const dtn::data::Bundle obj) [virtual]

Implements dtn::data::Serializer.

Reimplemented in dtn::security::StrictSerializer.

Definition at line 52 of file Serializer.cpp.

References _compressable, isCompressable(), and rebuildDictionary().

Here is the call graph for this function:

Serializer & dtn::data::DefaultSerializer::serialize ( const dtn::data::PayloadBlock obj,
size_t  clip_offset,
size_t  clip_length 
) [protected]

Member Data Documentation


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