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-2010 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_NPK     = MAKE_IRR_ID('N','P','K', 0),
    00041
    00043         EFAT_TAR     = MAKE_IRR_ID('T','A','R', 0),
    00044
    00046         EFAT_UNKNOWN = MAKE_IRR_ID('u','n','k','n')
    00047 };
    00048
    00050 class IFileArchive : public virtual IReferenceCounted
    00051 {
    00052 public:
    00053
    00055
    00059         virtual IReadFile* createAndOpenFile(const path& filename) =0;
    00060
    00062
    00065         virtual IReadFile* createAndOpenFile(u32 index) =0;
    00066
    00068
    00070         virtual const IFileList* getFileList() const =0;
    00071
    00073         virtual E_FILE_ARCHIVE_TYPE getType() const { return EFAT_UNKNOWN; }
    00074
    00076
    00080         core::stringc Password;
    00081 };
    00082
    00084
    00088 class IArchiveLoader : public virtual IReferenceCounted
    00089 {
    00090 public:
    00092
    00095         virtual bool isALoadableFileFormat(const path& filename) const =0;
    00096
    00098
    00101         virtual bool isALoadableFileFormat(io::IReadFile* file) const =0;
    00102
    00104
    00107         virtual bool isALoadableFileFormat(E_FILE_ARCHIVE_TYPE fileType) const =0;
    00108
    00110
    00114         virtual IFileArchive* createArchive(const path& filename, bool ignoreCase, bool ignorePaths) const =0;
    00115
    00117
    00121         virtual IFileArchive* createArchive(io::IReadFile* file, bool ignoreCase, bool ignorePaths) const =0;
    00122 };
    00123
    00124
    00125 } // end namespace io
    00126 } // end namespace irr
    00127
    00128 #endif
    00129

| The Irrlicht Engine Documentation © 2003-2010 by Nikolaus Gebhardt. Generated on Sun Oct 24 12:41:56 2010 by Doxygen (1.6.2)