Advanced Strategic Command
|
#include <basestrm.h>
Public Member Functions | |
tn_c_lzw_filestream (const ASCString &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... | |
virtual | ~tn_c_lzw_filestream () |
virtual time_t | get_time (void) |
virtual int | getSize (void) |
returns the size of the stream or -1 if the stream does not have a size More... | |
ASCString | getLocation () |
returns the location of the stream. More... | |
ASCString | getArchive () |
returns the archive name if the stream is located inside an archive; or "" if not. More... | |
![]() | |
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 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 | ~tnstream () |
Protected Member Functions | |
int | readcmpdata (void *buf, int size, bool excpt=true) |
void | writecmpdata (const void *buf, int size) |
![]() | |
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 () | |
![]() | |
virtual | ~CompressionStreamInterface () |
![]() | |
void | close (void) |
void | writedata (const void *buf, int size) |
int | readdata (void *buf, int size, bool excpt=true) |
tlzwstreamcompression (void) | |
virtual | ~tlzwstreamcompression (void) |
Additional Inherited Members | |
![]() | |
enum | IOMode { uninitialized, reading, writing, appending } |
the modes in which a stream can operate More... | |
![]() | |
enum | tmode { none, reading, writing, readingdirect, readingrle } |
typedef deque< Uint8 > | CDQ |
![]() | |
ASCString | devicename |
![]() | |
queue< Uint8, CDQ > | tempbuf |
tmode | mode |
Definition at line 409 of file basestrm.h.
Definition at line 1605 of file basestrm.cpp.
References constructFileName(), FileLocation::container, tnstream::devicename, FileLocation::directoryLevel, FileLocation::found, tanycompression::init(), locateFile(), and tnstream::reading.
|
virtual |
Definition at line 1718 of file basestrm.cpp.
References tlzwstreamcompression::close(), tanycompression::close_compression(), displayLogMessage(), and getLocation().
|
virtual |
Definition at line 1710 of file basestrm.cpp.
References tn_file_buf_stream::get_time().
|
virtual |
returns the archive name if the stream is located inside an archive; or "" if not.
Reimplemented from tnstream.
Definition at line 1654 of file basestrm.cpp.
|
virtual |
returns the location of the stream.
This may be a complete english sentence describing how the stream (usually a file) can be found. Should only be used for informing the user.
Reimplemented from tnstream.
Definition at line 1663 of file basestrm.cpp.
Referenced by loadalltextfiles(), LuaRunner::runFile(), and ~tn_c_lzw_filestream().
|
virtual |
returns the size of the stream or -1 if the stream does not have a size
Reimplemented from tnstream.
Definition at line 1668 of file basestrm.cpp.
References tn_file_buf_stream::getSize().
|
protectedvirtual |
Implements CompressionStreamInterface.
Definition at line 1684 of file basestrm.cpp.
References tnbufstream::readdata().
|
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 1698 of file basestrm.cpp.
References tlzwstreamcompression::mode, tnbufstream::readdata(), tanycompression::readdata(), tlzwstreamcompression::readingdirect, and tlzwstreamcompression::tempbuf.
Referenced by loadpalette(), testStreamEncoding1(), and testStreamEncoding2().
|
protectedvirtual |
Implements CompressionStreamInterface.
Definition at line 1676 of file basestrm.cpp.
References tnstream::reading, tnbufstream::writedata(), and tnstream::writing.
|
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 1693 of file basestrm.cpp.
References tanycompression::writedata().