IBR-DTNSuite  0.8
ibrcommon::BLOB Class Reference

#include <BLOB.h>

Inheritance diagram for ibrcommon::BLOB:
Collaboration diagram for ibrcommon::BLOB:

List of all members.

Classes

class  iostream
class  Provider
class  ProviderRef
class  Reference

Public Member Functions

virtual ~BLOB ()
virtual void clear ()=0
virtual void open ()=0
virtual void close ()=0

Static Public Member Functions

static std::ostream & copy (std::ostream &output, std::istream &input, const size_t size, const size_t buffer_size=0x1000)
static ibrcommon::BLOB::Reference create ()
static ibrcommon::BLOB::Reference open (const ibrcommon::File &f)
static void changeProvider (BLOB::Provider *p, bool auto_delete=false)

Static Public Attributes

static ibrcommon::Semaphore _filelimit

Protected Member Functions

 BLOB ()
virtual size_t __get_size ()=0
virtual std::iostream & __get_stream ()=0

Static Protected Attributes

static ProviderRef provider

Detailed Description

Definition at line 30 of file BLOB.h.


Constructor & Destructor Documentation

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

Definition at line 33 of file BLOB.cpp.

ibrcommon::BLOB::BLOB ( ) [protected]

Definition at line 30 of file BLOB.cpp.


Member Function Documentation

virtual size_t ibrcommon::BLOB::__get_size ( ) [protected, pure virtual]
virtual std::iostream& ibrcommon::BLOB::__get_stream ( ) [protected, pure virtual]
void ibrcommon::BLOB::changeProvider ( BLOB::Provider p,
bool  auto_delete = false 
) [static]

Changes the BLOB provider.

Definition at line 115 of file BLOB.cpp.

References ibrcommon::BLOB::ProviderRef::change(), and provider.

Referenced by createBundleStorage(), init(), initialize_blobs(), and main().

Here is the call graph for this function:

virtual void ibrcommon::BLOB::clear ( ) [pure virtual]

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

Implemented in ibrcommon::FileBLOB.

Referenced by ibrcommon::BLOB::iostream::clear().

virtual void ibrcommon::BLOB::close ( ) [pure virtual]
std::ostream & ibrcommon::BLOB::copy ( std::ostream &  output,
std::istream &  input,
const size_t  size,
const size_t  buffer_size = 0x1000 
) [static]

Open a file as read-only BLOB object.

Returns:

Definition at line 110 of file BLOB.cpp.


Member Data Documentation

This is the global limit for open file handles in BLOBs

Definition at line 36 of file BLOB.h.

Referenced by ibrcommon::FileBLOB::close(), and ibrcommon::FileBLOB::open().

This is the global BLOB provider for all BLOB objects.

Definition at line 167 of file BLOB.h.

Referenced by changeProvider(), and create().


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