My Project
Public Member Functions | List of all members
ParaEngine::IReadFile Class Referenceabstract

Interface for read access to a file. More...

#include <IFile.h>

Inheritance diagram for ParaEngine::IReadFile:
ParaEngine::CMemReadFile ParaEngine::CReadFile

Public Member Functions

virtual DWORD read (void *buffer, DWORD sizeToRead)=0
 Reads an amount of bytes from the file. More...
 
virtual bool seek (DWORD finalPos, bool relativeMovement=false)=0
 Changes position in file, returns true if successful. More...
 
virtual DWORD getSize ()=0
 Returns size of file. More...
 
virtual bool isOpen ()=0
 returns if file is open
 
virtual DWORD getPos ()=0
 Returns the current position in the file. More...
 
virtual const char * getFileName ()=0
 Returns name of file. More...
 
virtual void Release ()
 delete this
 

Detailed Description

Interface for read access to a file.

Member Function Documentation

§ getFileName()

virtual const char* ParaEngine::IReadFile::getFileName ( )
pure virtual

Returns name of file.

Returns
Returns the file name as zero terminated character string.

Implemented in ParaEngine::CMemReadFile, and ParaEngine::CReadFile.

§ getPos()

virtual DWORD ParaEngine::IReadFile::getPos ( )
pure virtual

Returns the current position in the file.

Returns
Returns the current position in the file in bytes.

Implemented in ParaEngine::CMemReadFile, and ParaEngine::CReadFile.

§ getSize()

virtual DWORD ParaEngine::IReadFile::getSize ( )
pure virtual

Returns size of file.

Returns
Returns the size of the file in bytes.

Implemented in ParaEngine::CMemReadFile, and ParaEngine::CReadFile.

§ read()

virtual DWORD ParaEngine::IReadFile::read ( void *  buffer,
DWORD  sizeToRead 
)
pure virtual

Reads an amount of bytes from the file.

Parameters
bufferPointer to buffer where to read bytes will be written to.
sizeToReadAmount of bytes to read from the file.
Returns
Returns how much bytes were read.

Implemented in ParaEngine::CMemReadFile, and ParaEngine::CReadFile.

§ seek()

virtual bool ParaEngine::IReadFile::seek ( DWORD  finalPos,
bool  relativeMovement = false 
)
pure virtual

Changes position in file, returns true if successful.

Parameters
finalPosDestination position in the file.
relativeMovementIf set to true, the position in the file is changed relative to current position. Otherwise the position is changed from begin of file.
Returns
Returns true if successful, otherwise false.

Implemented in ParaEngine::CMemReadFile, and ParaEngine::CReadFile.


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