Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

XFcCFL Class Reference

Compressed File Library object. More...

Collaboration diagram for XFcCFL:

Collaboration graph
[legend]
List of all members.

Public Member Functions

XFCIMPORT XFcCFL ()
 Constructor.

XFCIMPORT INT openLibrary (const CHAR *aLibFilename)
 Opens library from a file (checks beginning and end of file).

XFCIMPORT INT openLibrary (const CHAR *aLibFilename, INT32 aOffset)
 Opens library from a file (checks offset and end of file).

XFCIMPORT INT openLibrary (XFcFile *aLibFilePtr)
 Opens library from a file pointer (file position must be at start of the library).

XFCIMPORT INT8getFile (const CHAR *aName)
 Returns file data.

XFCIMPORT INT8getFile (const CHAR *aName, INT32 &aSize)
 Returns file data and data length.

XFCIMPORT INT getFile (const CHAR *aName, INT8 *aBuffer, INT32 aMaxSize)
 Writes file data into preallocated buffer, returns bytes written.

XFCIMPORT INT32 getFileSize (const CHAR *aName)
 Returns uncompressed file size in bytes.

XFCIMPORT INT fileExists (const CHAR *aName)
 Returns non-zero if file exists in directory.

XFCIMPORT XFcFilegetFilePtr (const CHAR *aName)
 Returns a file pointer pointing at the beginning of (possibly compressed) data.

XFCIMPORT void dropFilePtr (XFcFile *aFile)
 Drops a file pointer.

XFCIMPORT INT32 getFileOfs (const CHAR *aName)
 Returns file offset to the beginning of (possibly compressed) data.

XFCIMPORT const CHARcompressionInfoString (const CHAR *aName)
 Returns a printable string information about compression of this file.

XFCIMPORT const CHARencryptionInfoString (const CHAR *aName)
 Returns a printable string information about encryption of this file.

XFCIMPORT const CHARpreprocessorInfoString (const CHAR *aName)
 Returns a printable string information about preprocessing of this file.

XFCIMPORT ~XFcCFL ()
 Destructor.


Static Public Member Functions

XFCIMPORT XFcCFL * create (const CHAR *aLibFilename)
 Creates a XFcCFL object and opens library from a file (checks beginning and end of file).

XFCIMPORT XFcCFL * create (const CHAR *aLibFilename, INT32 aOffset)
 Creates a XFcCFL object and opens library from a file (checks offset and end of file).

XFCIMPORT XFcCFL * create (XFcFile *aLibFilePtr)
 Creates a XFcCFL object and opens library from a file pointer (file position must be at start of the library).


Protected Member Functions

XFcCFLDirectoryEntryfindEntry (const CHAR *aName)
 Finds directory entries by a filename.


Protected Attributes

XFcCFLLibrarymRootLib
 Pointer to the first XFcCFLLibrary object (linked list).

XFcCFLDirectoryEntrymRootDir
 Pointer to the first XFcCFLDirectoryEntry object (linked list).


Friends

class XFcFileFind

Detailed Description

Compressed File Library object.

This class can be used to access files within compressed file library (.cfl) files. Multiple .cfl files can be 'mounted' to a single XFcCFL object, and multiple XFcCFL objects can exist. If several .cfl files have a file with the same name, only the last instance is found when opened. This enables the developer to override any default data, which is useful when doing localization or different levels (or mods).


Constructor & Destructor Documentation

XFCIMPORT XFcCFL::XFcCFL  
 

Constructor.

XFCIMPORT XFcCFL::~XFcCFL  
 

Destructor.


Member Function Documentation

XFCIMPORT const CHAR* XFcCFL::compressionInfoString const CHAR   aName
 

Returns a printable string information about compression of this file.

XFCIMPORT XFcCFL* XFcCFL::create XFcFile   aLibFilePtr [static]
 

Creates a XFcCFL object and opens library from a file pointer (file position must be at start of the library).

XFCIMPORT XFcCFL* XFcCFL::create const CHAR   aLibFilename,
INT32    aOffset
[static]
 

Creates a XFcCFL object and opens library from a file (checks offset and end of file).

XFCIMPORT XFcCFL* XFcCFL::create const CHAR   aLibFilename [static]
 

Creates a XFcCFL object and opens library from a file (checks beginning and end of file).

XFCIMPORT void XFcCFL::dropFilePtr XFcFile   aFile
 

Drops a file pointer.

XFCIMPORT const CHAR* XFcCFL::encryptionInfoString const CHAR   aName
 

Returns a printable string information about encryption of this file.

XFCIMPORT INT XFcCFL::fileExists const CHAR   aName
 

Returns non-zero if file exists in directory.

XFcCFLDirectoryEntry* XFcCFL::findEntry const CHAR   aName [protected]
 

Finds directory entries by a filename.

XFCIMPORT INT XFcCFL::getFile const CHAR   aName,
INT8   aBuffer,
INT32    aMaxSize
 

Writes file data into preallocated buffer, returns bytes written.

XFCIMPORT INT8* XFcCFL::getFile const CHAR   aName,
INT32   aSize
 

Returns file data and data length.

Note:
The returned memory is allocated with new INT8[filesize].

XFCIMPORT INT8* XFcCFL::getFile const CHAR   aName
 

Returns file data.

Note:
The returned memory is allocated with new INT8[filesize].

XFCIMPORT INT32 XFcCFL::getFileOfs const CHAR   aName
 

Returns file offset to the beginning of (possibly compressed) data.

XFCIMPORT XFcFile* XFcCFL::getFilePtr const CHAR   aName
 

Returns a file pointer pointing at the beginning of (possibly compressed) data.

Note:
Client must use dropFilePtr to close the file pointer!

XFCIMPORT INT32 XFcCFL::getFileSize const CHAR   aName
 

Returns uncompressed file size in bytes.

XFCIMPORT INT XFcCFL::openLibrary XFcFile   aLibFilePtr
 

Opens library from a file pointer (file position must be at start of the library).

XFCIMPORT INT XFcCFL::openLibrary const CHAR   aLibFilename,
INT32    aOffset
 

Opens library from a file (checks offset and end of file).

XFCIMPORT INT XFcCFL::openLibrary const CHAR   aLibFilename
 

Opens library from a file (checks beginning and end of file).

XFCIMPORT const CHAR* XFcCFL::preprocessorInfoString const CHAR   aName
 

Returns a printable string information about preprocessing of this file.


Friends And Related Function Documentation

friend class XFcFileFind [friend]
 


Member Data Documentation

XFcCFLDirectoryEntry* XFcCFL::mRootDir [protected]
 

Pointer to the first XFcCFLDirectoryEntry object (linked list).

XFcCFLLibrary* XFcCFL::mRootLib [protected]
 

Pointer to the first XFcCFLLibrary object (linked list).


   
X-Forge Documentation
Confidential
Copyright © 2002-2003 Fathammer
   
Documentation generated
with doxygen
by Dimitri van Heesch