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
39  LocalFileReference(const LocalFileReference&) = delete;
43 
47  const std::string& getFilename() const;
48 
49 private:
50  void init(File& file);
51 
52  std::string tmpFile;
53  std::string tmpDir;
54 };
55 
56 } // namespace openmsx
57 
58 #endif
LocalFileReference & operator=(const LocalFileReference &)=delete
const std::string & getFilename() const
Returns path to a local uncompressed version of this file.
constexpr const char *const filename
This class represents a filename.
Definition: Filename.hh:17
Thanks to enen for testing this on a real cartridge:
Definition: Autofire.cc:5
Helper class to use files in APIs other than openmsx::File.