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 (void *buffer, size_t num) final override
 
void write (const void *buffer, size_t num) final override
 
span< uint8_t > mmap () final override
 
void munmap () final override
 
size_t getSize () final override
 
void seek (size_t pos) final override
 
size_t getPos () final override
 
void truncate (size_t size) final override
 
void flush () final override
 
std::string getURL () const final override
 
std::string getOriginalName () final override
 
bool isReadOnly () const final override
 
time_t getModificationDate () final override
 
- 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 20 of file CompressedFileAdapter.cc.

◆ ~CompressedFileAdapter()

openmsx::CompressedFileAdapter::~CompressedFileAdapter ( )
overrideprotected

Definition at line 25 of file CompressedFileAdapter.cc.

References 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 ( )
finaloverridevirtual

Implements openmsx::FileBase.

Definition at line 102 of file CompressedFileAdapter.cc.

◆ getModificationDate()

time_t openmsx::CompressedFileAdapter::getModificationDate ( )
finaloverridevirtual

Implements openmsx::FileBase.

Definition at line 123 of file CompressedFileAdapter.cc.

◆ getOriginalName()

string openmsx::CompressedFileAdapter::getOriginalName ( )
finaloverridevirtual

Reimplemented from openmsx::FileBase.

Definition at line 112 of file CompressedFileAdapter.cc.

References decompress().

◆ getPos()

size_t openmsx::CompressedFileAdapter::getPos ( )
finaloverridevirtual

Implements openmsx::FileBase.

Definition at line 92 of file CompressedFileAdapter.cc.

◆ getSize()

size_t openmsx::CompressedFileAdapter::getSize ( )
finaloverridevirtual

Implements openmsx::FileBase.

Definition at line 81 of file CompressedFileAdapter.cc.

References decompress().

◆ getURL()

string openmsx::CompressedFileAdapter::getURL ( ) const
finaloverridevirtual

Implements openmsx::FileBase.

Definition at line 107 of file CompressedFileAdapter.cc.

Referenced by ~CompressedFileAdapter().

◆ isReadOnly()

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

Implements openmsx::FileBase.

Definition at line 118 of file CompressedFileAdapter.cc.

◆ mmap()

span< uint8_t > openmsx::CompressedFileAdapter::mmap ( )
finaloverridevirtual

Reimplemented from openmsx::FileBase.

Definition at line 70 of file CompressedFileAdapter.cc.

References decompress().

◆ munmap()

void openmsx::CompressedFileAdapter::munmap ( )
finaloverridevirtual

Reimplemented from openmsx::FileBase.

Definition at line 76 of file CompressedFileAdapter.cc.

◆ read()

void openmsx::CompressedFileAdapter::read ( void *  buffer,
size_t  num 
)
finaloverridevirtual

Implements openmsx::FileBase.

Definition at line 54 of file CompressedFileAdapter.cc.

References decompress().

◆ seek()

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

Implements openmsx::FileBase.

Definition at line 87 of file CompressedFileAdapter.cc.

◆ truncate()

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

Reimplemented from openmsx::FileBase.

Definition at line 97 of file CompressedFileAdapter.cc.

◆ write()

void openmsx::CompressedFileAdapter::write ( const void *  buffer,
size_t  num 
)
finaloverridevirtual

Implements openmsx::FileBase.

Definition at line 65 of file CompressedFileAdapter.cc.


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