filters
MSWrite::Device Class Reference
#include <libmswrite_defs.h>
Inheritance diagram for MSWrite::Device:

Detailed Description
Device that either reads or writes from/to .WRI files.
Definition at line 206 of file libmswrite_defs.h.
Public Member Functions | |
Device () | |
virtual | ~Device () |
bool | setCache (Byte *const cache) |
bool | readInternal (Byte *buf, const long numBytes) |
bool | writeInternal (const Byte *buf, const long numBytes) |
bool | seekInternal (const long offset, const int whence) |
long | tellInternal (void) const |
void | debug (const char *s, const int i) |
void | debug (const char *s1, const char *s2) |
void | debug (const char *s1, const Byte *s2) |
bool | good (void) const |
int | bad (void) const |
virtual bool | read (Byte *buf, const DWord numBytes)=0 |
virtual bool | write (const Byte *buf, const DWord numBytes)=0 |
virtual bool | seek (const long offset, const int whence)=0 |
virtual long | tell (void)=0 |
virtual void | debug (const char *s) |
virtual void | debug (const int i) |
virtual void | error (const int errorCode, const char *message, const char *file="", const int lineno=0, DWord token=NoToken) |
Static Public Attributes | |
static const DWord | NoToken = DWord (0xABCD1234) |
Protected Attributes | |
int | m_error |
Member Function Documentation
bool MSWrite::Device::setCache | ( | Byte *const | cache | ) | [inline] |
setCache specifies whether or not Device should start reading from memory block specified by
- Parameters:
-
cache,instead of from user defined functions (which probably read from a file).
cache
to NULL stops the Device from reading from the last memory block specified.
Definition at line 247 of file libmswrite_defs.h.
Functions that the user must implement.
If the seek function is called to move past EOF (when writing), pad from EOF to the new location with 0's and then seek.
It is your responsibility to call error() if a file op fails.
Implemented in MSWrite::MemoryDevice.
The documentation for this class was generated from the following file: