#include <io.h>
Public Types | |
| kSet = SEEK_SET | |
| Beginning of the file. | |
| kCur = SEEK_CUR | |
| Current position. | |
| kEnd = SEEK_END | |
| End of file. | |
| enum | Whence { kSet = SEEK_SET, kCur = SEEK_CUR, kEnd = SEEK_END } |
Public Member Functions | |
| virtual | ~IOHandler () |
| Virtual destructor. | |
| std::string | getImplId (void) const throw () |
| String ID of the implementation. | |
| virtual void | close (void) throw (DmException) |
| Close. | |
| virtual int | fileno (void) throw (DmException) |
| Return internal file descriptor, if any. | |
| virtual struct::stat | fstat (void) throw (DmException) |
| virtual size_t | read (char *buffer, size_t count) throw (DmException) |
| virtual size_t | write (const char *buffer, size_t count) throw (DmException) |
| virtual size_t | readv (const struct iovec *vector, size_t count) throw (DmException) |
| virtual size_t | writev (const struct iovec *vector, size_t count) throw (DmException) |
| virtual size_t | pread (void *buffer, size_t count, off_t offset) throw (DmException) |
| virtual size_t | pwrite (const void *buffer, size_t count, off_t offset) throw (DmException) |
| virtual void | seek (off_t offset, Whence whence) throw (DmException) |
| virtual off_t | tell (void) throw (DmException) |
| Return the cursor position. | |
| virtual void | flush (void) throw (DmException) |
| Flush the buffer. | |
| virtual bool | eof (void) throw (DmException) |
| Return true if end of file. | |
| virtual dmlite::IOHandler::~IOHandler | ( | ) | [virtual] |
Virtual destructor.
| virtual void dmlite::IOHandler::close | ( | void | ) | throw (DmException) [virtual] |
Close.
| virtual bool dmlite::IOHandler::eof | ( | void | ) | throw (DmException) [virtual] |
Return true if end of file.
| virtual int dmlite::IOHandler::fileno | ( | void | ) | throw (DmException) [virtual] |
Return internal file descriptor, if any.
| virtual void dmlite::IOHandler::flush | ( | void | ) | throw (DmException) [virtual] |
Flush the buffer.
| virtual struct ::stat dmlite::IOHandler::fstat | ( | void | ) | throw (DmException) [virtual] |
Gets information about a file descriptor.
Default implementation combining seek/tell is provided.
| std::string dmlite::IOHandler::getImplId | ( | void | ) | const throw () [inline] |
String ID of the implementation.
| virtual size_t dmlite::IOHandler::pread | ( | void * | buffer, | |
| size_t | count, | |||
| off_t | offset | |||
| ) | throw (DmException) [virtual] |
Read from the given offset without changing the file offset.
| buffer | Where to put the data. | |
| count | Number of bytes to read. | |
| offset | The operation offset. |
| virtual size_t dmlite::IOHandler::pwrite | ( | const void * | buffer, | |
| size_t | count, | |||
| off_t | offset | |||
| ) | throw (DmException) [virtual] |
Write from the given offset without changing the file offset.
| buffer | Data to write. | |
| count | Number of bytes to read. | |
| offset | The operation offset. |
| virtual size_t dmlite::IOHandler::read | ( | char * | buffer, | |
| size_t | count | |||
| ) | throw (DmException) [virtual] |
Read.
| buffer | Where to store the data. | |
| count | Number of bytes to read. |
| virtual size_t dmlite::IOHandler::readv | ( | const struct iovec * | vector, | |
| size_t | count | |||
| ) | throw (DmException) [virtual] |
Read into multiple buffers.
| vector | An array with 'count' iovec structs. | |
| count | Number of elements in vector. |
A default implementation using read is provided.
| virtual void dmlite::IOHandler::seek | ( | off_t | offset, | |
| Whence | whence | |||
| ) | throw (DmException) [virtual] |
Move the cursor.
| offset | The offset. | |
| whence | Reference. |
| virtual off_t dmlite::IOHandler::tell | ( | void | ) | throw (DmException) [virtual] |
Return the cursor position.
| virtual size_t dmlite::IOHandler::write | ( | const char * | buffer, | |
| size_t | count | |||
| ) | throw (DmException) [virtual] |
Write.
| buffer | Data to write. | |
| count | Number of bytes to write. |
| virtual size_t dmlite::IOHandler::writev | ( | const struct iovec * | vector, | |
| size_t | count | |||
| ) | throw (DmException) [virtual] |
Write from multiple buffers.
| vector | An array with 'count' iovec structs. | |
| count | Number of elements in vector. |
A default implementation using write is provided.
1.4.7