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