openMSX
LocalFileReference.hh
Go to the documentation of this file.
1#ifndef LOCALFILEREFERENCE_HH
2#define LOCALFILEREFERENCE_HH
3
4#include <string>
5
6namespace openmsx {
7
8class File;
9class Filename;
10
31{
32public:
33 LocalFileReference() = default;
34 explicit LocalFileReference(const Filename& filename);
35 explicit LocalFileReference(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
50private:
51 void init(File& file);
52 void cleanup() const;
53
54private:
55 std::string tmpFile;
56 std::string tmpDir;
57};
58
59} // namespace openmsx
60
61#endif
This class represents a filename.
Definition Filename.hh:20
Helper class to use files in APIs other than openmsx::File.
LocalFileReference(const LocalFileReference &)=delete
LocalFileReference & operator=(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:11
STL namespace.