MiKTeX 23.10-next
A scalable TeX distribution
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
MiKTeX::Core::MemoryMappedFile Class Referenceabstract

Instances of this class provide access to memory-mapped files. More...

#include <miktex/Core/MemoryMappedFile.h>

Public Member Functions

virtual void * Open (const MiKTeX::Util::PathName &path, bool readWrite)=0
 
virtual void Close ()=0
 Closes the file mapping. More...
 
virtual void * Resize (std::size_t newSize)=0
 
virtual void * GetPtr () const =0
 
virtual std::string GetName () const =0
 
virtual std::size_t GetSize () const =0
 
virtual void Flush ()=0
 Flushes the memory-mapped file to disk. More...
 

Static Public Member Functions

static MemoryMappedFileCreate ()
 

Detailed Description

Instances of this class provide access to memory-mapped files.

Member Function Documentation

◆ Close()

virtual void MiKTeX::Core::MemoryMappedFile::Close ( )
pure virtual

Closes the file mapping.

◆ Create()

static MemoryMappedFile * MiKTeX::Core::MemoryMappedFile::Create ( )
static

Creates a new MemoryMappedFile object. The caller is responsible for deleting the object.

Returns
Returns the pointer to a new MemoryMappedFile object.

◆ Flush()

virtual void MiKTeX::Core::MemoryMappedFile::Flush ( )
pure virtual

Flushes the memory-mapped file to disk.

◆ GetName()

virtual std::string MiKTeX::Core::MemoryMappedFile::GetName ( ) const
pure virtual

Gets the name of the file mapping.

Returns
Returns the name of the file mapping

◆ GetPtr()

virtual void * MiKTeX::Core::MemoryMappedFile::GetPtr ( ) const
pure virtual

Gets a pointer to the block of memory.

Returns
Returns a pointer to the block of memory.

◆ GetSize()

virtual std::size_t MiKTeX::Core::MemoryMappedFile::GetSize ( ) const
pure virtual

Gets the size of the memory-mapped file.

Returns
Returns the size (in bytes).

◆ Open()

virtual void * MiKTeX::Core::MemoryMappedFile::Open ( const MiKTeX::Util::PathName path,
bool  readWrite 
)
pure virtual

Maps a file into memory.

Parameters
pathThe file system path to the file to be mapped.
readWriteIndicates whether the file should be opened for reading and writing.
Returns
Returns a pointer to the block of memory.

◆ Resize()

virtual void * MiKTeX::Core::MemoryMappedFile::Resize ( std::size_t  newSize)
pure virtual

Resizes the memory-mapped file.

Parameters
newSizeThe new size of the memory-mapped file.
Returns
Returns a pointer to the block of memory.

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