openMSX
Classes | Public Member Functions | Protected Member Functions | List of all members
openmsx::CompressedFileAdapter Class Referenceabstract

#include <CompressedFileAdapter.hh>

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

Classes

struct  Decompressed
 

Public Member Functions

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

Protected Member Functions

 CompressedFileAdapter (std::unique_ptr< FileBase > file)
 
 ~CompressedFileAdapter () override
 
virtual void decompress (FileBase &file, Decompressed &decompressed)=0
 

Detailed Description

Definition at line 10 of file CompressedFileAdapter.hh.

Constructor & Destructor Documentation

◆ CompressedFileAdapter()

openmsx::CompressedFileAdapter::CompressedFileAdapter ( std::unique_ptr< FileBase file)
explicitprotected

Definition at line 19 of file CompressedFileAdapter.cc.

◆ ~CompressedFileAdapter()

openmsx::CompressedFileAdapter::~CompressedFileAdapter ( )
overrideprotected

Definition at line 24 of file CompressedFileAdapter.cc.

References end(), and getURL().

Member Function Documentation

◆ decompress()

virtual void openmsx::CompressedFileAdapter::decompress ( FileBase file,
Decompressed decompressed 
)
protectedpure virtual

Referenced by getOriginalName(), getSize(), mmap(), and read().

◆ flush()

void openmsx::CompressedFileAdapter::flush ( )
finalvirtual

Implements openmsx::FileBase.

Definition at line 105 of file CompressedFileAdapter.cc.

◆ getModificationDate()

time_t openmsx::CompressedFileAdapter::getModificationDate ( )
finalvirtual

◆ getOriginalName()

std::string_view openmsx::CompressedFileAdapter::getOriginalName ( )
finalvirtual

◆ getPos()

size_t openmsx::CompressedFileAdapter::getPos ( )
finalvirtual

Implements openmsx::FileBase.

Definition at line 95 of file CompressedFileAdapter.cc.

◆ getSize()

size_t openmsx::CompressedFileAdapter::getSize ( )
finalvirtual

◆ getURL()

const std::string & openmsx::CompressedFileAdapter::getURL ( ) const
finalvirtual

◆ isReadOnly()

bool openmsx::CompressedFileAdapter::isReadOnly ( ) const
finalvirtual

Implements openmsx::FileBase.

Definition at line 121 of file CompressedFileAdapter.cc.

◆ mmap()

std::span< const uint8_t > openmsx::CompressedFileAdapter::mmap ( )
finalvirtual

Reimplemented from openmsx::FileBase.

Definition at line 73 of file CompressedFileAdapter.cc.

References openmsx::CompressedFileAdapter::Decompressed::buf, and decompress().

◆ munmap()

void openmsx::CompressedFileAdapter::munmap ( )
finalvirtual

Reimplemented from openmsx::FileBase.

Definition at line 79 of file CompressedFileAdapter.cc.

◆ read()

void openmsx::CompressedFileAdapter::read ( std::span< uint8_t >  buffer)
finalvirtual

◆ seek()

void openmsx::CompressedFileAdapter::seek ( size_t  pos)
finalvirtual

Implements openmsx::FileBase.

Definition at line 90 of file CompressedFileAdapter.cc.

◆ truncate()

void openmsx::CompressedFileAdapter::truncate ( size_t  size)
finalvirtual

Reimplemented from openmsx::FileBase.

Definition at line 100 of file CompressedFileAdapter.cc.

◆ write()

void openmsx::CompressedFileAdapter::write ( std::span< const uint8_t >  buffer)
finalvirtual

Implements openmsx::FileBase.

Definition at line 68 of file CompressedFileAdapter.cc.


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