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

#include <FilePool.hh>

Inheritance diagram for openmsx::FilePool:
Inheritance graph
Collaboration diagram for openmsx::FilePool:
Collaboration graph

Public Member Functions

 FilePool (CommandController &controller, Reactor &reactor)
 ~FilePool ()
File getFile (FileType fileType, const Sha1Sum &sha1sum)
 Search file with the given sha1sum.
Sha1Sum getSha1Sum (File &file)
 Calculate sha1sum for the given File object.
std::optional< Sha1SumgetSha1Sum (const std::string &filename)
FilePoolCore::Directories getDirectories () const

Detailed Description

Definition at line 19 of file FilePool.hh.

Constructor & Destructor Documentation

◆ FilePool()

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

Definition at line 31 of file

References getDirectories().

◆ ~FilePool()

openmsx::FilePool::~FilePool ( )

Member Function Documentation

◆ getDirectories()

FilePoolCore::Directories openmsx::FilePool::getDirectories ( ) const

◆ 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 53 of file

References openmsx::FilePoolCore::getFile().

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

◆ getSha1Sum() [1/2]

std::optional< Sha1Sum > openmsx::FilePool::getSha1Sum ( const std::string &  filename)

Definition at line 63 of file

References getSha1Sum().

◆ getSha1Sum() [2/2]

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 58 of file

References openmsx::FilePoolCore::getSha1Sum().

Referenced by openmsx::WavImageCache::get(), getSha1Sum(), openmsx::DMKDiskImage::getSha1SumImpl(), and openmsx::ImGuiManager::paintImGui().

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