dtn::ProphetBundleList Class Reference

#include <ProphetBundleList.h>

List of all members.


Detailed Description

Maintain mapping between dtn::Bundle and prophet::Bundle.

Definition at line 32 of file ProphetBundleList.h.


Public Member Functions

 ProphetBundleList (prophet::Repository::BundleCoreRep *core)
 Constructor.
 ~ProphetBundleList ()
 Destructor.
void add (const BundleRef &b)
 Add mapping for dtn::BundleRef to list.
void add (const prophet::Bundle *b)
void del (const BundleRef &b)
 Remove mapping for dtn::BundleRef from list.
void del (const prophet::Bundle *b)
const prophet::Bundlefind (const std::string &dst, u_int creation_ts, u_int seqno) const
 Given destination ID and creation ts, return prophet::Bundle*.
const prophet::Bundlefind (const Bundle *b) const
const BundleReffind_ref (const prophet::Bundle *b) const
 Given a prophet object, return dtn::BundleRef&.
const prophet::BundleListget_bundles () const
 Return a const reference to BundleList, in no guaranteed order.
prophet::Repositorybundles ()
 Expose pointer to Bundle repository.
void clear ()
 Drop all prophet::Bundle*'s from list.
bool empty () const
 Accessors.
size_t size () const
 Accessors.

Protected Types

typedef
prophet::BundleList::const_iterator 
const_iterator

Protected Member Functions

bool find (const std::string &dst, u_int creation_ts, u_int seqno, const_iterator &i) const
 Utility function for internal find.

Protected Attributes

prophet::Repository list_
 collection of ProphetBundle's

Static Protected Attributes

static BundleRef NULL_BUNDLE
 pointer to NULL

Member Typedef Documentation

typedef prophet::BundleList::const_iterator dtn::ProphetBundleList::const_iterator [protected]

Definition at line 100 of file ProphetBundleList.h.


Constructor & Destructor Documentation

dtn::ProphetBundleList::ProphetBundleList ( prophet::Repository::BundleCoreRep core  ) 

Constructor.

Definition at line 28 of file ProphetBundleList.cc.

dtn::ProphetBundleList::~ProphetBundleList (  ) 

Destructor.

Definition at line 31 of file ProphetBundleList.cc.

References clear().


Member Function Documentation

void dtn::ProphetBundleList::add ( const BundleRef b  ) 

Add mapping for dtn::BundleRef to list.

Definition at line 37 of file ProphetBundleList.cc.

References prophet::Repository::add(), and list_.

Referenced by dtn::ProphetBundleCore::add(), and dtn::ProphetRouter::handle_bundle_received().

void dtn::ProphetBundleList::add ( const prophet::Bundle b  ) 

Definition at line 45 of file ProphetBundleList.cc.

References prophet::Repository::add(), and list_.

void dtn::ProphetBundleList::del ( const BundleRef b  ) 

Remove mapping for dtn::BundleRef from list.

Definition at line 55 of file ProphetBundleList.cc.

References prophet::Repository::del(), find(), and list_.

Referenced by dtn::ProphetBundleCore::del(), and dtn::ProphetBundleCore::drop_bundle().

void dtn::ProphetBundleList::del ( const prophet::Bundle b  ) 

Definition at line 69 of file ProphetBundleList.cc.

References prophet::Repository::del(), and list_.

const prophet::Bundle * dtn::ProphetBundleList::find ( const std::string &  dst,
u_int  creation_ts,
u_int  seqno 
) const

Given destination ID and creation ts, return prophet::Bundle*.

Definition at line 77 of file ProphetBundleList.cc.

Referenced by del(), find(), find_ref(), and dtn::ProphetBundleCore::get_bundle().

const prophet::Bundle* dtn::ProphetBundleList::find ( const Bundle b  )  const [inline]

const BundleRef & dtn::ProphetBundleList::find_ref ( const prophet::Bundle b  )  const

const prophet::BundleList& dtn::ProphetBundleList::get_bundles (  )  const [inline]

Return a const reference to BundleList, in no guaranteed order.

Definition at line 79 of file ProphetBundleList.h.

References prophet::Repository::get_bundles(), and list_.

Referenced by dtn::ProphetBundleCore::bundles().

prophet::Repository* dtn::ProphetBundleList::bundles (  )  [inline]

Expose pointer to Bundle repository.

Definition at line 87 of file ProphetBundleList.h.

References list_.

Referenced by dtn::ProphetBundleCore::bundles().

void dtn::ProphetBundleList::clear (  ) 

bool dtn::ProphetBundleList::empty (  )  const [inline]

Accessors.

Definition at line 95 of file ProphetBundleList.h.

References prophet::Repository::empty(), and list_.

size_t dtn::ProphetBundleList::size (  )  const [inline]

Accessors.

Definition at line 96 of file ProphetBundleList.h.

References list_, and prophet::Repository::size().

bool dtn::ProphetBundleList::find ( const std::string &  dst,
u_int  creation_ts,
u_int  seqno,
const_iterator i 
) const [protected]

Utility function for internal find.

Definition at line 115 of file ProphetBundleList.cc.

References dtn::BundleList::begin(), dtn::BundleList::end(), prophet::Repository::get_bundles(), and list_.


Member Data Documentation

collection of ProphetBundle's

Definition at line 107 of file ProphetBundleList.h.

Referenced by add(), bundles(), clear(), del(), empty(), find(), get_bundles(), and size().

pointer to NULL

Definition at line 108 of file ProphetBundleList.h.

Referenced by find_ref().


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

Generated on Mon Jul 21 14:12:21 2008 for DTN Reference Implementation by  doxygen 1.5.6