TekFileBZ2ASCII Class Reference

Inheritance diagram for TekFileBZ2ASCII:

Inheritance graph
[legend]
Collaboration diagram for TekFileBZ2ASCII:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TekFileBZ2ASCII ()
 ~TekFileBZ2ASCII ()
 TEKSTD_HEADER_VARSANDFUNC (TekFileBZ2ASCII)
virtual TEKERR ReadLine (uchar_t **Buffer, unsigned long ReadMax)
virtual TEKERR WriteLine (const uchar_t *Buffer)
virtual TEKERR get_BytesIn (uint64_t *RetVal)
virtual TEKERR get_BytesOut (uint64_t *RetVal)
virtual TEKERR put_UseLessMemory (unsigned int NewVal)
virtual TEKERR get_UseLessMemory (unsigned int *RetVal)
virtual TEKERR put_WorkFactor (unsigned int NewVal)
virtual TEKERR get_WorkFactor (unsigned int *RetVal)
virtual TEKERR put_Verbosity (unsigned int NewVal)
virtual TEKERR get_Verbosity (unsigned int *RetVal)
virtual TEKERR put_BlockSize (unsigned int NewVal)
virtual TEKERR get_BlockSize (unsigned int *RetVal)
virtual TEKERR CloseStream ()
virtual TEKERR OpenStream ()
virtual TEKERR get_FILE (FILE **FileDescriptor)
virtual TEKERR get_Filename (uchar_t **Name)
virtual TEKERR get_Mode (TekFileMode *ModeID)
virtual TEKERR get_Type (TekFileType *FileTypePointer)
virtual TEKERR put_FILE (FILE *FileDescriptor)
virtual TEKERR put_Filename (uchar_t *Name)
virtual TEKERR put_Mode (TekFileMode ModeID)
virtual TEKERR Close ()
virtual TEKERR Flush ()
virtual TEKERR Open ()
virtual TEKERR Open64 ()
virtual TEKERR Read64 (void *Buffer, uint64_t BytesToRead, uint64_t *BytesRead)
virtual TEKERR Read (void *Buffer, unsigned long BytesToRead, unsigned long *BytesRead)
virtual TEKERR Seek64 (TekFileSeek SeekWhere, int64_t NewLocation)
virtual TEKERR Seek (TekFileSeek SeekWhere, signed long NewLocation)
virtual TEKERR Write64 (void *Buffer, uint64_t BytesToWrite, uint64_t *BytesWrote)
virtual TEKERR Write (void *Buffer, unsigned long BytesToWrite, unsigned long *BytesWrote)
virtual TEKERR get_Location (unsigned long *Location)
virtual TEKERR get_Location64 (uint64_t *Location)

Detailed Description

This is the implementation of TekFileBZ2 that can compress and decompress ASCII files and strings.

This interface is FINAL.

This is a Type II interface.

Author:
Kevin McBride

Definition at line 46 of file tekfilebz2ascii.h.


Constructor & Destructor Documentation

TekFileBZ2ASCII TekFileBZ2ASCII  ) 
 

Instantizer.

Definition at line 57 of file TekFileBZ2ASCII.cpp.

~TekFileBZ2ASCII  ) 
 

Destructor.

Definition at line 82 of file TekFileBZ2ASCII.cpp.

References Close().

Here is the call graph for this function:


Member Function Documentation

Close  )  [virtual]
 

Retrieves the mode currently set.

Implements TekFileASCII.

Referenced by WriteLine(), and ~TekFileBZ2ASCII().

CloseStream  )  [virtual]
 

Tells the BZIP2 library to open a stream for the internally held FILE *

Implements TekFileBZ2.

Referenced by WriteLine().

Flush  )  [virtual]
 

Opens the file and a BZIP2 stream.

Implements TekFileASCII.

Referenced by WriteLine().

get_BlockSize unsigned int *  RetVal  )  [virtual]
 

Tells the BZIP2 library to close the stream currently open for the internally held FILE *

NOTE: TekFileBZ2ASCII::Close() should be used instead. TekFileBZ2ASCII::CloseStream() will not close the internally held FILE *

Implements TekFileBZ2.

Referenced by WriteLine().

