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

#include <ArchiveFileSystem.h>

Inherits SubsystemInterface.

Inherited by Win32BIGFileSystem.

Public Member Functions

 ArchiveFileSystem ()
 
virtual ~ArchiveFileSystem ()
 
virtual void init (void)=0
 
virtual void update (void)=0
 
virtual void reset (void)=0
 
virtual void postProcessLoad (void)=0
 
virtual ArchiveFileopenArchiveFile (const Char *filename)=0
 Create new or return existing Archive file from file name.
 
virtual void closeArchiveFile (const Char *filename)=0
 Close the one specified big file.
 
virtual void closeAllArchiveFiles (void)=0
 Close all Archivefiles currently open.
 
virtual FileopenFile (const Char *filename, Int access=0)
 Search Archive files for specified file name and open it if found.
 
virtual void closeAllFiles (void)=0
 Close all files associated with ArchiveFiles.
 
virtual Bool doesFileExist (const Char *filename) const
 return true if that file exists in an archive file somewhere.
 
void getFileListInDirectory (const AsciiString &currentDirectory, const AsciiString &originalDirectory, const AsciiString &searchName, FilenameList &filenameList, Bool searchSubdirectories) const
 search the given directory for files matching the searchName (egs. *.ini, *.rep). Possibly search subdirectories. Scans each Archive file.
 
Bool getFileInfo (const AsciiString &filename, FileInfo *fileInfo) const
 see FileSystem.h
 
virtual Bool loadBigFilesFromDirectory (AsciiString dir, AsciiString fileMask, Bool overwrite=FALSE)=0
 
AsciiString getArchiveFilenameForFile (const AsciiString &filename) const
 
void loadMods (void)
 
- Public Member Functions inherited from SubsystemInterface
 SubsystemInterface ()
 
virtual ~SubsystemInterface ()
 
virtual void draw (void)
 
void UPDATE (void)
 
void DRAW (void)
 
AsciiString getName (void)
 
void setName (AsciiString name)
 

Protected Member Functions

virtual void loadIntoDirectoryTree (const ArchiveFile *archiveFile, const AsciiString &archiveFilename, Bool overwrite=FALSE)
 load the archive file's header information and apply it to the global archive directory tree.
 

Protected Attributes

ArchiveFileMap m_archiveFileMap
 
ArchivedDirectoryInfo m_rootDirectory
 
- Protected Attributes inherited from SubsystemInterface
AsciiString m_name
 

Detailed Description

Definition at line 147 of file ArchiveFileSystem.h.

Constructor & Destructor Documentation

◆ ArchiveFileSystem()

ArchiveFileSystem::ArchiveFileSystem ( )

Definition at line 109 of file ArchiveFileSystem.cpp.

◆ ~ArchiveFileSystem()

ArchiveFileSystem::~ArchiveFileSystem ( )
virtual

Definition at line 113 of file ArchiveFileSystem.cpp.

Member Function Documentation

◆ closeAllArchiveFiles()

virtual void ArchiveFileSystem::closeAllArchiveFiles ( void )
pure virtual

Close all Archivefiles currently open.

Implemented in Win32BIGFileSystem.

◆ closeAllFiles()

virtual void ArchiveFileSystem::closeAllFiles ( void )
pure virtual

Close all files associated with ArchiveFiles.

Implemented in Win32BIGFileSystem.

◆ closeArchiveFile()

virtual void ArchiveFileSystem::closeArchiveFile ( const Char * filename)
pure virtual

Close the one specified big file.

Implemented in Win32BIGFileSystem.

◆ doesFileExist()

Bool ArchiveFileSystem::doesFileExist ( const Char * filename) const
virtual

return true if that file exists in an archive file somewhere.

Definition at line 201 of file ArchiveFileSystem.cpp.

◆ getArchiveFilenameForFile()

AsciiString ArchiveFileSystem::getArchiveFilenameForFile ( const AsciiString & filename) const

Definition at line 267 of file ArchiveFileSystem.cpp.

◆ getFileInfo()

Bool ArchiveFileSystem::getFileInfo ( const AsciiString & filename,
FileInfo * fileInfo ) const

see FileSystem.h

Definition at line 245 of file ArchiveFileSystem.cpp.

◆ getFileListInDirectory()

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

search the given directory for files matching the searchName (egs. *.ini, *.rep). Possibly search subdirectories. Scans each Archive file.

Definition at line 320 of file ArchiveFileSystem.cpp.

◆ init()

virtual void ArchiveFileSystem::init ( void )
pure virtual
  • Assign any default values to data required for the class
    • Allocate any memory and resources needed throughout the lifetime of the class

Implements SubsystemInterface.

Implemented in Win32BIGFileSystem.

◆ loadBigFilesFromDirectory()

virtual Bool ArchiveFileSystem::loadBigFilesFromDirectory ( AsciiString dir,
AsciiString fileMask,
Bool overwrite = FALSE )
pure virtual

Implemented in Win32BIGFileSystem.

◆ loadIntoDirectoryTree()

void ArchiveFileSystem::loadIntoDirectoryTree ( const ArchiveFile * archiveFile,
const AsciiString & archiveFilename,
Bool overwrite = FALSE )
protectedvirtual

load the archive file's header information and apply it to the global archive directory tree.

Definition at line 126 of file ArchiveFileSystem.cpp.

◆ loadMods()

void ArchiveFileSystem::loadMods ( void )

Definition at line 174 of file ArchiveFileSystem.cpp.

◆ openArchiveFile()

virtual ArchiveFile * ArchiveFileSystem::openArchiveFile ( const Char * filename)
pure virtual

Create new or return existing Archive file from file name.

Implemented in Win32BIGFileSystem.

◆ openFile()

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

Search Archive files for specified file name and open it if found.

Definition at line 233 of file ArchiveFileSystem.cpp.

◆ postProcessLoad()

virtual void ArchiveFileSystem::postProcessLoad ( void )
pure virtual
  • Called for all subsystems after all other Subsystems are inited. (allows for initializing inter-system dependencies)

Reimplemented from SubsystemInterface.

Implemented in Win32BIGFileSystem.

◆ reset()

virtual void ArchiveFileSystem::reset ( void )
pure virtual
  • Any system should be able to reset all data and go back to an empty state that is ready to accept a completely new set of data. Reset() can expect to be used in the context of resetting the engine in order to start or load a new game.
    • Do NOT free and re-allocate resources needed, where possible reorganize and re-initialize the resources already allocated.
    • After a reset, the system does not need to be in EXACTLY the same state as a fresh instantiation. If there are persistent state information for the system make sure you maintain it while restoring or re-initializing other transient parts.

Implements SubsystemInterface.

Implemented in Win32BIGFileSystem.

◆ update()

virtual void ArchiveFileSystem::update ( void )
pure virtual
  • Update methods are the place to do system per frame processing. You should call the system update once each time through the game loop to service the system.
    • Note that currently the GameClient and GameLogic will be updating at different rates where the logic is running real time, and the client will adjust how many loops can be done during one server time slice in order to improve performance on low end machines.

Implements SubsystemInterface.

Implemented in Win32BIGFileSystem.

Member Data Documentation

◆ m_archiveFileMap

ArchiveFileMap ArchiveFileSystem::m_archiveFileMap
protected

Definition at line 180 of file ArchiveFileSystem.h.

◆ m_rootDirectory

ArchivedDirectoryInfo ArchiveFileSystem::m_rootDirectory
protected

Definition at line 181 of file ArchiveFileSystem.h.


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