ezEngine  Milestone 7
ezFileWriterBase Class Reference

#include <FileReaderWriterBase.h>

Inheritance diagram for ezFileWriterBase:

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 ezStreamWriterBase
 ezStreamWriterBase ()
 Constructor.
 
virtual ~ezStreamWriterBase ()
 Virtual destructor to ensure correct cleanup.
 
virtual ezResult WriteBytes (const void *pWriteBuffer, ezUInt64 uiBytesToWrite)=0
 Writes a raw number of bytes from the buffer, this is the only method which has to be implemented to fully implement the interface.
 
virtual ezResult Flush ()
 Flushes the stream, may be implemented (not necessary to implement the interface correctly) so that user code can ensure that content is written.
 
template<typename T >
ezResult WriteWordValue (const T *pWordValue)
 Helper method to write a word value correctly (copes with potentially different endianess)
 
template<typename T >
ezResult WriteDWordValue (const T *pDWordValue)
 Helper method to write a dword value correctly (copes with potentially different endianess)
 
template<typename T >
ezResult WriteQWordValue (const T *pQWordValue)
 Helper method to write a qword value correctly (copes with potentially different endianess)
 

Protected Member Functions

ezDataDirectoryWriterGetFileWriter (const char *szFile, bool bAllowFileEvents)
 

Protected Attributes

ezDataDirectoryWriterm_pDataDirWriter
 

Private Member Functions

 EZ_DISALLOW_COPY_AND_ASSIGN (ezFileWriterBase)
 

Detailed Description

The base class for all file writers. Provides access to ezFileSystem::GetFileWriter, 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 write files. E.g. the default writer (ezFileWriter) implements a buffered write policy (using an internal cache).


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