openMSX
|
#include <FilePool.hh>
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... | |
Definition at line 16 of file FilePool.hh.
openmsx::FilePool::FilePool | ( | CommandController & | controller, |
Reactor & | reactor | ||
) |
Definition at line 45 of file FilePool.cc.
openmsx::FilePool::~FilePool | ( | ) |
Definition at line 62 of file FilePool.cc.
References openmsx::Subject< T >::detach(), openmsx::Reactor::getEventDistributor(), openmsx::OPENMSX_QUIT_EVENT, and openmsx::EventDistributor::unregisterEventListener().
Search file with the given sha1sum.
If found it returns the (already opened) file, if not found it returns nullptr.
Definition at line 68 of file FilePool.cc.
References openmsx::FilePoolCore::getFile().
Referenced by openmsx::CassettePlayer::serialize(), and openmsx::DiskChanger::serialize().
Calculate sha1sum for the given File object.
If possible the result is retrieved from cache, avoiding the relatively expensive calculation.
Definition at line 73 of file FilePool.cc.
References openmsx::FilePoolCore::getSha1Sum().
Referenced by openmsx::Sha1SumCommand::execute(), openmsx::WavImageCache::get(), and openmsx::DMKDiskImage::getSha1SumImpl().