IBR-DTNSuite  0.10
ibrcommon::FileBLOB Class Reference

#include <BLOB.h>

Inheritance diagram for ibrcommon::FileBLOB:
Inheritance graph
Collaboration diagram for ibrcommon::FileBLOB:
Collaboration graph

Public Member Functions

 FileBLOB (const ibrcommon::File &f)
 
virtual ~FileBLOB ()
 
virtual void clear ()
 
virtual void open ()
 
virtual void close ()
 
- Public Member Functions inherited from ibrcommon::BLOB
virtual ~BLOB ()
 
- 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
 

Protected Member Functions

std::iostream & __get_stream ()
 
std::streamsize __get_size ()
 
- Protected Member Functions inherited from ibrcommon::BLOB
 BLOB ()
 

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 }
 
- Static Public Member Functions inherited from ibrcommon::BLOB
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 Attributes inherited from ibrcommon::BLOB
static ibrcommon::Semaphore _filelimit
 
- Protected Attributes inherited from ibrcommon::Mutex
pthread_mutex_t m_mutex
 
pthread_mutexattr_t m_attr
 
- Static Protected Attributes inherited from ibrcommon::BLOB
static ProviderRef provider
 

Detailed Description

A FileBLOB is a read only BLOB object. It is based on a fstream object, but denies write access. This could be used to easy access static files.

Definition at line 196 of file BLOB.h.

Constructor & Destructor Documentation

ibrcommon::FileBLOB::FileBLOB ( const ibrcommon::File f)

Definition at line 269 of file BLOB.cpp.

References ibrcommon::File::exists().

Here is the call graph for this function:

ibrcommon::FileBLOB::~FileBLOB ( )
virtual

Definition at line 278 of file BLOB.cpp.

Member Function Documentation

std::streamsize ibrcommon::FileBLOB::__get_size ( )
protectedvirtual

Implements ibrcommon::BLOB.

Definition at line 303 of file BLOB.cpp.

References ibrcommon::File::size().

Here is the call graph for this function:

std::iostream& ibrcommon::FileBLOB::__get_stream ( )
inlineprotectedvirtual

Implements ibrcommon::BLOB.

Definition at line 208 of file BLOB.h.

void ibrcommon::FileBLOB::clear ( )
virtual

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

Implements ibrcommon::BLOB.

Definition at line 264 of file BLOB.cpp.

void ibrcommon::FileBLOB::close ( )
virtual

Implements ibrcommon::BLOB.

Definition at line 295 of file BLOB.cpp.

References ibrcommon::BLOB::_filelimit, and ibrcommon::Semaphore::post().

Here is the call graph for this function:

void ibrcommon::FileBLOB::open ( )
virtual

Implements ibrcommon::BLOB.

Definition at line 282 of file BLOB.cpp.

References ibrcommon::BLOB::_filelimit, ibrcommon::File::getPath(), and ibrcommon::Semaphore::wait().

Here is the call graph for this function:


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