#include <bzsbuf.h>
Inherits BazisLib::BasicFileBase, and BazisLib::CBuffer.
Public Member Functions | |
ACMemoryFile (size_t InitialSize) | |
bool | SetData (const void *pData, size_t size) |
virtual bool | Valid () override |
virtual void | Close () override |
virtual size_t | Read (void *pBuffer, size_t size, ActionStatus *pStatus=NULL, bool IncompleteReadSupported=false) override |
Reads data from the file (or stream). | |
virtual size_t | Write (const void *pBuffer, size_t size, ActionStatus *pStatus=NULL) override |
virtual LONGLONG | GetSize (ActionStatus *pStatus=NULL) override |
virtual LONGLONG | Seek (LONGLONG Offset, FileFlags::SeekType seekType, ActionStatus *pStatus=NULL) override |
virtual LONGLONG | GetPosition (ActionStatus *pStatus=NULL) override |
Protected Attributes | |
size_t | m_Pointer |
BazisLib::ACMemoryFile::ACMemoryFile | ( | size_t | InitialSize | ) | [inline] |
virtual void BazisLib::ACMemoryFile::Close | ( | ) | [inline, override, virtual] |
virtual LONGLONG BazisLib::ACMemoryFile::GetPosition | ( | ActionStatus * | pStatus = NULL |
) | [inline, override, virtual] |
Reimplemented from BazisLib::BasicFileBase.
virtual LONGLONG BazisLib::ACMemoryFile::GetSize | ( | ActionStatus * | pStatus = NULL |
) | [inline, override, virtual] |
virtual size_t BazisLib::ACMemoryFile::Read | ( | void * | pBuffer, | |
size_t | size, | |||
ActionStatus * | pStatus = NULL , |
|||
bool | IncompleteReadSupported = false | |||
) | [inline, override, virtual] |
Reads data from the file (or stream).
IncompleteReadSupported | If this parameter is true, the Read() method can return a value different from the size parameter even when the EOF is not reached. For example, this can happen if a file is actually a network stream and some data is already in the buffer. However, if this parameter is false, the stream will wait till the end of connection, or till the requested amount of bytes will be received. Non-stream implementations can safely ignore this parameter and always wait for the end-of-file, or exactly the requested number of bytes. |
Reimplemented from BazisLib::BasicFileBase.
virtual LONGLONG BazisLib::ACMemoryFile::Seek | ( | LONGLONG | Offset, | |
FileFlags::SeekType | seekType, | |||
ActionStatus * | pStatus = NULL | |||
) | [inline, override, virtual] |
bool BazisLib::ACMemoryFile::SetData | ( | const void * | pData, | |
size_t | size | |||
) | [inline] |
Reimplemented from BazisLib::CBuffer.
virtual bool BazisLib::ACMemoryFile::Valid | ( | ) | [inline, override, virtual] |
Implements BazisLib::BasicFileBase.
virtual size_t BazisLib::ACMemoryFile::Write | ( | const void * | pBuffer, | |
size_t | size, | |||
ActionStatus * | pStatus = NULL | |||
) | [inline, override, virtual] |
size_t BazisLib::ACMemoryFile::m_Pointer [protected] |