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

#include <FilePool.hh>

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

Public Member Functions

 FilePool (CommandController &controller, Reactor &reactor)
 
 ~FilePool ()
 
File getFile (FileType fileType, const Sha1Sum &sha1sum)
 Search file with the given sha1sum. More...
 
Sha1Sum getSha1Sum (File &file)
 Calculate sha1sum for the given File object. More...
 

Detailed Description

Definition at line 15 of file FilePool.hh.

Constructor & Destructor Documentation

◆ FilePool()

openmsx::FilePool::FilePool ( CommandController controller,
Reactor reactor 
)

Definition at line 44 of file FilePool.cc.

◆ ~FilePool()

openmsx::FilePool::~FilePool ( )

Member Function Documentation

◆ getFile()

File openmsx::FilePool::getFile ( FileType  fileType,
const Sha1Sum sha1sum 
)

Search file with the given sha1sum.

If found it returns the (already opened) file, if not found it returns nullptr.

Definition at line 67 of file FilePool.cc.

References openmsx::FilePoolCore::getFile().

Referenced by openmsx::CassettePlayer::serialize(), and openmsx::DiskChanger::serialize().

◆ getSha1Sum()

Sha1Sum openmsx::FilePool::getSha1Sum ( File file)

Calculate sha1sum for the given File object.

If possible the result is retrieved from cache, avoiding the relatively expensive calculation.

Definition at line 72 of file FilePool.cc.

References openmsx::FilePoolCore::getSha1Sum().

Referenced by openmsx::Sha1SumCommand::execute(), openmsx::DMKDiskImage::getSha1SumImpl(), and openmsx::WavImage::WavImage().


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