3#include <Foundation/Types/UniquePtr.h>
31#if PL_ENABLED(PL_SUPPORTS_MEMORY_MAPPED_FILE) || defined(PL_DOCS)
40#if PL_ENABLED(PL_SUPPORTS_SHARED_MEMORY) || defined(PL_DOCS)
56 plUInt64 GetFileSize()
const;
59 const void* GetReadPointer(plUInt64 uiOffset = 0,
OffsetBase base = OffsetBase::Start)
const;
62 void* GetWritePointer(plUInt64 uiOffset = 0,
OffsetBase base = OffsetBase::Start);
Allows to map an entire file into memory for random access.
Definition MemoryMappedFile.h:9
OffsetBase
The start point for interpreting byte offsets into the memory.
Definition MemoryMappedFile.h:25
Mode
Definition MemoryMappedFile.h:17
plResult Open(plStringView sAbsolutePath, Mode mode)
Attempts to open the given file and map it into memory.
plResult OpenShared(plStringView sSharedName, plUInt64 uiSize, Mode mode)
Attempts to open or create the given shared memory block addressed by szSharedName.
plStringView represent a read-only sub-string of a larger string, as it can store a dedicated string ...
Definition StringView.h:34
A Unique ptr manages an object and destroys that object when it goes out of scope....
Definition UniquePtr.h:10
Definition MemoryMappedFile_NoImpl.h:9
Default enum for returning failure or success, instead of using a bool.
Definition Types.h:54