Advanced Strategic Command
Public Member Functions | List of all members
tn_lzw_file_buf_stream Class Reference

#include <basestrm.h>

Inheritance diagram for tn_lzw_file_buf_stream:
Inheritance graph
[legend]

Public Member Functions

 tn_lzw_file_buf_stream (const char *name, IOMode mode)
 
void writedata (const void *buf, int size)
 writes data to the stream More...
 
int readdata (void *buf, int size, bool excpt=true)
 Reads data from the stream. More...
 
int readcmpdata (void *buf, int size, bool excpt=true)
 
void writecmpdata (const void *buf, int size)
 
 ~tn_lzw_file_buf_stream ()
 
- Public Member Functions inherited from tn_file_buf_stream
 tn_file_buf_stream (const ASCString &_fileName, IOMode mode)
 
virtual void seek (int newpos)
 Sets the stream pointer to a new location. An exception is thrown if the stream does not support seeking. More...
 
virtual int getstreamsize (void)
 
virtual int getSize (void)
 returns the size of the stream or -1 if the stream does not have a size More...
 
virtual time_t get_time (void)
 
virtual ~tn_file_buf_stream ()
 
- Public Member Functions inherited from tnbufstream
 tnbufstream ()
 
virtual ~tnbufstream ()
 
- Public Member Functions inherited from tnstream
 tnstream ()
 
virtual void readpchar (char **pc, int maxlength=0)
 Reads a string. More...
 
virtual void readpnchar (char **pc, int maxlength=0)
 Reads a string. More...
 
virtual bool readTextString (ASCString &s, bool includeCR=false)
 Reads a string. More...
 
virtual ASCString readString (bool includeCR=false)
 Reads and returns a string. More...
 
virtual void writepchar (const char *pc)
 write the C-String pc to the stream More...
 
virtual void writeString (const string &pc, bool binary=true)
 writes the C++ String pc to the stream. More...
 
virtual int readInt (void)
 Reads a 32 bit signed Integer. In the stream little-endian byte order is used and a translation is performed, if necessary. More...
 
virtual int readWord (void)
 Reads a 16 bit unsigned Integer. In the stream little-endian byte order is used and a translation is performed, if necessary. More...
 
virtual Uint8 readUint8 (void)
 Reads a 8 bit unsigned Integer. More...
 
virtual char readCharacter (void)
 Read a 8 bit character. More...
 
template<size_t N>
void writeBitset (const std::bitset< N > &bs)
 
template<size_t N>
void readBitset (std::bitset< N > &bs)
 
virtual float readFloat (void)
 Reads a flaot variable. More...
 
virtual void writeInt (int i)
 Writes a 32 bit signed Integer. In the stream little-endian byte order is used and a translation is performed, if necessary. More...
 
virtual void writeInt (unsigned int i)
 
void writeInt (bool b)
 
virtual void writeWord (int w)
 Writes a 16 bit unsigned Integer. In the stream little-endian byte order is used and a translation is performed, if necessary. More...
 
virtual void writeUint8 (Uint8 c)
 Writes a 8 bit unsigned Integer. More...
 
virtual void writeCharacter (char c)
 Writes a 8 bit character. More...
 
virtual void writeFloat (float f)
 Write a floating point variable. More...
 
virtual void writerlepict (const void *buf)
 Writes an image to the stream and compresses it using RLE. More...
 
virtual void writeImage (const void *buf, bool compress=true)
 Writes an image to the stream. More...
 
virtual void readrlepict (void **pnter, bool allocated, int *size)
 Writes an RLE compressed or uncompressed image from the stream. More...
 
virtual ASCString getDeviceName ()
 returns the name of the stream. More...
 
virtual ASCString getLocation ()
 returns the location of the stream. More...
 
virtual ASCString getArchive ()
 returns the archive name if the stream is located inside an archive; or "" if not. More...
 
virtual ~tnstream ()
 

Additional Inherited Members

- Public Types inherited from tnstream
enum  IOMode { uninitialized, reading, writing, appending }
 the modes in which a stream can operate More...
 
- Protected Types inherited from tlzwstreamcompression
enum  tmode {
  none, reading, writing, readingdirect,
  readingrle
}
 
typedef deque< Uint8 > CDQ
 
- Protected Member Functions inherited from tn_file_buf_stream
void readbuffer (void)
 
void writebuffer (void)
 
- Protected Member Functions inherited from tnbufstream
virtual void close (void)
 
- Protected Member Functions inherited from tanycompression
virtual int readlzwdata (void *buf, int size, bool excpt=true)
 
virtual void writelzwdata (const void *buf, int size)
 
void close_compression (void)
 
 tanycompression (int md)
 
void init (void)
 
void writedata (const void *buf, int size)
 
int readdata (void *buf, int size, bool excpt=true)
 
 ~tanycompression ()
 
- Protected Member Functions inherited from CompressionStreamInterface
virtual ~CompressionStreamInterface ()
 
- Protected Member Functions inherited from tlzwstreamcompression
void close (void)
 
void writedata (const void *buf, int size)
 
int readdata (void *buf, int size, bool excpt=true)
 
 tlzwstreamcompression (void)
 
virtual ~tlzwstreamcompression (void)
 
- Protected Attributes inherited from tnbufstream
Uint8 * zeiger
 
IOMode _mode
 
int actmempos
 
int memsize
 
int datasize
 
- Protected Attributes inherited from tnstream
ASCString devicename
 
- Protected Attributes inherited from tlzwstreamcompression
queue< Uint8, CDQtempbuf
 
tmode mode
 

Detailed Description

Definition at line 390 of file basestrm.h.

Constructor & Destructor Documentation

tn_lzw_file_buf_stream::tn_lzw_file_buf_stream ( const char *  name,
IOMode  mode 
)
inline

Definition at line 392 of file basestrm.h.

References tanycompression::init().

tn_lzw_file_buf_stream::~tn_lzw_file_buf_stream ( )

Definition at line 1595 of file basestrm.cpp.

References tnbufstream::close(), and tanycompression::close_compression().

Member Function Documentation

int tn_lzw_file_buf_stream::readcmpdata ( void *  buf,
int  size,
bool  excpt = true 
)
virtual

Implements CompressionStreamInterface.

Definition at line 1585 of file basestrm.cpp.

References tnbufstream::readdata().

int tn_lzw_file_buf_stream::readdata ( void *  buf,
int  size,
bool  excpt = true 
)
virtual

Reads data from the stream.

Parameters
bufthe buffer which the data is written to
sizethe number of bytes which should be read
excptIf true the operation will throw an exception if the desired number of bytes cannot be read.
Returns
the number of bytes which were read.

Reimplemented from tnbufstream.

Definition at line 1580 of file basestrm.cpp.

References tanycompression::readdata().

void tn_lzw_file_buf_stream::writecmpdata ( const void *  buf,
int  size 
)
virtual

Implements CompressionStreamInterface.

Definition at line 1590 of file basestrm.cpp.

References tnbufstream::writedata().

void tn_lzw_file_buf_stream::writedata ( const void *  buf,
int  size 
)
virtual

writes data to the stream

Parameters
bufpointer to the buffer
sizethe number of bytes which are going to be written

Reimplemented from tnbufstream.

Definition at line 1575 of file basestrm.cpp.

References tanycompression::writedata().


The documentation for this class was generated from the following files: