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);
36  explicit LocalFileReference(std::string filename);
37  explicit LocalFileReference(File& file);
39  // non-copyable, but moveable
43  LocalFileReference& operator=(LocalFileReference&&) noexcept;
44 
48  [[nodiscard]] const std::string& getFilename() const;
49 
50 private:
51  void init(File& file);
52  void cleanup();
53 
54 private:
55  std::string tmpFile;
56  std::string tmpDir;
57 };
58 
59 } // namespace openmsx
60 
61 #endif
This class represents a filename.
Definition: Filename.hh:18
Helper class to use files in APIs other than openmsx::File.
LocalFileReference & operator=(const LocalFileReference &)=delete
LocalFileReference(const LocalFileReference &)=delete
const std::string & getFilename() const
Returns path to a local uncompressed version of this file.
This file implemented 3 utility functions:
Definition: Autofire.cc:5
constexpr const char *const filename