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 17 of file FilePool.hh.
openmsx::FilePool::FilePool | ( | CommandController & | controller, |
Reactor & | reactor | ||
) |
Definition at line 31 of file FilePool.cc.
openmsx::FilePool::~FilePool | ( | ) |
Definition at line 47 of file FilePool.cc.
References openmsx::Subject< T >::detach(), openmsx::Reactor::getEventDistributor(), openmsx::QUIT, 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 53 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 58 of file FilePool.cc.
References openmsx::FilePoolCore::getSha1Sum().
Referenced by openmsx::WavImageCache::get(), and openmsx::DMKDiskImage::getSha1SumImpl().