openMSX
Public Member Functions | List of all members
openmsx::MemoryBufferFile Class Referencefinal

#include <MemoryBufferFile.hh>

Inheritance diagram for openmsx::MemoryBufferFile:
Inheritance graph
[legend]
Collaboration diagram for openmsx::MemoryBufferFile:
Collaboration graph
[legend]

Public Member Functions

 MemoryBufferFile (std::span< const uint8_t > buffer_)
 
void read (std::span< uint8_t > dst) override
 
void write (std::span< const uint8_t > src) override
 
size_t getSize () override
 
void seek (size_t newPos) override
 
size_t getPos () override
 
void flush () override
 
const std::string & getURL () const override
 
bool isReadOnly () const override
 
time_t getModificationDate () override
 
- Public Member Functions inherited from openmsx::FileBase
virtual ~FileBase ()=default
 
virtual std::span< const uint8_t > mmap ()
 
virtual void munmap ()
 
virtual void truncate (size_t size)
 
virtual std::string getLocalReference ()
 
virtual std::string_view getOriginalName ()
 

Detailed Description

Definition at line 10 of file MemoryBufferFile.hh.

Constructor & Destructor Documentation

◆ MemoryBufferFile()

openmsx::MemoryBufferFile::MemoryBufferFile ( std::span< const uint8_t >  buffer_)
inlineexplicit

Definition at line 13 of file MemoryBufferFile.hh.

Member Function Documentation

◆ flush()

void openmsx::MemoryBufferFile::flush ( )
overridevirtual

Implements openmsx::FileBase.

Definition at line 38 of file MemoryBufferFile.cc.

◆ getModificationDate()

time_t openmsx::MemoryBufferFile::getModificationDate ( )
overridevirtual

Implements openmsx::FileBase.

Definition at line 54 of file MemoryBufferFile.cc.

◆ getPos()

size_t openmsx::MemoryBufferFile::getPos ( )
overridevirtual

Implements openmsx::FileBase.

Definition at line 33 of file MemoryBufferFile.cc.

Referenced by read().

◆ getSize()

size_t openmsx::MemoryBufferFile::getSize ( )
overridevirtual

Implements openmsx::FileBase.

Definition at line 23 of file MemoryBufferFile.cc.

Referenced by read().

◆ getURL()

const std::string & openmsx::MemoryBufferFile::getURL ( ) const
overridevirtual

Implements openmsx::FileBase.

Definition at line 43 of file MemoryBufferFile.cc.

◆ isReadOnly()

bool openmsx::MemoryBufferFile::isReadOnly ( ) const
overridevirtual

Implements openmsx::FileBase.

Definition at line 49 of file MemoryBufferFile.cc.

◆ read()

void openmsx::MemoryBufferFile::read ( std::span< uint8_t >  dst)
overridevirtual

Implements openmsx::FileBase.

Definition at line 9 of file MemoryBufferFile.cc.

References ranges::copy(), getPos(), and getSize().

◆ seek()

void openmsx::MemoryBufferFile::seek ( size_t  newPos)
overridevirtual

Implements openmsx::FileBase.

Definition at line 28 of file MemoryBufferFile.cc.

◆ write()

void openmsx::MemoryBufferFile::write ( std::span< const uint8_t >  src)
overridevirtual

Implements openmsx::FileBase.

Definition at line 18 of file MemoryBufferFile.cc.


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