IBR-DTNSuite  0.8
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 84 of file Serializer.h.


Constructor & Destructor Documentation

Default serializer.

Parameters:
streamStream to write to

Definition at line 23 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 28 of file Serializer.cpp.

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

Destructor

Definition at line 104 of file Serializer.h.


Member Function Documentation

Serializer & dtn::data::DefaultSerializer::operator<< ( const dtn::data::Bundle obj) [virtual]

Implements dtn::data::Serializer.

Reimplemented in dtn::security::StrictSerializer.

Definition at line 54 of file Serializer.cpp.

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

Here is the call graph for this function:


Member Data Documentation


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