Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members | Tutorials

IFileArchive.h

Go to the documentation of this file.
00001 // Copyright (C) 2002-2009 Nikolaus Gebhardt/ Thomas Alten
00002 // This file is part of the "Irrlicht Engine".
00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
00004 
00005 #ifndef __I_FILE_ARCHIVE_H_INCLUDED__
00006 #define __I_FILE_ARCHIVE_H_INCLUDED__
00007 
00008 #include "IReadFile.h"
00009 #include "IFileList.h"
00010 
00011 namespace irr
00012 {
00013 
00014 namespace io
00015 {
00016 
00018 enum EFileSystemType
00019 {
00020         FILESYSTEM_NATIVE = 0,  // Native OS FileSystem
00021         FILESYSTEM_VIRTUAL,     // Virtual FileSystem
00022 };
00023 
00025 enum E_FILE_ARCHIVE_TYPE
00026 {
00028         EFAT_ZIP     = MAKE_IRR_ID('Z','I','P', 0),
00029 
00031         EFAT_GZIP    = MAKE_IRR_ID('g','z','i','p'),
00032 
00034         EFAT_FOLDER  = MAKE_IRR_ID('f','l','d','r'),
00035 
00037         EFAT_PAK     = MAKE_IRR_ID('P','A','K', 0),
00038 
00040         EFAT_TAR     = MAKE_IRR_ID('T','A','R', 0),
00041 
00043         EFAT_UNKNOWN = MAKE_IRR_ID('u','n','k','n')
00044 };
00045 
00047 class IFileArchive : public virtual IReferenceCounted
00048 {
00049 public:
00050 
00052 
00056         virtual IReadFile* createAndOpenFile(const path& filename) =0;
00057 
00059 
00062         virtual IReadFile* createAndOpenFile(u32 index) =0;
00063 
00065 
00067         virtual const IFileList* getFileList() const =0;
00068 
00070         virtual E_FILE_ARCHIVE_TYPE getType() const { return EFAT_UNKNOWN; }
00071 };
00072 
00074 
00078 class IArchiveLoader : public virtual IReferenceCounted
00079 {
00080 public:
00082 
00085         virtual bool isALoadableFileFormat(const path& filename) const =0;
00086 
00088 
00091         virtual bool isALoadableFileFormat(io::IReadFile* file) const =0;
00092 
00094 
00097         virtual bool isALoadableFileFormat(E_FILE_ARCHIVE_TYPE fileType) const =0;
00098 
00100 
00104         virtual IFileArchive* createArchive(const path& filename, bool ignoreCase, bool ignorePaths) const =0;
00105 
00107 
00111         virtual IFileArchive* createArchive(io::IReadFile* file, bool ignoreCase, bool ignorePaths) const =0;
00112 };
00113 
00114 
00115 } // end namespace io
00116 } // end namespace irr
00117 
00118 #endif
00119 

The Irrlicht Engine
The Irrlicht Engine Documentation © 2003-2009 by Nikolaus Gebhardt. Generated on Sun Jan 10 09:24:03 2010 by Doxygen (1.5.6)