Plasma Engine  2.0
Loading...
Searching...
No Matches
plDataDirectoryReader Class Referenceabstract

A base class for readers that handle reading from a (virtual) file inside a data directory. More...

#include <DataDirType.h>

Inheritance diagram for plDataDirectoryReader:

Public Member Functions

 plDataDirectoryReader (plInt32 iDataDirUserData)
 
virtual plUInt64 Read (void *pBuffer, plUInt64 uiBytes)=0
 
virtual plUInt64 Skip (plUInt64 uiBytes)
 Helper method to skip a number of bytes (implementations of the directory reader may implement this more efficiently for example)
 
- Public Member Functions inherited from plDataDirectoryReaderWriterBase
 plDataDirectoryReaderWriterBase (plInt32 iDataDirUserData, bool bIsReader)
 The derived class should pass along whether it is a reader or writer.
 
plResult Open (plStringView sFile, plDataDirectoryType *pOwnerDataDirectory, plFileShareMode::Enum fileShareMode)
 Used by plDataDirectoryType's to try to open the given file. They need to pass along their own pointer.
 
void Close ()
 Closes this data stream.
 
const plString128GetFilePath () const
 Returns the relative path of this file within the owner data directory.
 
plDataDirectoryTypeGetDataDirectory () const
 Returns the pointer to the data directory, which created this reader/writer.
 
bool IsReader () const
 Returns true if this is a reader stream, false if it is a writer stream.
 
virtual plUInt64 GetFileSize () const =0
 Returns the current total size of the file.
 
plInt32 GetDataDirUserData () const
 

Additional Inherited Members

- Protected Member Functions inherited from plDataDirectoryReaderWriterBase
virtual plResult InternalOpen (plFileShareMode::Enum FileShareMode)=0
 This function must be implemented by the derived class.
 
virtual void InternalClose ()=0
 This function must be implemented by the derived class.
 
- Protected Attributes inherited from plDataDirectoryReaderWriterBase
bool m_bIsReader
 
plInt32 m_iDataDirUserData = 0
 
plDataDirectoryTypem_pDataDirType
 
plString128 m_sFilePath
 

Detailed Description

A base class for readers that handle reading from a (virtual) file inside a data directory.

Different data directory types (ZIP file, simple folder, etc.) use different reader/writer types.

Member Function Documentation

◆ Skip()

virtual plUInt64 plDataDirectoryReader::Skip ( plUInt64 uiBytes)
inlinevirtual

Helper method to skip a number of bytes (implementations of the directory reader may implement this more efficiently for example)

Reimplemented in plDataDirectory::ArchiveReaderUncompressed, and plDataDirectory::FolderReader.


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