Nirtcpp 2.1.0
Nirtcpp is a high-performance c++ graphics engine.
Loading...
Searching...
No Matches
nirt::io::IFileArchive Class Referenceabstract

The FileArchive manages archives and provides access to files inside them. More...

#include <nirtcpp/core/engine/IFileArchive.hpp>

Inheritance diagram for nirt::io::IFileArchive:
Inheritance graph
Collaboration diagram for nirt::io::IFileArchive:
Collaboration graph

Public Member Functions

virtual IReadFilecreateAndOpenFile (const path &filename)=0
 Opens a file based on its name.
 
virtual IReadFilecreateAndOpenFile (u32 index)=0
 Opens a file based on its position in the file list.
 
virtual const IFileListgetFileList () const =0
 Returns the complete file tree.
 
virtual E_FILE_ARCHIVE_TYPE getType () const
 get the archive type
 
virtual const io::pathgetArchiveName () const =0
 return the name (id) of the file Archive
 
- Public Member Functions inherited from nirt::IReferenceCounted
 IReferenceCounted ()
 Constructor.
 
virtual ~IReferenceCounted ()
 Destructor.
 
void grab () const
 Grabs the object. Increments the reference counter by one.
 
bool drop () const
 Drops the object. Decrements the reference counter by one.
 
s32 getReferenceCount () const
 Get the reference count.
 
const c8getDebugName () const
 Returns the debug name of the object.
 

Public Attributes

core::stringc Password
 An optionally used password string.
 

Additional Inherited Members

- Protected Member Functions inherited from nirt::IReferenceCounted
void setDebugName (const c8 *newName)
 Sets the debug name of the object.
 

Detailed Description

The FileArchive manages archives and provides access to files inside them.

Member Function Documentation

◆ createAndOpenFile() [1/2]

virtual IReadFile * nirt::io::IFileArchive::createAndOpenFile ( const path filename)
pure virtual

Opens a file based on its name.

Creates and returns a new IReadFile for a file in the archive.

Parameters
filenameThe file to open
Returns
Returns A pointer to the created file on success, or 0 on failure.

◆ createAndOpenFile() [2/2]

virtual IReadFile * nirt::io::IFileArchive::createAndOpenFile ( u32  index)
pure virtual

Opens a file based on its position in the file list.

Creates and returns

Parameters
indexThe zero based index of the file.
Returns
Returns a pointer to the created file on success, or 0 on failure.

◆ getFileList()

virtual const IFileList * nirt::io::IFileArchive::getFileList ( ) const
pure virtual

Returns the complete file tree.

Returns
Returns the complete directory tree for the archive, including all files and folders

Member Data Documentation

◆ Password

core::stringc nirt::io::IFileArchive::Password

An optionally used password string.

This variable is publicly accessible from the interface in order to avoid single access patterns to this place, and hence allow some more obscurity.


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

Nirtcpp    @cppfx.xyz

Utxcpp    utx::print