dmlite  0.4
Public Types | Public Member Functions
dmlite::IOHandler Class Reference

IO interface. More...

#include <io.h>

List of all members.

Public Types

enum  Whence { kSet = SEEK_SET, kCur = SEEK_CUR, kEnd = SEEK_END }

Public Member Functions

virtual ~IOHandler ()
 Virtual destructor.
virtual void close (void)=0 throw (DmException)
 Close.
virtual size_t read (char *buffer, size_t count)=0 throw (DmException)
virtual size_t write (const char *buffer, size_t count)=0 throw (DmException)
virtual void seek (off_t offset, Whence whence)=0 throw (DmException)
virtual off_t tell (void)=0 throw (DmException)
 Return the cursor position.
virtual void flush (void)=0 throw (DmException)
 Flush the buffer.
virtual bool eof (void)=0 throw (DmException)
 Return true if end of file.

Detailed Description

IO interface.


Member Enumeration Documentation

Enumerator:
kSet 

Beginning of the file.

kCur 

Current position.

kEnd 

End of file.


Constructor & Destructor Documentation

IOHandler::~IOHandler ( )
virtual

Virtual destructor.


Member Function Documentation

virtual void dmlite::IOHandler::close ( void  ) throw (DmException)
pure virtual

Close.

virtual bool dmlite::IOHandler::eof ( void  ) throw (DmException)
pure virtual

Return true if end of file.

virtual void dmlite::IOHandler::flush ( void  ) throw (DmException)
pure virtual

Flush the buffer.

virtual size_t dmlite::IOHandler::read ( char *  buffer,
size_t  count 
) throw (DmException)
pure virtual

Read.

Parameters:
bufferWhere to store the data.
countNumber of bytes to read.
Returns:
Number of bytes actually read.
virtual void dmlite::IOHandler::seek ( off_t  offset,
Whence  whence 
) throw (DmException)
pure virtual

Move the cursor.

Parameters:
offsetThe offset.
whenceReference.
virtual off_t dmlite::IOHandler::tell ( void  ) throw (DmException)
pure virtual

Return the cursor position.

virtual size_t dmlite::IOHandler::write ( const char *  buffer,
size_t  count 
) throw (DmException)
pure virtual

Write.

Parameters:
bufferData to write.
countNumber of bytes to write.
Returns:
Number of bytes actually written.

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