OpenXcom  1.0
Open-source clone of the original X-Com
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | List of all members
OpenXcom::CatFile Class Reference

Subclass of std::ifstream to handle CAT files. More...

#include <CatFile.h>

Inheritance diagram for OpenXcom::CatFile:
OpenXcom::GMCatFile

Public Member Functions

 CatFile (const char *path)
 Creates a CAT file stream. More...
 
 ~CatFile ()
 Cleans up the stream. More...
 
bool operator! () const
 Inherit operator.
 
int getAmount () const
 Get amount of objects.
 
unsigned int getObjectSize (unsigned int i) const
 Get object size.
 
char * load (unsigned int i, bool name=false)
 Load an object into memory. More...
 

Detailed Description

Subclass of std::ifstream to handle CAT files.

Constructor & Destructor Documentation

OpenXcom::CatFile::CatFile ( const char *  path)

Creates a CAT file stream.

A CAT file starts with an index of the offset and size of every file contained within. Each file consists of a filename followed by its contents.

Parameters
pathFull path to CAT file.
OpenXcom::CatFile::~CatFile ( )

Cleans up the stream.

Frees associated memory.

Member Function Documentation

char * OpenXcom::CatFile::load ( unsigned int  i,
bool  name = false 
)

Load an object into memory.

Loads an object into memory.

Parameters
iObject number to load.
namePreserve internal file name.
Returns
Pointer to the loaded object.

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