MCPcopy Create free account
hub / github.com/OpenRCT2/OpenRCT2 / ZipDataRetriever

Class ZipDataRetriever

src/openrct2/object/ObjectFactory.cpp:98–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

96 };
97
98 class ZipDataRetriever : public IFileDataRetriever
99 {
100 private:
101 const std::string _path;
102 const IZipArchive& _zipArchive;
103
104 public:
105 ZipDataRetriever(std::string_view path, const IZipArchive& zipArchive)
106 : _path(path)
107 , _zipArchive(zipArchive)
108 {
109 }
110
111 std::vector<uint8_t> GetData(std::string_view path) const override
112 {
113 return _zipArchive.GetFileData(path);
114 }
115
116 ObjectAsset GetAsset(std::string_view path) const override
117 {
118 return ObjectAsset(_path, path);
119 }
120 };
121
122 class ReadObjectContext : public IReadObjectContext
123 {

Callers 1

CreateObjectFromZipFileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected