IBR-DTNSuite  0.10
dtn::api::PlainSerializer Class Reference

#include <PlainSerializer.h>

Inheritance diagram for dtn::api::PlainSerializer:
Inheritance graph
Collaboration diagram for dtn::api::PlainSerializer:
Collaboration graph

Public Types

enum  Encoding { INVALID, SKIP_PAYLOAD, BASE64, RAW }
 

Public Member Functions

 PlainSerializer (std::ostream &stream, Encoding enc=BASE64)
 
virtual ~PlainSerializer ()
 
dtn::data::Serializeroperator<< (const dtn::data::Bundle &obj)
 
dtn::data::Serializeroperator<< (const dtn::data::PrimaryBlock &obj)
 
dtn::data::Serializeroperator<< (const dtn::data::Block &obj)
 
void writeData (const dtn::data::Block &block)
 
void writeData (std::istream &stream, const dtn::data::Length &len)
 
dtn::data::Length getLength (const dtn::data::Bundle &obj)
 
dtn::data::Length getLength (const dtn::data::PrimaryBlock &obj) const
 
dtn::data::Length getLength (const dtn::data::Block &obj) const
 
- Public Member Functions inherited from dtn::data::Serializer
virtual ~Serializer ()
 
virtual Serializeroperator<< (const dtn::data::BundleFragment &obj)
 

Static Public Member Functions

static Encoding parseEncoding (const std::string &data)
 
static std::string printEncoding (const Encoding &enc)
 

Detailed Description

Definition at line 34 of file PlainSerializer.h.

Member Enumeration Documentation

Enumerator
INVALID 
SKIP_PAYLOAD 
BASE64 
RAW 

Definition at line 37 of file PlainSerializer.h.

Constructor & Destructor Documentation

dtn::api::PlainSerializer::PlainSerializer ( std::ostream &  stream,
Encoding  enc = BASE64 
)

Definition at line 58 of file PlainSerializer.cpp.

dtn::api::PlainSerializer::~PlainSerializer ( )
virtual

Definition at line 63 of file PlainSerializer.cpp.

Member Function Documentation

dtn::data::Length dtn::api::PlainSerializer::getLength ( const dtn::data::Bundle obj)
virtual

Implements dtn::data::Serializer.

Definition at line 198 of file PlainSerializer.cpp.

dtn::data::Length dtn::api::PlainSerializer::getLength ( const dtn::data::PrimaryBlock obj) const
virtual

Implements dtn::data::Serializer.

Definition at line 203 of file PlainSerializer.cpp.

dtn::data::Length dtn::api::PlainSerializer::getLength ( const dtn::data::Block obj) const
virtual

Implements dtn::data::Serializer.

Definition at line 208 of file PlainSerializer.cpp.

dtn::data::Serializer & dtn::api::PlainSerializer::operator<< ( const dtn::data::Bundle obj)
virtual

Implements dtn::data::Serializer.

Definition at line 67 of file PlainSerializer.cpp.

References dtn::data::Bundle::begin(), dtn::data::Bundle::end(), and dtn::data::Bundle::size().

Here is the call graph for this function:

PlainSerializer::Encoding dtn::api::PlainSerializer::parseEncoding ( const std::string &  data)
static
std::string dtn::api::PlainSerializer::printEncoding ( const Encoding enc)
static

Definition at line 44 of file PlainSerializer.cpp.

References BASE64, RAW, and SKIP_PAYLOAD.

Referenced by operator<<(), and writeData().

void dtn::api::PlainSerializer::writeData ( const dtn::data::Block block)

Definition at line 508 of file PlainSerializer.cpp.

References BASE64, dtn::data::Block::getLength(), printEncoding(), RAW, and dtn::data::Block::serialize().

Referenced by dtn::api::ExtendedApiHandler::run().

Here is the call graph for this function:

void dtn::api::PlainSerializer::writeData ( std::istream &  stream,
const dtn::data::Length len 
)

Definition at line 537 of file PlainSerializer.cpp.

References BASE64, ibrcommon::BLOB::copy(), printEncoding(), and RAW.

Here is the call graph for this function:


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