Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

tmemorystream Class Reference

#include <basestrm.h>

Inheritance diagram for tmemorystream:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 tmemorystream (tmemorystreambuf *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 * zeiger
IOMode _mode
int actmempos
tmemorystreambufbuf

Constructor & Destructor Documentation

tmemorystream::tmemorystream tmemorystreambuf lbuf,
IOMode  mode
 

Definition at line 2120 of file basestrm.cpp.

References _mode, actmempos, tmemorystreambuf::allocated, tnstream::appending, blocksize, tmemorystreambuf::buf, buf, tnstream::reading, tmemorystreambuf::used, tnstream::writing, and zeiger.


Member Function Documentation

int tmemorystream::dataavail void   ) 
 

Definition at line 2190 of file basestrm.cpp.

References _mode, actmempos, buf, tmemorystreambuf::used, and tnstream::writing.

Referenced by trunreplay::readnextaction(), and trunreplay::run().

int tmemorystream::readdata void *  nbuf,
int  size,
bool  excpt = true
[virtual]
 

Reads data from the stream.

Parameters:
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.
Returns:
the number of bytes which were read.

Implements tnstream.

Definition at line 2173 of file basestrm.cpp.

References _mode, actmempos, tmemorystreambuf::buf, buf, tnstream::reading, and tmemorystreambuf::used.

void tmemorystream::writedata const void *  nbuf,
int  size
[virtual]
 

writes data to the stream

Parameters:
buf pointer to the buffer
size the number of bytes which are going to be written

Implements tnstream.

Definition at line 2153 of file basestrm.cpp.

References _mode, tmemorystreambuf::allocated, blocksize, tmemorystreambuf::buf, buf, tmemorystreambuf::used, and tnstream::writing.


Member Data Documentation

IOMode tmemorystream::_mode [protected]
 

Definition at line 211 of file basestrm.h.

Referenced by dataavail(), readdata(), tmemorystream(), and writedata().

int tmemorystream::actmempos [protected]
 

Definition at line 212 of file basestrm.h.

Referenced by dataavail(), readdata(), and tmemorystream().

int tmemorystream::blocksize [protected]
 

Definition at line 209 of file basestrm.h.

Referenced by tmemorystream(), and writedata().

tmemorystreambuf* tmemorystream::buf [protected]
 

Definition at line 213 of file basestrm.h.

Referenced by dataavail(), tmemorystreambuf::getBuffer(), readdata(), tmemorystream(), and writedata().

char* tmemorystream::zeiger [protected]
 

Definition at line 210 of file basestrm.h.

Referenced by tmemorystream().


The documentation for this class was generated from the following files:
Generated on Tue Jun 24 02:21:38 2008 for Advanced Strategic Command by  doxygen 1.4.2