Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
ArchiveFile Class Referenceabstract

#include <ArchiveFile.h>

Inherited by Win32BIGFile.

Public Member Functions

 ArchiveFile ()
 
virtual ~ArchiveFile ()
 
virtual Bool getFileInfo (const AsciiString &filename, FileInfo *fileInfo) const =0
 fill in the fileInfo struct with info about the file requested.
 
virtual FileopenFile (const Char *filename, Int access=0)=0
 Open the specified file within the archive file.
 
virtual void closeAllFiles (void)=0
 Close all file opened in this archive file.
 
virtual AsciiString getName (void)=0
 Returns the name of the archive file.
 
virtual AsciiString getPath (void)=0
 Returns full path and name of archive file.
 
virtual void setSearchPriority (Int new_priority)=0
 Set this archive file's search priority.
 
virtual void close (void)=0
 Close this archive file.
 
void attachFile (File *file)
 
void getFileListInDirectory (const AsciiString &currentDirectory, const AsciiString &originalDirectory, const AsciiString &searchName, FilenameList &filenameList, Bool searchSubdirectories) const
 
void getFileListInDirectory (const DetailedArchivedDirectoryInfo *dirInfo, const AsciiString &currentDirectory, const AsciiString &searchName, FilenameList &filenameList, Bool searchSubdirectories) const
 
void addFile (const AsciiString &path, const ArchivedFileInfo *fileInfo)
 add this file to our directory tree.
 

Protected Member Functions

const ArchivedFileInfogetArchivedFileInfo (const AsciiString &filename) const
 return the ArchivedFileInfo from the directory tree.
 

Protected Attributes

Filem_file
 file pointer to the archive file on disk. Kept open so we don't have to continuously open and close the file all the time.
 
DetailedArchivedDirectoryInfo m_rootDirectory
 

Detailed Description

An archive file is itself a collection of sub files. Each file inside the archive file has a unique name by which it can be accessed. The ArchiveFile object class is the runtime interface to the mix file and the sub files. Each file inside the mix file can be accessed by the openFile().

ArchiveFile interfaces can be created by the TheArchiveFileSystem object.

Definition at line 50 of file ArchiveFile.h.

Constructor & Destructor Documentation

◆ ArchiveFile()

ArchiveFile::ArchiveFile ( )

Definition at line 92 of file ArchiveFile.cpp.

◆ ~ArchiveFile()

ArchiveFile::~ArchiveFile ( )
virtual

Definition at line 84 of file ArchiveFile.cpp.

Member Function Documentation

◆ addFile()

void ArchiveFile::addFile ( const AsciiString & path,
const ArchivedFileInfo * fileInfo )

add this file to our directory tree.

Definition at line 97 of file ArchiveFile.cpp.

◆ attachFile()

void ArchiveFile::attachFile ( File * file)

Definition at line 190 of file ArchiveFile.cpp.

◆ close()

virtual void ArchiveFile::close ( void )
pure virtual

Close this archive file.

Implemented in Win32BIGFile.

◆ closeAllFiles()

virtual void ArchiveFile::closeAllFiles ( void )
pure virtual

Close all file opened in this archive file.

Implemented in Win32BIGFile.

◆ getArchivedFileInfo()

const ArchivedFileInfo * ArchiveFile::getArchivedFileInfo ( const AsciiString & filename) const
protected

return the ArchivedFileInfo from the directory tree.

Definition at line 199 of file ArchiveFile.cpp.

◆ getFileInfo()

virtual Bool ArchiveFile::getFileInfo ( const AsciiString & filename,
FileInfo * fileInfo ) const
pure virtual

fill in the fileInfo struct with info about the file requested.

Implemented in Win32BIGFile.

◆ getFileListInDirectory() [1/2]

void ArchiveFile::getFileListInDirectory ( const AsciiString & currentDirectory,
const AsciiString & originalDirectory,
const AsciiString & searchName,
FilenameList & filenameList,
Bool searchSubdirectories ) const

Definition at line 126 of file ArchiveFile.cpp.

◆ getFileListInDirectory() [2/2]

void ArchiveFile::getFileListInDirectory ( const DetailedArchivedDirectoryInfo * dirInfo,
const AsciiString & currentDirectory,
const AsciiString & searchName,
FilenameList & filenameList,
Bool searchSubdirectories ) const

Definition at line 157 of file ArchiveFile.cpp.

◆ getName()

virtual AsciiString ArchiveFile::getName ( void )
pure virtual

Returns the name of the archive file.

Implemented in Win32BIGFile.

◆ getPath()

virtual AsciiString ArchiveFile::getPath ( void )
pure virtual

Returns full path and name of archive file.

Implemented in Win32BIGFile.

◆ openFile()

virtual File * ArchiveFile::openFile ( const Char * filename,
Int access = 0 )
pure virtual

Open the specified file within the archive file.

Implemented in Win32BIGFile.

◆ setSearchPriority()

virtual void ArchiveFile::setSearchPriority ( Int new_priority)
pure virtual

Set this archive file's search priority.

Implemented in Win32BIGFile.

Member Data Documentation

◆ m_file

File* ArchiveFile::m_file
protected

file pointer to the archive file on disk. Kept open so we don't have to continuously open and close the file all the time.

Definition at line 73 of file ArchiveFile.h.

◆ m_rootDirectory

DetailedArchivedDirectoryInfo ArchiveFile::m_rootDirectory
protected

Definition at line 74 of file ArchiveFile.h.


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