ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

XARC Archive loader. More...

#include <archiveloader.h>

Collaboration diagram for Stark::ArchiveLoader:

List of all members.

Classes

class  LoadedArchive

Public Member Functions

 ~ArchiveLoader ()
bool load (const Common::String &archiveName)
 Load a Xarc archive, and add it to the managed archives list.
void unloadUnused ()
 Unload all the unused Xarc archives.
ArchiveReadStreamgetFile (const Common::String &fileName, const Common::String &archiveName)
 Retrieve a file from a specified archive.
template<class T >
T * useRoot (const Common::String &archiveName)
 Get the resource tree root for an archive, and increment the archive use count.
bool returnRoot (const Common::String &archiveName)
 Decrement the root's archive use count.
Common::String buildArchiveName (Resources::Level *level, Resources::Location *location=nullptr) const
 Build the archive filename for a level or a location.
Common::SeekableReadStreamgetExternalFile (const Common::String &fileName, const Common::String &archiveName) const
 Retrieve a file relative to a specified archive.
Common::String getExternalFilePath (const Common::String &fileName, const Common::String &archiveName) const

Private Types

typedef Common::List
< LoadedArchive * > 
LoadedArchiveList

Private Member Functions

bool hasArchive (const Common::String &archiveName) const
LoadedArchivefindArchive (const Common::String &archiveName) const

Private Attributes

LoadedArchiveList _archives

Detailed Description

XARC Archive loader.

Maintains a list of opened archive files. Loads the resources from the XRC tree.

Definition at line 65 of file archiveloader.h.


Member Typedef Documentation

Definition at line 116 of file archiveloader.h.


Constructor & Destructor Documentation

Stark::ArchiveLoader::~ArchiveLoader (  ) 

Definition at line 52 of file archiveloader.cpp.


Member Function Documentation

Common::String Stark::ArchiveLoader::buildArchiveName ( Resources::Level level,
Resources::Location location = nullptr 
) const

Build the archive filename for a level or a location.

Definition at line 121 of file archiveloader.cpp.

ArchiveLoader::LoadedArchive * Stark::ArchiveLoader::findArchive ( const Common::String archiveName  )  const [private]

Definition at line 111 of file archiveloader.cpp.

Common::SeekableReadStream * Stark::ArchiveLoader::getExternalFile ( const Common::String fileName,
const Common::String archiveName 
) const

Retrieve a file relative to a specified archive.

Definition at line 155 of file archiveloader.cpp.

Common::String Stark::ArchiveLoader::getExternalFilePath ( const Common::String fileName,
const Common::String archiveName 
) const

Definition at line 142 of file archiveloader.cpp.

ArchiveReadStream * Stark::ArchiveLoader::getFile ( const Common::String fileName,
const Common::String archiveName 
)

Retrieve a file from a specified archive.

Definition at line 82 of file archiveloader.cpp.

bool Stark::ArchiveLoader::hasArchive ( const Common::String archiveName  )  const [private]

Definition at line 101 of file archiveloader.cpp.

bool Stark::ArchiveLoader::load ( const Common::String archiveName  ) 

Load a Xarc archive, and add it to the managed archives list.

Definition at line 58 of file archiveloader.cpp.

bool Stark::ArchiveLoader::returnRoot ( const Common::String archiveName  ) 

Decrement the root's archive use count.

Definition at line 94 of file archiveloader.cpp.

void Stark::ArchiveLoader::unloadUnused (  ) 

Unload all the unused Xarc archives.

Definition at line 72 of file archiveloader.cpp.

template<class T >
T * Stark::ArchiveLoader::useRoot ( const Common::String archiveName  ) 

Get the resource tree root for an archive, and increment the archive use count.

Definition at line 125 of file archiveloader.h.


Member Data Documentation


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


Generated on Sat Jun 22 2019 05:04:18 for ResidualVM by doxygen 1.7.1
curved edge   curved edge