LeviLamina
Loading...
Searching...
No Matches
ZipPackAccessStrategy.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/file/PathBuffer.h"
7#include "mc/deps/core/utility/NonOwnerPointer.h"
8#include "mc/resources/PackAccessStrategy.h"
9#include "mc/resources/PackAccessStrategyType.h"
10
11// auto generated forward declare list
12// clang-format off
13class ContentIdentity;
14class IFileAccess;
16struct ZipPackArgs;
17namespace Bedrock::Resources { class PreloadedPathHandle; }
18namespace Bedrock::Resources::Archive { class Reader; }
19namespace Core { class Path; }
20namespace Core { class UnzipFile; }
21// clang-format on
22
23class ZipPackAccessStrategy : public ::PackAccessStrategy {
24public:
25 // member variables
26 // NOLINTBEGIN
35 // NOLINTEND
36
37public:
38 // prevent constructor by default
39 ZipPackAccessStrategy& operator=(ZipPackAccessStrategy const&);
40 ZipPackAccessStrategy(ZipPackAccessStrategy const&);
41 ZipPackAccessStrategy();
42
43public:
44 // virtual functions
45 // NOLINTBEGIN
46 virtual ~ZipPackAccessStrategy() /*override*/;
47
48 virtual uint64 getPackSize() const /*override*/;
49
50 virtual ::ResourceLocation const& getPackLocation() const /*override*/;
51
52 virtual ::std::string const& getPackName() const /*override*/;
53
54 virtual bool isWritable() const /*override*/;
55
56 virtual bool isTrusted() const /*override*/;
57
58 virtual bool hasAsset(::Core::Path const& packRelativePath, bool trustedContentOnly, bool caseSensative) const
59 /*override*/;
60
61 virtual bool hasFolder(::Core::Path const& packRelativePath) const /*override*/;
62
63 virtual bool getAsset(::Core::Path const& packRelativePath, ::std::string& result, bool trustedContentOnly) const
64 /*override*/;
65
66 virtual void forEachIn(
67 ::Core::Path const& packRelativePath,
68 ::std::function<void(::Core::Path const&)> callback,
69 bool recurseAnyways
70 ) const /*override*/;
71
72 virtual ::PackAccessStrategyType getStrategyType() const /*override*/;
73
74 virtual ::Core::PathBuffer<::std::string> const& getSubPath() const /*override*/;
75
76 virtual bool supportsSignatureVerification() const /*override*/;
77
78 virtual ::std::unique_ptr<::PackAccessStrategy> createSubPack(::Core::Path const& subPath) const /*override*/;
79
80 virtual void unload() /*override*/;
81
82 virtual ::ContentIdentity readContentIdentity() const /*override*/;
83
84 virtual ::std::unique_ptr<::Bedrock::Resources::Archive::Reader>
85 _loadArchive(::Core::Path const& packRelativePath) const /*override*/;
86
87 virtual ::std::vector<::Bedrock::Resources::PreloadedPathHandle>
88 _preloadSubFolders(::Core::Path const& packRelativePath) const /*override*/;
89 // NOLINTEND
90
91public:
92 // member functions
93 // NOLINTBEGIN
95 ::std::variant<::Bedrock::NotNullNonOwnerPtr<::IFileAccess>, ::gsl::not_null<::std::shared_ptr<::IFileAccess>>>
96 fileAccess,
97 ::ZipPackArgs&& args
98 );
99
100 MCNAPI bool _getAsset(
101 ::gsl::not_null<::Core::UnzipFile*> zipFile,
102 ::Core::Path const& packRelativePath,
103 ::std::string& result
104 ) const;
105
106 MCNAPI bool initZipFile() const;
107 // NOLINTEND
108
109public:
110 // constructor thunks
111 // NOLINTBEGIN
112 MCNAPI void* $ctor(
113 ::std::variant<::Bedrock::NotNullNonOwnerPtr<::IFileAccess>, ::gsl::not_null<::std::shared_ptr<::IFileAccess>>>
114 fileAccess,
115 ::ZipPackArgs&& args
116 );
117 // NOLINTEND
118
119public:
120 // destructor thunk
121 // NOLINTBEGIN
122 MCNAPI void $dtor();
123 // NOLINTEND
124
125public:
126 // virtual function thunks
127 // NOLINTBEGIN
128 MCNAPI uint64 $getPackSize() const;
129
130 MCNAPI ::ResourceLocation const& $getPackLocation() const;
131
132 MCNAPI ::std::string const& $getPackName() const;
133
134 MCNAPI bool $isWritable() const;
135
136 MCNAPI bool $isTrusted() const;
137
138 MCNAPI bool $hasAsset(::Core::Path const& packRelativePath, bool trustedContentOnly, bool caseSensative) const;
139
140 MCNAPI bool $hasFolder(::Core::Path const& packRelativePath) const;
141
142 MCNAPI bool $getAsset(::Core::Path const& packRelativePath, ::std::string& result, bool trustedContentOnly) const;
143
144 MCNAPI void $forEachIn(
145 ::Core::Path const& packRelativePath,
146 ::std::function<void(::Core::Path const&)> callback,
147 bool recurseAnyways
148 ) const;
149
150 MCNAPI ::PackAccessStrategyType $getStrategyType() const;
151
152 MCNAPI ::Core::PathBuffer<::std::string> const& $getSubPath() const;
153
155
156 MCNAPI ::std::unique_ptr<::PackAccessStrategy> $createSubPack(::Core::Path const& subPath) const;
157
158 MCNAPI void $unload();
159
160 MCNAPI ::ContentIdentity $readContentIdentity() const;
161
162 MCNAPI ::std::unique_ptr<::Bedrock::Resources::Archive::Reader>
163 $_loadArchive(::Core::Path const& packRelativePath) const;
164
165 MCNAPI ::std::vector<::Bedrock::Resources::PreloadedPathHandle>
166 $_preloadSubFolders(::Core::Path const& packRelativePath) const;
167
168
169 // NOLINTEND
170
171public:
172 // vftables
173 // NOLINTBEGIN
174 MCNAPI static void** $vftable();
175 // NOLINTEND
176};
Definition PreloadedPathHandle.h:15
Definition ContentIdentity.h:8
Definition Path.h:10
Definition UnzipFile.h:18
Definition IFileAccess.h:15
Definition ResourceLocation.h:15
MCAPI bool initZipFile() const
MCAPI bool _getAsset(::gsl::not_null<::Core::UnzipFile * > zipFile, ::Core::Path const &packRelativePath, ::std::string &result) const
MCAPI bool $isTrusted() const
MCAPI ::std::unique_ptr<::Bedrock::Resources::Archive::Reader > $_loadArchive(::Core::Path const &packRelativePath) const
MCAPI bool $isWritable() const
MCAPI uint64 $getPackSize() const
MCAPI bool $supportsSignatureVerification() const
static MCAPI void ** $vftable()
MCAPI::std::string const & $getPackName() const
MCAPI ::std::unique_ptr<::PackAccessStrategy > $createSubPack(::Core::Path const &subPath) const
MCAPI void * $ctor(::std::variant<::Bedrock::NotNullNonOwnerPtr<::IFileAccess >, ::gsl::not_null<::std::shared_ptr<::IFileAccess > > > fileAccess, ::ZipPackArgs &&args)
MCAPI ::Core::PathBuffer<::std::string > const & $getSubPath() const
MCAPI void $forEachIn(::Core::Path const &packRelativePath, ::std::function< void(::Core::Path const &)> callback, bool recurseAnyways) const
MCAPI bool $hasFolder(::Core::Path const &packRelativePath) const
MCAPI void $unload()
MCAPI::PackAccessStrategyType $getStrategyType() const
MCAPI ZipPackAccessStrategy(::std::variant<::Bedrock::NotNullNonOwnerPtr<::IFileAccess >, ::gsl::not_null<::std::shared_ptr<::IFileAccess > > > fileAccess, ::ZipPackArgs &&args)
MCAPI ::std::vector<::Bedrock::Resources::PreloadedPathHandle > $_preloadSubFolders(::Core::Path const &packRelativePath) const
MCAPI bool $hasAsset(::Core::Path const &packRelativePath, bool trustedContentOnly, bool caseSensative) const
MCAPI::ResourceLocation const & $getPackLocation() const
MCAPI::ContentIdentity $readContentIdentity() const
MCAPI bool $getAsset(::Core::Path const &packRelativePath, ::std::string &result, bool trustedContentOnly) const
Definition ZipPackArgs.h:5
Definition Alias.h:14