ezEngine  Milestone 7
ezFileReaderBase Class Reference

#include <FileReaderWriterBase.h>

Inheritance diagram for ezFileReaderBase:

Public Member Functions

ezString128 GetFilePathAbsolute () const
 Returns the absolute path with which the file was opened (including the prefix of the data directory).
ezString128 GetFilePathRelative () const
 Returns the relative path of the file within its data directory (excluding the prefix of the data directory).
ezDataDirectoryTypeGetDataDirectory () const
 Returns the ezDataDirectoryType over which this file has been opened.
bool IsOpen () const
 Returns true, if the file is currently open.
ezUInt64 GetFileSize () const
 Returns the current total size of the file.
- Public Member Functions inherited from ezStreamReaderBase
 ezStreamReaderBase ()
virtual ~ezStreamReaderBase ()
 Virtual destructor to ensure correct cleanup.
virtual ezUInt64 ReadBytes (void *pReadBuffer, ezUInt64 uiBytesToRead)=0
 Reads a raw number of bytes into the read buffer, this is the only method which has to be implemented to fully implement the interface.
template<typename T >
ezResult ReadWordValue (T *pWordValue)
 Helper method to read a word value correctly (copes with potentially different endianess)
template<typename T >
ezResult ReadDWordValue (T *pDWordValue)
 Helper method to read a dword value correctly (copes with potentially different endianess)
template<typename T >
ezResult ReadQWordValue (T *pQWordValue)
 Helper method to read a qword value correctly (copes with potentially different endianess)
virtual ezUInt64 SkipBytes (ezUInt64 uiBytesToSkip)
 Helper method to skip a number of bytes (implementations of the stream reader may implement this more efficiently for example)

Protected Member Functions

ezDataDirectoryReaderGetFileReader (const char *szFile, bool bAllowFileEvents)

Protected Attributes


Private Member Functions


Detailed Description

The base class for all file readers. Provides access to ezFileSystem::GetFileReader, which is necessary to get access to the streams that ezDataDirectoryType's provide. Derive from this class if you want to implement different policies on how to read files. E.g. the default reader (ezFileReader) implements a buffered read policy (using an internal cache).

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