ConsumerAlias Class Reference
[pydtn]

An alias to a DTN::Consumer. More...

#include <pydtn/ConsumerAlias.h>

Inheritance diagram for ConsumerAlias:

Inheritance graph
[legend]
Collaboration diagram for ConsumerAlias:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 ConsumerAlias (DTN::Node *owner, DTN::Consumer *aliased)
 Default constructor.
virtual ~ConsumerAlias ()
 Virtual destructor.
virtual void operator() (const DTN::Bundle &b)
 Functional method.
virtual void drop (const DTN::Bundle &b, const DTN::DropCause &c)
 Recording method for dropped DTN::Bundles.
virtual void custody (const DTN::Bundle &b)
 Recording method for accepting custody of a DTN::Bundle.
virtual void persistentStore (const DTN::Bundle &b)
 Recording method for adding a DTN::Bundle to the persistent store.
virtual void persistentRemove (const DTN::Bundle &b, bool cleanup=true)
 Recording method for removing a DTN::Bundle from the persistent store.
virtual void send (const DTN::Bundle &b)
 Recording method for sending a DTN::Bundle.
virtual void recv (const DTN::Bundle &b)
 Recording method for receiving a DTN::Bundle.
virtual void exhausted (const DTN::Bundle &b)
 Recording method for persistent storage exhaustion.


Detailed Description

An alias to a DTN::Consumer.

This is useful for global DTN::Consumers, since a DTN::Node takes ownership of its DTN::Consumers. An alias holds a pointer to a "real" DTN::Consumer, forwarding all of its method invocations. The alias can be deleted without affecting the object to which it points.

Definition at line 48 of file ConsumerAlias.h.


Member Function Documentation

void ConsumerAlias::operator() ( const DTN::Bundle b  )  [virtual]

Functional method.

Parameters:
b A bundle to process

Implements DTN::Consumer.

Definition at line 43 of file ConsumerAlias.cc.

void ConsumerAlias::drop ( const DTN::Bundle b,
const DTN::DropCause c 
) [virtual]

Recording method for dropped DTN::Bundles.

Parameters:
b A bundle being dropped
c The reason for dropping the bundle

Reimplemented from DTN::Consumer.

Definition at line 49 of file ConsumerAlias.cc.

References DTN::Consumer::drop().

void ConsumerAlias::custody ( const DTN::Bundle b  )  [virtual]

Recording method for accepting custody of a DTN::Bundle.

Parameters:
b A bundle being custodially accepted

Reimplemented from DTN::Consumer.

Definition at line 55 of file ConsumerAlias.cc.

References DTN::Consumer::custody().

void ConsumerAlias::persistentStore ( const DTN::Bundle b  )  [virtual]

Recording method for adding a DTN::Bundle to the persistent store.

Parameters:
b A bundle being stored

Reimplemented from DTN::Consumer.

Definition at line 61 of file ConsumerAlias.cc.

References DTN::Consumer::persistentStore().

void ConsumerAlias::persistentRemove ( const DTN::Bundle b,
bool  cleanup = true 
) [virtual]

Recording method for removing a DTN::Bundle from the persistent store.

Parameters:
b A bundle being removed
cleanup Should the store be cleaned (default: true)

Reimplemented from DTN::Consumer.

Definition at line 67 of file ConsumerAlias.cc.

References DTN::Consumer::persistentRemove().

void ConsumerAlias::send ( const DTN::Bundle b  )  [virtual]

Recording method for sending a DTN::Bundle.

Parameters:
b A bundle being sent

Reimplemented from DTN::Consumer.

Definition at line 73 of file ConsumerAlias.cc.

References DTN::Consumer::send().

void ConsumerAlias::recv ( const DTN::Bundle b  )  [virtual]

Recording method for receiving a DTN::Bundle.

Parameters:
b A bundle being received

Reimplemented from DTN::Consumer.

Definition at line 79 of file ConsumerAlias.cc.

References DTN::Consumer::recv().

void ConsumerAlias::exhausted ( const DTN::Bundle b  )  [virtual]

Recording method for persistent storage exhaustion.

Parameters:
b A bundle that could not be stored

Reimplemented from DTN::Consumer.

Definition at line 85 of file ConsumerAlias.cc.

References DTN::Consumer::exhausted().


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