LeviLamina
Loading...
Searching...
No Matches
PreloadCache.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/resource_processing/PreloadState.h"
7
8// auto generated forward declare list
9// clang-format off
10namespace Bedrock::Resources { class PreloadedPathHandle; }
11namespace Bedrock::Resources::Archive { class Reader; }
12namespace Bedrock::Resources::Archive { class TOCReader; }
13namespace Core { class Path; }
14// clang-format on
15
16namespace Bedrock::Resources {
17
18class PreloadCache : public ::std::enable_shared_from_this<::Bedrock::Resources::PreloadCache> {
19public:
20 // PreloadCache inner types declare
21 // clang-format off
22 struct InFlightTocBuild;
23 struct InFlightTocBuilds;
26 // clang-format on
27
28 // PreloadCache inner types define
29 struct InFlightTocBuild {
30 public:
31 // member variables
32 // NOLINTBEGIN
37 // NOLINTEND
38
39 public:
40 // prevent constructor by default
41 InFlightTocBuild& operator=(InFlightTocBuild const&);
42 InFlightTocBuild(InFlightTocBuild const&);
43 InFlightTocBuild();
44 };
45
46 struct InFlightTocBuilds {
47 public:
48 // member variables
49 // NOLINTBEGIN
52 // NOLINTEND
53
54 public:
55 // prevent constructor by default
56 InFlightTocBuilds& operator=(InFlightTocBuilds const&);
57 InFlightTocBuilds(InFlightTocBuilds const&);
58 InFlightTocBuilds();
59 };
60
61 struct PreloadedContentMaps {
62 public:
63 // member variables
64 // NOLINTBEGIN
67 // NOLINTEND
68
69 public:
70 // prevent constructor by default
71 PreloadedContentMaps& operator=(PreloadedContentMaps const&);
72 PreloadedContentMaps(PreloadedContentMaps const&);
73 PreloadedContentMaps();
74 };
75
77
78public:
79 // member variables
80 // NOLINTBEGIN
87 // NOLINTEND
88
89public:
90 // prevent constructor by default
91 PreloadCache& operator=(PreloadCache const&);
92 PreloadCache(PreloadCache const&);
93 PreloadCache();
94
95public:
96 // member functions
97 // NOLINTBEGIN
98 MCNAPI ::std::shared_ptr<::Bedrock::Resources::Archive::TOCReader>
99 _cacheTOCReaderSingleFlight(::Core::Path const& archivePath) const;
100
101 MCNAPI ::Bedrock::Resources::PreloadedPathHandle _findPreloadedPath(
103 ::Core::Path const& cleanPath
104 ) const;
105
106 MCNAPI ::Bedrock::Resources::PreloadState _getAsset(
108 ::Core::Path const& path,
109 ::std::string* assetData
110 ) const;
111
112 MCNAPI bool _isNegativelyCached(::Core::Path const& archivePath) const;
113
114 MCNAPI ::Bedrock::Resources::PreloadedPathHandle
115 addPreloadedPath(::Core::Path const& path, ::std::unique_ptr<::Bedrock::Resources::Archive::Reader> archiveReader);
116
117 MCNAPI ::Bedrock::Resources::PreloadedPathHandle findPreloadedPath(::Core::Path const& path) const;
118
119 MCNAPI ::Bedrock::Resources::PreloadState
120 getAsset(::Core::Path const& path, ::Core::Path const& archivePath, ::std::string& contents) const;
121
122 MCNAPI ::Bedrock::Resources::PreloadState
123 hasAssetFallback(::Core::Path const& path, ::Core::Path const& archivePath) const;
124
125#ifdef LL_PLAT_C
126 MCNAPI void invalidate();
127#endif
128 // NOLINTEND
129
130public:
131 // static functions
132 // NOLINTBEGIN
133 MCNAPI static void _preloadedPathDeleter(
134 ::std::weak_ptr<::Bedrock::Resources::PreloadCache> weakThis,
135 ::Core::Path const& path,
137 );
138 // NOLINTEND
139};
140
141} // namespace Bedrock::Resources
MCAPI::Bedrock::Resources::PreloadedPathHandle _findPreloadedPath(::Bedrock::Resources::PreloadCache::PreloadedContentMaps const &contentMaps, ::Core::Path const &cleanPath) const
MCAPI::Bedrock::Resources::PreloadState hasAssetFallback(::Core::Path const &path, ::Core::Path const &archivePath) const
MCAPI::Bedrock::Resources::PreloadState getAsset(::Core::Path const &path, ::Core::Path const &archivePath, ::std::string &contents) const
static MCAPI void _preloadedPathDeleter(::std::weak_ptr<::Bedrock::Resources::PreloadCache > weakThis, ::Core::Path const &path, ::Bedrock::Resources::Archive::Reader *reader)
MCAPI::Bedrock::Resources::PreloadState _getAsset(::Bedrock::Resources::PreloadCache::PreloadedContentMaps const &contentMaps, ::Core::Path const &path, ::std::string *assetData) const
MCAPI bool _isNegativelyCached(::Core::Path const &archivePath) const
MCAPI::Bedrock::Resources::PreloadedPathHandle findPreloadedPath(::Core::Path const &path) const
MCAPI::Bedrock::Resources::PreloadedPathHandle addPreloadedPath(::Core::Path const &path, ::std::unique_ptr<::Bedrock::Resources::Archive::Reader > archiveReader)
MCAPI ::std::shared_ptr<::Bedrock::Resources::Archive::TOCReader > _cacheTOCReaderSingleFlight(::Core::Path const &archivePath) const
Definition PreloadedPathHandle.h:16
Definition Path.h:11
Definition Alias.h:14