AXCEL C++ Framework
Elegance through abstraction
|
File-like buffer. More...
#include <axcel.h>
Public Member Functions | |
virtual string | type () |
"data" | |
virtual | operator string () |
Convert to string. | |
data (const data &d) | |
char & | operator[] (int i) |
data & | operator= (const char *s) |
data & | operator= (object &o) |
data & | operator= (data d) |
bool | operator== (data d) |
bool | operator== (const char *s) |
bool | operator== (object &o) |
bool | operator!= (data d) |
bool | operator!= (const char *s) |
bool | operator!= (object &o) |
data () | |
~data () | |
virtual int | getc () |
Read byte. | |
virtual int | putc (int c) |
Write byte. | |
virtual bool | seek (long offset, int whence) |
virtual size_t | tell () |
virtual void | rewind () |
virtual void | unwind () |
virtual bool | ffwd (size_t offset) |
virtual bool | prev (size_t offset) |
virtual size_t | len () const |
virtual void | realloc (size_t n) |
virtual | operator void * () |
virtual | operator char * () |
Public Attributes | |
char * | buf |
Protected Attributes | |
size_t | pos |
size_t | mlen |
size_t | slen |
File-like buffer.
A type of buffer class whose data can be read or written to like a file stream.
int axcel::data::getc | ( | ) | [virtual] |
Read byte.
Reads the next character from stream and returns it as an unsigned char cast to an int, or EOF on end of file or error. Before returning from the method, one of the following methods of the stream must be called:
Implements axcel::io::input.
Reimplemented in axcel::string.
virtual axcel::data::operator char * | ( | ) | [inline, virtual] |
Reimplemented in axcel::string.
axcel::data::operator string | ( | ) | [virtual] |
Convert to string.
The string represenation of this object is the hex values of all the bytes in the internal data buffer delimited by spaces.
Reimplemented from axcel::io::ios.
Reimplemented in axcel::string.
bool axcel::data::operator!= | ( | const char * | s | ) |
Reimplemented in axcel::string.
bool axcel::data::operator!= | ( | object & | o | ) |
data & axcel::data::operator= | ( | const char * | s | ) |
Reimplemented in axcel::string.
bool axcel::data::operator== | ( | const char * | s | ) |
Reimplemented in axcel::string.
bool axcel::data::operator== | ( | object & | o | ) |
char & axcel::data::operator[] | ( | int | i | ) |
Reimplemented in axcel::string.
int axcel::data::putc | ( | int | c | ) | [virtual] |
Write byte.
c | Character to write |
Writes character c to stream and returns a non-negative number on success or EOF on error. Before returning from within this method, one of the following methods must be called:
Implements axcel::io::output.
Reimplemented in axcel::string.
bool axcel::data::seek | ( | long | offset, |
int | whence | ||
) | [virtual] |
string axcel::data::type | ( | ) | [virtual] |
char* axcel::data::buf |
size_t axcel::data::mlen [protected] |
size_t axcel::data::pos [protected] |
size_t axcel::data::slen [protected] |