Public Member Functions

ibrcommon::BLOB::Reference Class Reference

#include <BLOB.h>

Inherits ibrcommon::Mutex.

Collaboration diagram for ibrcommon::BLOB::Reference:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Reference (BLOB *blob)
 Reference (const Reference &ref)
virtual ~Reference ()
std::iostream & operator* ()
void enter () throw (ibrcommon::MutexException)
void leave () throw (ibrcommon::MutexException)
void trylock () throw (ibrcommon::MutexException)
void clear ()
size_t getSize () const

Detailed Description

Definition at line 67 of file BLOB.h.


Constructor & Destructor Documentation

ibrcommon::BLOB::Reference::Reference ( BLOB blob  ) 

Definition at line 52 of file BLOB.cpp.

References ibrcommon::BLOB::increment().

Here is the call graph for this function:

ibrcommon::BLOB::Reference::Reference ( const Reference ref  ) 

Definition at line 31 of file BLOB.cpp.

References ibrcommon::BLOB::increment().

Here is the call graph for this function:

ibrcommon::BLOB::Reference::~Reference (  )  [virtual]

Definition at line 37 of file BLOB.cpp.

References ibrcommon::BLOB::decrement(), and ibrcommon::BLOB::isUnbound().

Here is the call graph for this function:


Member Function Documentation

void ibrcommon::BLOB::Reference::clear (  ) 

This method deletes the content of the payload. The size will be zero after calling.

Definition at line 94 of file BLOB.cpp.

References ibrcommon::BLOB::_locked, and ibrcommon::BLOB::clear().

Referenced by dtn::data::PayloadBlock::deserialize(), and dtn::data::ExtensionBlock::deserialize().

Here is the call graph for this function:

void ibrcommon::BLOB::Reference::enter (  )  throw (ibrcommon::MutexException) [virtual]

Enter into a thread-safe state for this BLOB. This time it is locked and the pointers are initialized to zero.

Reimplemented from ibrcommon::Mutex.

Definition at line 58 of file BLOB.cpp.

References ibrcommon::BLOB::_locked, ibrcommon::Mutex::enter(), and ibrcommon::BLOB::open().

Here is the call graph for this function:

size_t ibrcommon::BLOB::Reference::getSize (  )  const

Returns the size of the content in this BLOB.

Returns:
The size in bytes.

Definition at line 89 of file BLOB.cpp.

References ibrcommon::BLOB::getSize().

Referenced by dtn::data::PayloadBlock::getLength(), dtn::data::ExtensionBlock::getLength(), main(), and dtn::net::HTTPConvergenceLayer::queue().

Here is the call graph for this function:

void ibrcommon::BLOB::Reference::leave (  )  throw (ibrcommon::MutexException) [virtual]

Leave the thread-safe state.

Reimplemented from ibrcommon::Mutex.

Definition at line 68 of file BLOB.cpp.

References ibrcommon::BLOB::_locked, ibrcommon::BLOB::close(), and ibrcommon::Mutex::leave().

Here is the call graph for this function:

std::iostream & ibrcommon::BLOB::Reference::operator* (  ) 

Get a direct access reference to the internal stream object.

Returns:
iostream reference.

Definition at line 46 of file BLOB.cpp.

References ibrcommon::BLOB::__get_stream(), and ibrcommon::BLOB::_locked.

Here is the call graph for this function:

void ibrcommon::BLOB::Reference::trylock (  )  throw (ibrcommon::MutexException) [virtual]

Try to enter into the thread-safe state for this BLOB.

Reimplemented from ibrcommon::Mutex.

Definition at line 79 of file BLOB.cpp.

References ibrcommon::BLOB::_locked, ibrcommon::BLOB::open(), and ibrcommon::Mutex::trylock().

Here is the call graph for this function:


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