PersistentStoreItr Class Reference
[pydtn]

Representation of a DTN::BundlePointer as an iterator for PersistentStore. More...

#include <pydtn/PersistentStore.h>

Inheritance diagram for PersistentStoreItr:

Inheritance graph
[legend]
Collaboration diagram for PersistentStoreItr:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 PersistentStoreItr (PersistentStore &store, PersistentStore::BundleList::iterator itr)
 Constructor.
virtual ~PersistentStoreItr ()
 Virtual destructor.
virtual bool operator== (const DTN::BundlePointerRepr &b)
 Equality operator.
virtual DTN::BundlePointerReprnext ()
 Get the next iterator for the store.
virtual DTN::BundlePointerReprclone ()
 Copy an iterator.
virtual DTN::Bundlebundle () const
 Retrieve the actual stored DTN::Bundle.


Detailed Description

Representation of a DTN::BundlePointer as an iterator for PersistentStore.

Definition at line 179 of file PersistentStore.h.


Constructor & Destructor Documentation

PersistentStoreItr::PersistentStoreItr ( PersistentStore store,
PersistentStore::BundleList::iterator  itr 
)

Constructor.

Parameters:
store The store into which this is an iterator
itr The internal iterator from store

Definition at line 247 of file PersistentStore.cc.

Referenced by clone(), and next().


Member Function Documentation

bool PersistentStoreItr::operator== ( const DTN::BundlePointerRepr b  )  [virtual]

Equality operator.

Parameters:
b Another iterator
Returns:
whether the two iterators refer to the same bundle

Implements DTN::BundlePointerRepr.

Definition at line 261 of file PersistentStore.cc.

DTN::BundlePointerRepr * PersistentStoreItr::next (  )  [virtual]

Get the next iterator for the store.

A new pointer is created, with the caller taking responsibility for the memory management.

Returns:
the store's next iterator, or NULL if there is none

Implements DTN::BundlePointerRepr.

Definition at line 267 of file PersistentStore.cc.

References PersistentStore::end(), PersistentStoreItr(), and PersistentStore::upper_bound().

DTN::BundlePointerRepr * PersistentStoreItr::clone (  )  [virtual]

Copy an iterator.

A new pointer is created, with the caller taking responsibility for the memory management.

Returns:
a copy of this iterator

Implements DTN::BundlePointerRepr.

Definition at line 278 of file PersistentStore.cc.

References PersistentStoreItr().

DTN::Bundle * PersistentStoreItr::bundle (  )  const [virtual]

Retrieve the actual stored DTN::Bundle.

Note that if you have not tested the DTN::BundlePointer that owns this DTN::BundlePointerRepr for validity, the returned pointer might not be valid.

Let me repeat that: You must test the encompassing DTN::BundlePointer for validity or you are very likely to get a segmentation fault at some point.

Returns:
a pointer to the stored DTN::Bundle

Implements DTN::BundlePointerRepr.

Definition at line 284 of file PersistentStore.cc.


The documentation for this class was generated from the following files:
Generated on Mon Mar 24 11:15:47 2008 for Pydtn Simulator by  doxygen 1.5.4