IBR-DTNSuite  0.10
ibrcommon::BLOB Class Referenceabstract

#include <BLOB.h>

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

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
 
- Public Member Functions inherited from ibrcommon::Mutex
 Mutex (MUTEX_TYPE type=MUTEX_NORMAL)
 
virtual ~Mutex ()
 
virtual void trylock () throw (MutexException)
 
virtual void enter () throw (MutexException)
 
virtual void leave () throw (MutexException)
 
- Public Member Functions inherited from ibrcommon::MutexInterface
virtual ~MutexInterface ()=0
 

Static Public Member Functions

static std::ostream & copy (std::ostream &output, std::istream &input, const std::streamsize 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 Member Functions inherited from ibrcommon::Mutex
static MutexInterfacedummy ()
 

Static Public Attributes

static ibrcommon::Semaphore _filelimit
 

Protected Member Functions

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

Static Protected Attributes

static ProviderRef provider
 

Additional Inherited Members

- Public Types inherited from ibrcommon::Mutex
enum  MUTEX_TYPE { MUTEX_NORMAL = PTHREAD_MUTEX_NORMAL, MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE, MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK }
 
- Protected Attributes inherited from ibrcommon::Mutex
pthread_mutex_t m_mutex
 
pthread_mutexattr_t m_attr
 

Detailed Description

Definition at line 44 of file BLOB.h.

Constructor & Destructor Documentation

ibrcommon::BLOB::~BLOB ( )
virtual

Definition at line 48 of file BLOB.cpp.

ibrcommon::BLOB::BLOB ( )
protected

Definition at line 45 of file BLOB.cpp.

Member Function Documentation

virtual std::streamsize ibrcommon::BLOB::__get_size ( )
protectedpure virtual
virtual std::iostream& ibrcommon::BLOB::__get_stream ( )
protectedpure virtual
void ibrcommon::BLOB::changeProvider ( BLOB::Provider p,
bool  auto_delete = false 
)
static

Changes the BLOB provider.

Definition at line 131 of file BLOB.cpp.

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

Referenced by init(), main(), and dtn::storage::SQLiteBundleStorage::SQLiteBundleStorage().

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
virtual void ibrcommon::BLOB::open ( )
pure virtual
ibrcommon::BLOB::Reference ibrcommon::BLOB::open ( const ibrcommon::File f)
static

Open a file as read-only BLOB object.

Returns

Definition at line 126 of file BLOB.cpp.

Member Data Documentation

ibrcommon::Semaphore ibrcommon::BLOB::_filelimit
static

This is the global limit for open file handles in BLOBs

Definition at line 50 of file BLOB.h.

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

ibrcommon::BLOB::ProviderRef ibrcommon::BLOB::provider
staticprotected

This is the global BLOB provider for all BLOB objects.

Definition at line 181 of file BLOB.h.

Referenced by changeProvider(), and create().


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