IBR-DTNSuite
0.12
|
#include <BundleBuilder.h>
Classes | |
class | DiscardBlockException |
Public Types | |
enum | POSITION { FRONT, MIDDLE, END } |
Public Member Functions | |
BundleBuilder (Bundle &target, POSITION alignment=END, int pos=0) | |
virtual | ~BundleBuilder () |
void | clear () |
template<class T > | |
T & | insert (const Bitset< Block::ProcFlags > &procflags) |
POSITION | getAlignment () const |
dtn::data::Block & | insert (dtn::data::ExtensionBlock::Factory &f, const Bitset< Block::ProcFlags > &procflags) |
dtn::data::Block & | insert (dtn::data::block_t block_type, const Bitset< Block::ProcFlags > &procflags) throw (dtn::InvalidDataException) |
Definition at line 21 of file BundleBuilder.h.
Enumerator | |
---|---|
FRONT | |
MIDDLE | |
END |
Definition at line 31 of file BundleBuilder.h.
Definition at line 15 of file BundleBuilder.cpp.
|
virtual |
Definition at line 20 of file BundleBuilder.cpp.
void dtn::data::BundleBuilder::clear | ( | ) |
clear the content of the target bundle
BundleBuilder::POSITION dtn::data::BundleBuilder::getAlignment | ( | ) | const |
Definition at line 67 of file BundleBuilder.cpp.
Referenced by dtn::api::ExtendedApiHandler::run().
T & dtn::data::BundleBuilder::insert | ( | const Bitset< Block::ProcFlags > & | procflags) |
Definition at line 66 of file BundleBuilder.h.
References dtn::data::Bundle::begin(), END, dtn::data::Bundle::end(), FRONT, dtn::data::Bundle::insert(), dtn::data::Block::LAST_BLOCK, dtn::data::Bundle::push_back(), and dtn::data::Bundle::push_front().
Referenced by dtn::data::DefaultDeserializer::operator>>(), dtn::api::PlainDeserializer::readBlock(), and dtn::data::SeparateDeserializer::readBlock().
dtn::data::Block & dtn::data::BundleBuilder::insert | ( | dtn::data::ExtensionBlock::Factory & | f, |
const Bitset< Block::ProcFlags > & | procflags | ||
) |
Definition at line 24 of file BundleBuilder.cpp.
References dtn::data::Bundle::begin(), END, dtn::data::Bundle::end(), FRONT, dtn::data::Block::get(), dtn::data::Bundle::insert(), dtn::data::Block::LAST_BLOCK, dtn::data::Bundle::push_back(), dtn::data::Bundle::push_front(), and dtn::data::Block::set().
dtn::data::Block & dtn::data::BundleBuilder::insert | ( | dtn::data::block_t | block_type, |
const Bitset< Block::ProcFlags > & | procflags | ||
) | |||
throw | ( | dtn::InvalidDataException | |
) |
Add a block to the bundle.
Definition at line 72 of file BundleBuilder.cpp.
References dtn::data::PayloadBlock::BLOCK_TYPE, dtn::data::Block::DISCARD_IF_NOT_PROCESSED, dtn::data::ExtensionBlock::Factory::get(), dtn::data::Block::get(), and dtn::data::ExtensionBlock::setType().