Loading...
Searching...
No Matches
IFileArchive.h
Go to the documentation of this file.
// Copyright (C) 2002-2012 Nikolaus Gebhardt/ Thomas Alten
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h
#ifndef __I_FILE_ARCHIVE_H_INCLUDED__
#define __I_FILE_ARCHIVE_H_INCLUDED__
#include "IReadFile.h"
#include "IFileList.h"
namespace irr
{
namespace io
{
enum EFileSystemType
{
FILESYSTEM_NATIVE = 0, // Native OS FileSystem
FILESYSTEM_VIRTUAL // Virtual FileSystem
};
enum E_FILE_ARCHIVE_TYPE
{
EFAT_ZIP = MAKE_IRR_ID('Z','I','P', 0),
EFAT_GZIP = MAKE_IRR_ID('g','z','i','p'),
EFAT_FOLDER = MAKE_IRR_ID('f','l','d','r'),
EFAT_PAK = MAKE_IRR_ID('P','A','K', 0),
EFAT_NPK = MAKE_IRR_ID('N','P','K', 0),
EFAT_TAR = MAKE_IRR_ID('T','A','R', 0),
EFAT_WAD = MAKE_IRR_ID('W','A','D', 0),
EFAT_UNKNOWN = MAKE_IRR_ID('u','n','k','n')
};
class IFileArchive : public virtual IReferenceCounted
{
public:
virtual IReadFile* createAndOpenFile(const path& filename) =0;
virtual IReadFile* createAndOpenFile(u32 index) =0;
virtual const IFileList* getFileList() const =0;
virtual E_FILE_ARCHIVE_TYPE getType() const { return EFAT_UNKNOWN; }
core::stringc Password;
};
class IArchiveLoader : public virtual IReferenceCounted
{
public:
virtual bool isALoadableFileFormat(const path& filename) const =0;
virtual bool isALoadableFileFormat(io::IReadFile* file) const =0;
virtual bool isALoadableFileFormat(E_FILE_ARCHIVE_TYPE fileType) const =0;
virtual IFileArchive* createArchive(const path& filename, bool ignoreCase, bool ignorePaths) const =0;
virtual IFileArchive* createArchive(io::IReadFile* file, bool ignoreCase, bool ignorePaths) const =0;
};
} // end namespace io
} // end namespace irr
#endif
IFileList.h
IReadFile.h
irr::IReferenceCounted::IReferenceCounted
IReferenceCounted()
Constructor.
Definition IReferenceCounted.h:46
irr::io::IArchiveLoader
Class which is able to create an archive from a file.
Definition IFileArchive.h:92
irr::io::IArchiveLoader::createArchive
virtual IFileArchive * createArchive(const path &filename, bool ignoreCase, bool ignorePaths) const =0
Creates an archive from the filename.
irr::io::IArchiveLoader::createArchive
virtual IFileArchive * createArchive(io::IReadFile *file, bool ignoreCase, bool ignorePaths) const =0
Creates an archive from the file.
irr::io::IArchiveLoader::isALoadableFileFormat
virtual bool isALoadableFileFormat(const path &filename) const =0
Check if the file might be loaded by this class.
irr::io::IArchiveLoader::isALoadableFileFormat
virtual bool isALoadableFileFormat(io::IReadFile *file) const =0
Check if the file might be loaded by this class.
irr::io::IArchiveLoader::isALoadableFileFormat
virtual bool isALoadableFileFormat(E_FILE_ARCHIVE_TYPE fileType) const =0
Check to see if the loader can create archives of this type.
irr::io::IFileArchive
The FileArchive manages archives and provides access to files inside them.
Definition IFileArchive.h:54
irr::io::IFileArchive::createAndOpenFile
virtual IReadFile * createAndOpenFile(u32 index)=0
Opens a file based on its position in the file list.
irr::io::IFileArchive::createAndOpenFile
virtual IReadFile * createAndOpenFile(const path &filename)=0
Opens a file based on its name.
irr::io::IFileArchive::getFileList
virtual const IFileList * getFileList() const =0
Returns the complete file tree.
irr::io::IFileArchive::Password
core::stringc Password
An optionally used password string.
Definition IFileArchive.h:83
irr::io::IFileArchive::getType
virtual E_FILE_ARCHIVE_TYPE getType() const
get the archive type
Definition IFileArchive.h:76
irr::io::IFileList
Provides a list of files and folders.
Definition IFileList.h:20
irr::io::IReadFile
Interface providing read acess to a file.
Definition IReadFile.h:18
MAKE_IRR_ID
#define MAKE_IRR_ID(c0, c1, c2, c3)
ignore VC8 warning deprecated
Definition irrTypes.h:241
irr::core::stringc
string< c8 > stringc
Typedef for character strings.
Definition irrString.h:1358
irr::io
This namespace provides interfaces for input/output: Reading and writing files, accessing zip archive...
Definition EAttributes.h:11
irr::io::EFileSystemType
EFileSystemType
FileSystemType: which Filesystem should be used for e.g. browsing.
Definition IFileArchive.h:19
irr::io::FILESYSTEM_VIRTUAL
@ FILESYSTEM_VIRTUAL
Definition IFileArchive.h:21
irr::io::FILESYSTEM_NATIVE
@ FILESYSTEM_NATIVE
Definition IFileArchive.h:20
irr::io::path
core::string< fschar_t > path
Type used for all file system related strings.
Definition path.h:17
irr::io::E_FILE_ARCHIVE_TYPE
E_FILE_ARCHIVE_TYPE
Contains the different types of archives.
Definition IFileArchive.h:26
irr::io::EFAT_TAR
@ EFAT_TAR
A Tape ARchive.
Definition IFileArchive.h:43
irr::io::EFAT_FOLDER
@ EFAT_FOLDER
A virtual directory.
Definition IFileArchive.h:34
irr::io::EFAT_UNKNOWN
@ EFAT_UNKNOWN
The type of this archive is unknown.
Definition IFileArchive.h:49
irr::io::EFAT_WAD
@ EFAT_WAD
A wad Archive, Quake2, Halflife.
Definition IFileArchive.h:46
irr::io::EFAT_ZIP
@ EFAT_ZIP
A PKZIP archive.
Definition IFileArchive.h:28
irr::io::EFAT_GZIP
@ EFAT_GZIP
A gzip archive.
Definition IFileArchive.h:31
irr::io::EFAT_PAK
@ EFAT_PAK
An ID Software PAK archive.
Definition IFileArchive.h:37
irr::io::EFAT_NPK
@ EFAT_NPK
A Nebula Device archive.
Definition IFileArchive.h:40
irr
Everything in the Irrlicht Engine can be found in this namespace.
Definition aabbox3d.h:13
irr::u32
unsigned int u32
32 bit unsigned variable.
Definition irrTypes.h:58
- Irrlicht Engine Documentation © 2003-2012 by Nikolaus Gebhardt. Generated on for Irrlicht 3D Engine by Doxygen 1.15.0