![]() |
Plasma Engine
2.0
|
This is the base class for all data directory readers/writers. More...
#include <DataDirType.h>
Public Member Functions | |
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 plString128 & | GetFilePath () const |
Returns the relative path of this file within the owner data directory. | |
plDataDirectoryType * | GetDataDirectory () 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 |
Protected Member Functions | |
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 | |
bool | m_bIsReader |
plInt32 | m_iDataDirUserData = 0 |
plDataDirectoryType * | m_pDataDirType |
plString128 | m_sFilePath |
This is the base class for all data directory readers/writers.
Different data directory types (ZIP file, simple folder, etc.) use different reader/writer types.
|
pure virtual |
Returns the current total size of the file.
Implemented in plDataDirectory::ArchiveReaderCommon, plDataDirectory::FolderReader, and plDataDirectory::FolderWriter.
|
protectedpure virtual |
This function must be implemented by the derived class.
Implemented in plDataDirectory::ArchiveReaderUncompressed, plDataDirectory::FileserveDataDirectoryWriter, plDataDirectory::FolderReader, and plDataDirectory::FolderWriter.
|
protectedpure virtual |
This function must be implemented by the derived class.
Implemented in plDataDirectory::ArchiveReaderUncompressed, plDataDirectory::FileserveDataDirectoryReader, plDataDirectory::FolderReader, and plDataDirectory::FolderWriter.