openMSX
LocalFileReference.hh
Go to the documentation of this file.
1 #ifndef LOCALFILEREFERENCE_HH
2 #define LOCALFILEREFERENCE_HH
3 
4 #include <string>
5 
6 namespace openmsx {
7 
8 class File;
9 class Filename;
10 
31 {
32 public:
33  LocalFileReference() = default;
34  explicit LocalFileReference(const Filename& filename);
35  explicit LocalFileReference(const std::string& filename);
36  explicit LocalFileReference(File& file);
38  // non-copyable, but moveable
43 
47  const std::string& getFilename() const;
48 
49 private:
50  void init(File& file);
51  void cleanup();
52 
53  std::string tmpFile;
54  std::string tmpDir;
55 };
56 
57 } // namespace openmsx
58 
59 #endif
openmsx::LocalFileReference
Helper class to use files in APIs other than openmsx::File.
Definition: LocalFileReference.hh:31
openmsx::LocalFileReference::operator=
LocalFileReference & operator=(const LocalFileReference &)=delete
openmsx::LocalFileReference::getFilename
const std::string & getFilename() const
Returns path to a local uncompressed version of this file.
Definition: LocalFileReference.cc:93
openmsx::LocalFileReference::~LocalFileReference
~LocalFileReference()
Definition: LocalFileReference.cc:44
openmsx::LocalFileReference::LocalFileReference
LocalFileReference()=default
openmsx::filename
constexpr const char *const filename
Definition: FirmwareSwitch.cc:10
openmsx::LocalFileReference::LocalFileReference
LocalFileReference(const LocalFileReference &)=delete
openmsx::File
Definition: File.hh:16
openmsx::Filename
Filename
Definition: Filename.cc:50
openmsx::Filename
This class represents a filename.
Definition: Filename.hh:18
openmsx
This file implemented 3 utility functions:
Definition: Autofire.cc:5