CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Classes | Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes
LStoreFile Class Reference

#include <LStoreFile.h>

Inheritance diagram for LStoreFile:
Storage IOInput IOOutput

Classes

class  MutexWrapper
 

Public Member Functions

virtual void abort (void)
 
virtual void close (void)
 
virtual void create (const char *name, bool exclusive=false, int perms=0666)
 
virtual void create (const std::string &name, bool exclusive=false, int perms=0666)
 
 LStoreFile (void)
 
 LStoreFile (void *fd)
 
 LStoreFile (const char *name, int flags=IOFlags::OpenRead, int perms=0666)
 
 LStoreFile (const std::string &name, int flags=IOFlags::OpenRead, int perms=0666)
 
virtual void open (const char *name, int flags=IOFlags::OpenRead, int perms=0666)
 
virtual void open (const std::string &name, int flags=IOFlags::OpenRead, int perms=0666)
 
virtual IOOffset position (IOOffset offset, Relative whence=SET)
 
virtual IOSize read (void *into, IOSize n)
 
virtual void resize (IOOffset size)
 
virtual IOSize write (const void *from, IOSize n)
 
 ~LStoreFile (void)
 
- Public Member Functions inherited from Storage
virtual bool eof (void) const
 
virtual void flush (void)
 
virtual IOOffset position (void) const
 
virtual bool prefetch (const IOPosBuffer *what, IOSize n)
 
virtual IOSize read (void *into, IOSize n, IOOffset pos)
 
IOSize read (IOBuffer into, IOOffset pos)
 
virtual IOSize readv (IOPosBuffer *into, IOSize buffers)
 
virtual void rewind (void)
 
virtual IOOffset size (void) const
 
 Storage (void)
 
virtual IOSize write (const void *from, IOSize n, IOOffset pos)
 
IOSize write (IOBuffer from, IOOffset pos)
 
virtual IOSize writev (const IOPosBuffer *from, IOSize buffers)
 
virtual ~Storage (void)
 
- Public Member Functions inherited from IOInput
int read (void)
 
IOSize read (IOBuffer into)
 
virtual IOSize readv (IOBuffer *into, IOSize buffers)
 
IOSize xread (IOBuffer into)
 
IOSize xread (void *into, IOSize n)
 
IOSize xreadv (IOBuffer *into, IOSize buffers)
 
virtual ~IOInput (void)
 Destruct the stream. A no-op. More...
 
- Public Member Functions inherited from IOOutput
IOSize write (unsigned char byte)
 
IOSize write (IOBuffer from)
 
virtual IOSize writev (const IOBuffer *from, IOSize buffers)
 
IOSize xwrite (const void *from, IOSize n)
 
IOSize xwrite (IOBuffer from)
 
IOSize xwritev (const IOBuffer *from, IOSize buffers)
 
virtual ~IOOutput (void)
 Destruct the stream. A no-op. More...
 

Static Public Attributes

static pthread_mutex_t m_dlopen_lock = PTHREAD_MUTEX_INITIALIZER
 

Private Member Functions

void closeLibrary ()
 
void loadLibrary ()
 

Private Attributes

bool m_close
 
void * m_fd
 
bool m_is_loaded
 
void * m_library_handle
 
std::string m_name
 
int32_t(* redd_close )(void *)
 
int32_t(* redd_errno )()
 
int32_t(* redd_init )()
 
int64_t(* redd_lseek )(void *, int64_t, uint32_t)
 
void *(* redd_open )(const char *, int32_t, int32_t)
 
int64_t(* redd_read )(void *, char *, int64_t)
 
const std::string &(* redd_strerror )()
 
int32_t(* redd_term )()
 
int64_t(* redd_write )(void *, const char *, int64_t)
 

Additional Inherited Members

- Public Types inherited from Storage
enum  Relative { SET, CURRENT, END }
 

Detailed Description

Definition at line 8 of file LStoreFile.h.

Constructor & Destructor Documentation

LStoreFile::LStoreFile ( void  )

Definition at line 18 of file LStoreFile.cc.

LStoreFile::LStoreFile ( void *  fd)

Definition at line 37 of file LStoreFile.cc.

LStoreFile::LStoreFile ( const char *  name,
int  flags = IOFlags::OpenRead,
int  perms = 0666 
)

Definition at line 56 of file LStoreFile.cc.

LStoreFile::LStoreFile ( const std::string &  name,
int  flags = IOFlags::OpenRead,
int  perms = 0666 
)

Definition at line 65 of file LStoreFile.cc.

LStoreFile::~LStoreFile ( void  )

Definition at line 74 of file LStoreFile.cc.

