IBR-DTNSuite  0.10
dtn::data::BundleSet Class Reference

#include <BundleSet.h>

Collaboration diagram for dtn::data::BundleSet:
Collaboration graph

Classes

class  Listener
 

Public Member Functions

 BundleSet (Listener *listener=NULL, Length bf_size=1024)
 
virtual ~BundleSet ()
 
virtual void add (const dtn::data::MetaBundle &bundle) throw ()
 
virtual void clear () throw ()
 
virtual bool has (const dtn::data::BundleID &bundle) const throw ()
 
virtual void expire (const Timestamp timestamp) throw ()
 
virtual Size size () const throw ()
 
Length getLength () const throw ()
 
const ibrcommon::BloomFiltergetBloomFilter () const throw ()
 
std::set< dtn::data::MetaBundlegetNotIn (ibrcommon::BloomFilter &filter) const throw ()
 

Friends

std::ostream & operator<< (std::ostream &stream, const BundleSet &obj)
 
std::istream & operator>> (std::istream &stream, BundleSet &obj)
 

Detailed Description

Definition at line 20 of file BundleSet.h.

Constructor & Destructor Documentation

dtn::data::BundleSet::BundleSet ( BundleSet::Listener listener = NULL,
Length  bf_size = 1024 
)
Parameters
bf_sizeInitial size fo the bloom-filter.

Definition at line 18 of file BundleSet.cpp.

dtn::data::BundleSet::~BundleSet ( )
virtual

Definition at line 23 of file BundleSet.cpp.

Member Function Documentation

void dtn::data::BundleSet::add ( const dtn::data::MetaBundle bundle) throw ()
virtual
void dtn::data::BundleSet::clear ( ) throw ()
virtual

Definition at line 39 of file BundleSet.cpp.

References ibrcommon::BloomFilter::clear().

Referenced by dtn::data::operator>>().

Here is the call graph for this function:

void dtn::data::BundleSet::expire ( const Timestamp  timestamp) throw ()
virtual

Definition at line 67 of file BundleSet.cpp.

const ibrcommon::BloomFilter & dtn::data::BundleSet::getBloomFilter ( ) const throw ()
Length dtn::data::BundleSet::getLength ( ) const throw ()

Returns the data length of the serialized BundleSet

Definition at line 163 of file BundleSet.cpp.

References ibrcommon::BloomFilter::size().

Referenced by dtn::routing::BloomFilterSummaryVector::getLength(), and dtn::routing::BloomFilterPurgeVector::getLength().

Here is the call graph for this function:

std::set< dtn::data::MetaBundle > dtn::data::BundleSet::getNotIn ( ibrcommon::BloomFilter filter) const throw ()

Definition at line 112 of file BundleSet.cpp.

bool dtn::data::BundleSet::has ( const dtn::data::BundleID bundle) const throw ()
virtual

Definition at line 47 of file BundleSet.cpp.

References dtn::data::MetaBundle::mockUp().

Referenced by dtn::routing::BaseRouter::filterKnown(), dtn::routing::BaseRouter::isKnown(), and dtn::routing::BaseRouter::isPurged().

Here is the call graph for this function:

Size dtn::data::BundleSet::size ( ) const throw ()
virtual

Returns the number of elements in this set

Definition at line 62 of file BundleSet.cpp.

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  stream,
const BundleSet obj 
)
friend

Definition at line 168 of file BundleSet.cpp.

std::istream& operator>> ( std::istream &  stream,
BundleSet obj 
)
friend

Definition at line 179 of file BundleSet.cpp.


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