OpenSiv3D  v0.6.5
C++20 framework for creative coding
s3d::MemoryMappedFile Class Reference

#include <MemoryMappedFile.hpp>

Public Member Functions

SIV3D_NODISCARD_CXX20 MemoryMappedFile ()
 
SIV3D_NODISCARD_CXX20 MemoryMappedFile (FilePathView path, MMFOpenMode_if_Exists ifExists=MMFOpenMode_if_Exists::Truncate, MMFOpenMode_if_NotFound ifNotFound=MMFOpenMode_if_NotFound::Create)
 
bool open (FilePathView path, MMFOpenMode_if_Exists ifExists=MMFOpenMode_if_Exists::Truncate, MMFOpenMode_if_NotFound ifNotFound=MMFOpenMode_if_NotFound::Create)
 
void close ()
 
bool isOpen () const
 
 operator bool () const
 
void map (size_t offset=0, size_t requestSize=0)
 
void unmap ()
 
bool flush ()
 
size_t offset () const
 
size_t mappedSize () const
 
int64 fileSize () const
 
Bytedata () const
 
const FilePathpath () const
 

Constructor & Destructor Documentation

◆ MemoryMappedFile() [1/2]

SIV3D_NODISCARD_CXX20 s3d::MemoryMappedFile::MemoryMappedFile ( )

◆ MemoryMappedFile() [2/2]

SIV3D_NODISCARD_CXX20 s3d::MemoryMappedFile::MemoryMappedFile ( FilePathView  path,
MMFOpenMode_if_Exists  ifExists = MMFOpenMode_if_Exists::Truncate,
MMFOpenMode_if_NotFound  ifNotFound = MMFOpenMode_if_NotFound::Create 
)
explicit

Member Function Documentation

◆ close()

void s3d::MemoryMappedFile::close ( )

◆ data()

Byte* s3d::MemoryMappedFile::data ( ) const

◆ fileSize()

int64 s3d::MemoryMappedFile::fileSize ( ) const

◆ flush()

bool s3d::MemoryMappedFile::flush ( )

◆ isOpen()

bool s3d::MemoryMappedFile::isOpen ( ) const

◆ map()

void s3d::MemoryMappedFile::map ( size_t  offset = 0,
size_t  requestSize = 0 
)

◆ mappedSize()

size_t s3d::MemoryMappedFile::mappedSize ( ) const

◆ offset()

size_t s3d::MemoryMappedFile::offset ( ) const

◆ open()

bool s3d::MemoryMappedFile::open ( FilePathView  path,
MMFOpenMode_if_Exists  ifExists = MMFOpenMode_if_Exists::Truncate,
MMFOpenMode_if_NotFound  ifNotFound = MMFOpenMode_if_NotFound::Create 
)

◆ operator bool()

s3d::MemoryMappedFile::operator bool ( ) const
explicit

◆ path()

const FilePath& s3d::MemoryMappedFile::path ( ) const

◆ unmap()

void s3d::MemoryMappedFile::unmap ( )

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