Member Function Documentation

void LStoreFile::abort ( void  )
virtual

Definition at line 278 of file LStoreFile.cc.

void LStoreFile::close ( void  )
virtual
void LStoreFile::closeLibrary ( )
private

Definition at line 135 of file LStoreFile.cc.

void LStoreFile::create ( const char *  name,
bool  exclusive = false,
int  perms = 0666 
)
virtual

Definition at line 165 of file LStoreFile.cc.

void LStoreFile::create ( const std::string &  name,
bool  exclusive = false,
int  perms = 0666 
)
virtual

Definition at line 176 of file LStoreFile.cc.

void LStoreFile::loadLibrary ( )
private

Definition at line 99 of file LStoreFile.cc.

void LStoreFile::open ( const char *  name,
int  flags = IOFlags::OpenRead,
int  perms = 0666 
)
virtual

Definition at line 193 of file LStoreFile.cc.

void LStoreFile::open ( const std::string &  name,
int  flags = IOFlags::OpenRead,
int  perms = 0666 
)
virtual

Definition at line 187 of file LStoreFile.cc.

IOOffset LStoreFile::position ( IOOffset  offset,
Relative  whence = SET 
)
virtual

Implements Storage.

Definition at line 326 of file LStoreFile.cc.

Referenced by LStoreStorageMaker::check().

IOSize LStoreFile::read ( void *  into,
IOSize  n 
)
virtual

Read into into at most n number of bytes.

If this is a blocking stream, the call will block until some data can be read, end of input is reached, or an exception is thrown. For a non-blocking stream the available input is returned. If none is available, an exception is thrown.

Returns
The number of bytes actually read. This is less or equal to the size of the buffer. Zero indicates that the end of the input has been reached: end of file, or remote end closing for a connected channel like a pipe or a socket. Otherwise the value can be less than requested if limited amount of input is currently available for platform or implementation reasons.
Exceptions
Incase of error, a #IOError exception is thrown. This includes the situation where the input stream is in non-blocking mode and no input is currently available (FIXME: make this simpler; clarify which exception).

Implements IOInput.

Definition at line 289 of file LStoreFile.cc.

void LStoreFile::resize ( IOOffset  size)
virtual

Implements Storage.

Definition at line 348 of file LStoreFile.cc.

Referenced by Vispa.Gui.TextDialog.TextDialog::__init__().

IOSize LStoreFile::write ( const void *  from,
IOSize  n 
)
virtual

Write n bytes of data starting at address from.

Returns
The number of bytes written. Normally this will be n, but can be less, even zero, for example if the stream is non-blocking mode and cannot accept input at this time.
Exceptions
Incase of error, an exception is thrown. However if the stream is in non-blocking mode and cannot accept output, it will not throw an exception – the return value will be less than requested.

Implements IOOutput.

Definition at line 306 of file LStoreFile.cc.

Member Data Documentation

bool LStoreFile::m_close
private

Definition at line 61 of file LStoreFile.h.

pthread_mutex_t LStoreFile::m_dlopen_lock = PTHREAD_MUTEX_INITIALIZER
static

Definition at line 50 of file LStoreFile.h.

void* LStoreFile::m_fd
private

Definition at line 60 of file LStoreFile.h.

bool LStoreFile::m_is_loaded
private

Definition at line 64 of file LStoreFile.h.

void* LStoreFile::m_library_handle
private

Definition at line 63 of file LStoreFile.h.

std::string LStoreFile::m_name
private

Definition at line 62 of file LStoreFile.h.

int32_t(* LStoreFile::redd_close)(void *)
private

Definition at line 71 of file LStoreFile.h.

int32_t(* LStoreFile::redd_errno)()
private

Definition at line 76 of file LStoreFile.h.

int32_t(* LStoreFile::redd_init)()
private

Definition at line 69 of file LStoreFile.h.

int64_t(* LStoreFile::redd_lseek)(void *, int64_t, uint32_t)
private

Definition at line 72 of file LStoreFile.h.

void*(* LStoreFile::redd_open)(const char *, int32_t, int32_t)
private

Definition at line 73 of file LStoreFile.h.

int64_t(* LStoreFile::redd_read)(void *, char *, int64_t)
private

Definition at line 70 of file LStoreFile.h.

const std::string&(* LStoreFile::redd_strerror)()
private

Definition at line 77 of file LStoreFile.h.

int32_t(* LStoreFile::redd_term)()
private

Definition at line 75 of file LStoreFile.h.

int64_t(* LStoreFile::redd_write)(void *, const char *, int64_t)
private

Definition at line 74 of file LStoreFile.h.