tn_c_lzw_filestream Class Reference

#include <basestrm.h>

Inheritance diagram for tn_c_lzw_filestream:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 tn_c_lzw_filestream (const ASCString &name, IOMode mode)
void writedata (const void *buf, int size)
 writes data to the stream
int readdata (void *buf, int size, bool excpt=true)
 Reads data from the stream.
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
ASCString getLocation ()
 returns the location of the stream.
ASCString getArchive ()
 returns the archive name if the stream is located inside an archive; or "" if not.

Protected Member Functions

int readcmpdata (void *buf, int size, bool excpt=true)
void writecmpdata (const void *buf, int size)

Detailed Description

Definition at line 409 of file basestrm.h.


Constructor & Destructor Documentation

tn_c_lzw_filestream::tn_c_lzw_filestream ( const ASCString name,
IOMode  mode 
)

Definition at line 1590 of file basestrm.cpp.

References constructFileName(), FileLocation::container, tnstream::devicename, FileLocation::directoryLevel, FileLocation::found, tnstream::getDeviceName(), tanycompression::init(), locateFile(), tncontainerstream::opencontainerfile(), and tnstream::reading.

tn_c_lzw_filestream::~tn_c_lzw_filestream (  )  [virtual]

Definition at line 1703 of file basestrm.cpp.

References tlzwstreamcompression::close(), tanycompression::close_compression(), tncontainerstream::closecontainerfile(), displayLogMessage(), and getLocation().


Member Function Documentation

int tn_c_lzw_filestream::readcmpdata ( void *  buf,
int  size,
bool  excpt = true 
) [protected, virtual]

Implements CompressionStreamInterface.

Definition at line 1669 of file basestrm.cpp.

References tncontainerstream::readcontainerdata(), and tnbufstream::readdata().

void tn_c_lzw_filestream::writecmpdata ( const void *  buf,
int  size 
) [protected, virtual]

Implements CompressionStreamInterface.

Definition at line 1661 of file basestrm.cpp.

References tnstream::reading, tnbufstream::writedata(), and tnstream::writing.

void tn_c_lzw_filestream::writedata ( const void *  buf,
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 1678 of file basestrm.cpp.

References tanycompression::writedata().

int tn_c_lzw_filestream::readdata ( void *  buf,
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 1683 of file basestrm.cpp.

References tlzwstreamcompression::mode, tncontainerstream::readcontainerdata(), tanycompression::readdata(), tnbufstream::readdata(), tlzwstreamcompression::readingdirect, and tlzwstreamcompression::tempbuf.

Referenced by loadpalette(), testStreamEncoding1(), and testStreamEncoding2().

time_t tn_c_lzw_filestream::get_time ( void   )  [virtual]

Definition at line 1695 of file basestrm.cpp.

References tn_file_buf_stream::get_time().

int tn_c_lzw_filestream::getSize ( void   )  [virtual]

returns the size of the stream or -1 if the stream does not have a size

Reimplemented from tnstream.

Definition at line 1653 of file basestrm.cpp.

References tn_file_buf_stream::getSize().

ASCString tn_c_lzw_filestream::getLocation (  )  [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 1648 of file basestrm.cpp.

Referenced by loadalltextfiles(), LuaRunner::runFile(), and ~tn_c_lzw_filestream().

ASCString tn_c_lzw_filestream::getArchive (  )  [virtual]

returns the archive name if the stream is located inside an archive; or "" if not.

Reimplemented from tnstream.

Definition at line 1639 of file basestrm.cpp.

References tnstream::getDeviceName().


The documentation for this class was generated from the following files:
Generated on Mon May 21 01:47:52 2012 for Advanced Strategic Command by  doxygen 1.5.1