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
 
void write (const void *buffer, size_t num) final
 
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 20 of file CompressedFileAdapter.cc.

◆ ~CompressedFileAdapter()

openmsx::CompressedFileAdapter::~CompressedFileAdapter ( )
overrideprotected

Definition at line 25 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 107 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 97 of file CompressedFileAdapter.cc.

◆ getSize()

size_t openmsx::CompressedFileAdapter::getSize ( )
finalvirtual

◆ getURL()

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

◆ isReadOnly()

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

Implements openmsx::FileBase.

Definition at line 123 of file CompressedFileAdapter.cc.

◆ mmap()

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

◆ munmap()

void openmsx::CompressedFileAdapter::munmap ( )
finalvirtual

Reimplemented from openmsx::FileBase.

Definition at line 81 of file CompressedFileAdapter.cc.

◆ read()

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

◆ seek()

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

Implements openmsx::FileBase.

Definition at line 92 of file CompressedFileAdapter.cc.

◆ truncate()

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

Reimplemented from openmsx::FileBase.

Definition at line 102 of file CompressedFileAdapter.cc.

◆ write()

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

Implements openmsx::FileBase.

Definition at line 70 of file CompressedFileAdapter.cc.


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