#include <ProphetBundleList.h>
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::Bundle * | find (const std::string &dst, u_int creation_ts, u_int seqno) const |
Given destination ID and creation ts, return prophet::Bundle*. | |
const prophet::Bundle * | find (const Bundle *b) const |
const BundleRef & | find_ref (const prophet::Bundle *b) const |
Given a prophet object, return dtn::BundleRef&. | |
const prophet::BundleList & | get_bundles () const |
Return a const reference to BundleList, in no guaranteed order. | |
prophet::Repository * | bundles () |
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 |
typedef prophet::BundleList::const_iterator dtn::ProphetBundleList::const_iterator [protected] |
Definition at line 100 of file ProphetBundleList.h.
dtn::ProphetBundleList::ProphetBundleList | ( | prophet::Repository::BundleCoreRep * | core | ) |
dtn::ProphetBundleList::~ProphetBundleList | ( | ) |
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] |
Definition at line 64 of file ProphetBundleList.h.
References dtn::Bundle::creation_ts(), dtn::Bundle::dest(), find(), dtn::BundleTimestamp::seconds_, dtn::BundleTimestamp::seqno_, and dtn::EndpointID::str().
const BundleRef & dtn::ProphetBundleList::find_ref | ( | const prophet::Bundle * | b | ) | const |
Given a prophet object, return dtn::BundleRef&.
Definition at line 88 of file ProphetBundleList.cc.
References prophet::Bundle::creation_ts(), prophet::Bundle::destination_id(), find(), NULL_BUNDLE, and prophet::Bundle::sequence_num().
Referenced by dtn::ProphetBundleCore::get_bundle(), and dtn::ProphetBundleCore::should_fwd().
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 | ( | ) |
Drop all prophet::Bundle*'s from list.
Definition at line 102 of file ProphetBundleList.cc.
References prophet::Repository::del(), prophet::Repository::empty(), dtn::BundleList::front(), prophet::Repository::get_bundles(), and list_.
Referenced by dtn::ProphetBundleCore::shutdown(), and ~ProphetBundleList().
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_.
prophet::Repository dtn::ProphetBundleList::list_ [protected] |
collection of ProphetBundle's
Definition at line 107 of file ProphetBundleList.h.
Referenced by add(), bundles(), clear(), del(), empty(), find(), get_bundles(), and size().
BundleRef dtn::ProphetBundleList::NULL_BUNDLE [static, protected] |