| Irrlicht 3D Engine |

IReadFile.h
Go to the documentation of this file.

    00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
    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_READ_FILE_H_INCLUDED__
    00006 #define __I_READ_FILE_H_INCLUDED__
    00007
    00008 #include "IReferenceCounted.h"
    00009 #include "coreutil.h"
    00010
    00011 namespace irr
    00012 {
    00013 namespace io
    00014 {
    00015
    00017     class IReadFile : public virtual IReferenceCounted
    00018     {
    00019     public:
    00021
    00024         virtual s32 read(void* buffer, u32 sizeToRead) = 0;
    00025
    00027
    00032         virtual bool seek(long finalPos, bool relativeMovement = false) = 0;
    00033
    00035
    00036         virtual long getSize() const = 0;
    00037
    00039
    00040         virtual long getPos() const = 0;
    00041
    00043
    00044         virtual const io::path& getFileName() const = 0;
    00045     };
    00046
    00048     IReadFile* createReadFile(const io::path& fileName);
    00050     IReadFile* createLimitReadFile(const io::path& fileName, IReadFile* alreadyOpenedFile, long pos, long areaSize);
    00052     IReadFile* createMemoryReadFile(void* memory, long size, const io::path& fileName, bool deleteMemoryWhenDropped);
    00053
    00054 } // end namespace io
    00055 } // end namespace irr
    00056
    00057 #endif
    00058