get_BytesIn uint64_t *  RetVal  )  [virtual]
 

Retrieves the amount of bytes bzip2 put out.

NOTE: You will get a TEKERR_UNAVAILABLE if you try calling this function while the BytesIn data is unavailable.

Implements TekFileBZ2.

Referenced by WriteLine().

get_BytesOut uint64_t *  RetVal  )  [virtual]
 

Sets or resets the UseLessMemory flag.

NOTE: You will get a TEKERR_ACCESS if you try calling this function while the internally held BZFILE structure is opened.

Implements TekFileBZ2.

Referenced by WriteLine().

get_FILE FILE **  FileDescriptor  )  [virtual]
 

Obtains the filename in the form of a uchar.

NOTE: If a Filename has not yet been set, a TEKERR_ACCESS will be returned.

Implements TekFileASCII.

Referenced by WriteLine().

get_Filename uchar_t **  Name  )  [virtual]
 

Sets the handle used to access a file.

NOTE: If there is a descriptor open in the descriptor, and FileDescriptor is not NULL, a TEKERR_ACCESS will be returned. However, if FileDescriptor is NULL, the file descriptor and its associated stream will be closed.
WARNING!!!!! DO NOT USE THE FILE DESCRIPTOR YOU PASS IN TO THIS FUNCTION UNLESS YOU HAVE RE-RETRIEVED IT USING TekFileBZ2ASCII::get_FILE()! Utilizing the descriptor in a direct fashion after a successful call to put_FILE() will result in undefined results!!!!!

Implements TekFileASCII.

Referenced by WriteLine().

get_Location unsigned long *  Location  )  [virtual]
 

Retrieves the location and stores it in a 64-bit variable.

CAUTION! This function may not be implemented due to optimization settings, so watch out for TEKERR_NOTIMPL return value.

Implements TekFileASCII.

Referenced by WriteLine().

virtual TEKERR get_Location64 uint64_t *  Location  )  [virtual]
 

Retrieves the location and stores it in a 64-bit variable.

Implements TekFileASCII.

Referenced by WriteLine().

get_Mode TekFileMode *  ModeID  )  [virtual]
 

Retrieves the mode currently set.

NOTE: This function will fail if a descriptor is open!

Implements TekFileASCII.

Referenced by WriteLine().

get_Type TekFileType *  FileTypePointer  )  [virtual]
 

Closes the file and the related stream.

Implements TekFileASCII.

Referenced by WriteLine().

get_UseLessMemory unsigned int *  RetVal  )  [virtual]
 

Sets the work factor number.

NOTE: You will get a TEKERR_ACCESS if you try calling this function while the internally held BZFILE structure is opened.

WARNING: It is best that you not set this yourself. The bzip2 library handles this on its own.

Implements TekFileBZ2.

Referenced by WriteLine().

get_Verbosity unsigned int *  RetVal  )  [virtual]
 

Sets the block size to use for writing. Allowed values are 1-9.

NOTE: You will get a TEKERR_ACCESS if you try calling this function while the internally held BZFILE structure is opened.

Implements TekFileBZ2.

Referenced by WriteLine().

get_WorkFactor unsigned int *  RetVal  )  [virtual]
 

Sets the current verbosity value.

NOTE: You will get a TEKERR_ACCESS if you try calling this function while the internally held BZFILE structure is opened.

Implements TekFileBZ2.

Referenced by WriteLine().

Open  )  [virtual]
 

Opens the file and a BZIP2 stream using 64 bit semantics.

Implements TekFileASCII.

Referenced by WriteLine().

Open64  )  [virtual]
 

Read from the file using 64 bit semantics.

Implements TekFileASCII.

Referenced by WriteLine().

OpenStream  )  [virtual]
 

Obtains the handle used to access the open file.

NOTE: If there is an open BZ2 stream in the instance, you will get a
TEKERR_ACCESS returned to you.

Implements TekFileBZ2.

Referenced by WriteLine().

put_BlockSize unsigned int  NewVal  )  [virtual]
 

Retrieves the block size to use for writing.

Implements TekFileBZ2.

Referenced by WriteLine().

put_FILE FILE *  FileDescriptor  )  [virtual]
 

