Alientech 0.01
An extendable game engine
alien::utils::AlienCargoHold Class Reference

Main class containing everything needed to load and read from a Cargo Hold Packed file. More...

#include <CAlienCargoHold.h>

List of all members.

Public Member Functions

 AlienCargoHold (string filename)
 Constructor.
bool isOpen ()
 Checks if the CargoHold file is open. This function can be used for error checking. If it returns false then the file could not be open.
ACHDirectorygetRoot ()
 Retrieves a pointer to the root directory. Do not use this function to modify the file/directory structure.
ifstream * seekFile (string path)
 Prepares the structure for reading of the specified file.
string getCurrentFile ()
 Returns the full path of the currently open file Returns the full path of the currently open file or an empty string if no file is yet open.
 ~AlienCargoHold ()
 Destructor.

Detailed Description

Main class containing everything needed to load and read from a Cargo Hold Packed file.

This class will handle opening, parsing and closing the CargoHold file. It provides a pointer to the root directory only for printing and debugging purposes and it should not be used for manual manipulation of the file structure.

Note: Libraries that wish to use files from this object need to support all of their file handling operations assuming that all they have is a pointer to the file object that has already been setup for reading from the specified file

Definition at line 23 of file CAlienCargoHold.h.


Constructor & Destructor Documentation

AlienCargoHold::AlienCargoHold ( string  filename)

Constructor.

Parameters:
filenamethe name/location of the CargoHold file

Definition at line 5 of file CAlienCargoHold.cpp.

AlienCargoHold::~AlienCargoHold ( )

Destructor.

Definition at line 44 of file CAlienCargoHold.cpp.


Member Function Documentation

string AlienCargoHold::getCurrentFile ( )

Returns the full path of the currently open file Returns the full path of the currently open file or an empty string if no file is yet open.

Returns:
path of open file

Definition at line 38 of file CAlienCargoHold.cpp.

ACHDirectory * AlienCargoHold::getRoot ( )

Retrieves a pointer to the root directory. Do not use this function to modify the file/directory structure.

Returns:
pointer to the root directory

Definition at line 23 of file CAlienCargoHold.cpp.

bool AlienCargoHold::isOpen ( )

Checks if the CargoHold file is open. This function can be used for error checking. If it returns false then the file could not be open.

Returns:
true if file open, false otherwise

Definition at line 18 of file CAlienCargoHold.cpp.

ifstream * AlienCargoHold::seekFile ( string  path)

Prepares the structure for reading of the specified file.

Parameters:
paththe path to the file
Returns:
a pointer to an ifstream object for reading or NULL if file was not found.

Definition at line 28 of file CAlienCargoHold.cpp.


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