#include <basestrm.h>
Inheritance diagram for MemoryStream:

Public Member Functions | |
| MemoryStream (MemoryStreamStorage *lbuf, IOMode mode) | |
| virtual void | writedata (const void *nbuf, int size) |
| writes data to the stream | |
| virtual int | readdata (void *nbuf, int size, bool excpt=true) |
| Reads data from the stream. | |
| int | dataavail (void) |
Protected Attributes | |
| int | blocksize |
| char * | pointer |
| IOMode | _mode |
| int | actmempos |
| MemoryStreamStorage * | buf |
Definition at line 204 of file basestrm.h.
| MemoryStream::MemoryStream | ( | MemoryStreamStorage * | lbuf, | |
| IOMode | mode | |||
| ) |
Definition at line 2324 of file basestrm.cpp.
References _mode, actmempos, MemoryStreamStorage::allocated, tnstream::appending, blocksize, MemoryStreamStorage::buf, buf, pointer, tnstream::reading, MemoryStreamStorage::used, and tnstream::writing.
| void MemoryStream::writedata | ( | const void * | nbuf, | |
| int | size | |||
| ) | [virtual] |
writes data to the stream
| buf | pointer to the buffer | |
| size | the number of bytes which are going to be written |
Implements tnstream.
Definition at line 2357 of file basestrm.cpp.
References _mode, MemoryStreamStorage::allocated, blocksize, MemoryStreamStorage::buf, buf, MemoryStreamStorage::used, and tnstream::writing.
| int MemoryStream::readdata | ( | void * | nbuf, | |
| int | size, | |||
| bool | excpt = true | |||
| ) | [virtual] |
Reads data from the stream.
| buf | the buffer which the data is written to | |
| size | the number of bytes which should be read | |
| excpt | If true the operation will throw an exception if the desired number of bytes cannot be read. |
Implements tnstream.
Definition at line 2377 of file basestrm.cpp.
References _mode, actmempos, MemoryStreamStorage::buf, buf, tnstream::reading, and MemoryStreamStorage::used.
| int MemoryStream::dataavail | ( | void | ) |
Definition at line 2394 of file basestrm.cpp.
References _mode, actmempos, buf, MemoryStreamStorage::used, and tnstream::writing.
Referenced by trunreplay::readnextaction(), and trunreplay::run().
int MemoryStream::blocksize [protected] |
char* MemoryStream::pointer [protected] |
IOMode MemoryStream::_mode [protected] |
Definition at line 208 of file basestrm.h.
Referenced by dataavail(), MemoryStream(), readdata(), and writedata().
int MemoryStream::actmempos [protected] |
Definition at line 209 of file basestrm.h.
Referenced by dataavail(), MemoryStream(), and readdata().
MemoryStreamStorage* MemoryStream::buf [protected] |
Definition at line 210 of file basestrm.h.
Referenced by dataavail(), MemoryStreamStorage::getBuffer(), MemoryStream(), readdata(), and writedata().
1.5.1