Sets the filename to access.

NOTE: If there is a descriptor open in the descriptor, and "Name" is not NULL, a TEKERR_ACCESS will be returned.

Implements TekFileASCII.

Referenced by WriteLine().

put_Filename uchar_t Name  )  [virtual]
 

Gets the file type.

Implements TekFileASCII.

Referenced by WriteLine().

put_Mode TekFileMode  ModeID  )  [virtual]
 

This is not implemented.

Implements TekFileASCII.

Referenced by WriteLine().

put_UseLessMemory unsigned int  NewVal  )  [virtual]
 

Retrieves the UseLessMemory flag.

Implements TekFileBZ2.

Referenced by WriteLine().

put_Verbosity unsigned int  NewVal  )  [virtual]
 

Retrieves the current verbosity value.

Implements TekFileBZ2.

Referenced by WriteLine().

put_WorkFactor unsigned int  NewVal  )  [virtual]
 

Retrieves the work factor number.

Implements TekFileBZ2.

Referenced by WriteLine().

Read void *  Buffer,
unsigned long  BytesToRead,
unsigned long *  BytesRead
[virtual]
 

This is not implemented.

Implements TekFileASCII.

Referenced by ReadLine(), and WriteLine().

Read64 void *  Buffer,
uint64_t  BytesToRead,
uint64_t *  BytesRead
[virtual]
 

Read from the file.

Implements TekFileASCII.

Referenced by WriteLine().

TEKERR ReadLine uchar_t **  Buffer,
unsigned long  ReadMax
[virtual]
 

Reads up to ReadMax characters from a file and puts it in a uchar_t. The Buffer can be an already-created uchar_t, or can be a pointer to a uchar_t* to store the new uchar_t in.

NOTE: For optimization reasons, always let this function create the uchar_t for you. However, the same uchar_t can be passed in to this function without any problems.

Implements TekFileASCII.

Definition at line 108 of file TekFileBZ2ASCII.cpp.

References Read(), _uchar_t::uchar_t_ascii, and _uchar_t::uchar_t_asciilen.

Here is the call graph for this function:

Seek TekFileSeek  SeekWhere,
signed long  NewLocation
[virtual]
 

Write to the file using 64 bit semantics.

Implements TekFileASCII.

Referenced by WriteLine().

Seek64 TekFileSeek  SeekWhere,
int64_t  NewLocation
[virtual]
 

This is not implemented.

Implements TekFileASCII.

Referenced by WriteLine().

TEKSTD_HEADER_VARSANDFUNC TekFileBZ2ASCII   ) 
 

This indicates that this is a type II interface.

Write void *  Buffer,
unsigned long  BytesToWrite,
unsigned long *  BytesWrote
[virtual]
 

Retrieves the location.

CAUTION! This function may not be implemented due to optimization settings, so watch out for TEKERR_NOTIMPL return value.

Implements TekFileASCII.

Referenced by WriteLine().

Write64 void *  Buffer,
uint64_t  BytesToWrite,
uint64_t *  BytesWrote
[virtual]
 

Write to the file.

Implements TekFileASCII.

Referenced by WriteLine().

TEKERR WriteLine const uchar_t Buffer  )  [virtual]
 

Writes a ascii-part of a uchar_t to the file.

Implements TekFileASCII.

Definition at line 242 of file TekFileBZ2ASCII.cpp.

References Close(), CloseStream(), Flush(), get_BlockSize(), get_BytesIn(), get_BytesOut(), get_FILE(), get_Filename(), get_Location(), get_Location64(), get_Mode(), get_Type(), get_UseLessMemory(), get_Verbosity(), get_WorkFactor(), i64::i64_a, i64::i64_b, Open(), Open64(), OpenStream(), put_BlockSize(), put_FILE(), put_Filename(), put_Mode(), put_UseLessMemory(), put_Verbosity(), put_WorkFactor(), Read(), Read64(), Seek(), Seek64(), _uchar_t::uchar_t_ascii, _uchar_t::uchar_t_asciilen, Write(), and Write64().

Here is the call graph for this function:


The documentation for this class was generated from the following files: SourceForge.net Logo  Technical Library Template Interface Project Page