LeviLamina
Loading...
Searching...
No Matches
ResourceLoader.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/EnableNonOwnerReferences.h"
8
9// auto generated forward declare list
10// clang-format off
14namespace mce { struct Image; }
15// clang-format on
16
18public:
19 // ResourceLoader inner types define
20 using ResourceFileExtensionSetType = ::gsl::span<::std::string const>;
21
22public:
23 // member variables
24 // NOLINTBEGIN
25 ::ll::TypedStorage<8, 64, ::std::function<::Core::PathBuffer<::std::string>()>> mGetPath;
26 // NOLINTEND
27
28public:
29 // virtual functions
30 // NOLINTBEGIN
31 virtual ~ResourceLoader() /*override*/;
32
33 virtual bool load(::ResourceLocation const& resourceLocation, ::std::string& resourceStream) const = 0;
34
35 virtual bool load(
36 ::ResourceLocation const& resourceLocation,
37 ::std::string& resourceStream,
38 ::gsl::span<::std::string const> extensionList
39 ) const = 0;
40
41 virtual bool load(
42 ::ResourceLocationPair const& resourceLocation,
43 ::std::string& resourceStream,
44 ::gsl::span<::std::string const> extensions
45 ) const;
46
47 virtual bool loadText(::ResourceLocation const& resourceLocation, ::std::string& resourceStream) const;
48
49 virtual ::std::vector<::LoadedResourceData> loadAllVersionsOf(::ResourceLocation const& resourceLocation) const = 0;
50
51#ifdef LL_PLAT_C
52 virtual ::mce::Image loadTexture(::ResourceLocation const& resourceLocation) const = 0;
53
54#endif
55 virtual bool isInStreamableLocation(::ResourceLocation const& resourceLocation) const;
56
57 virtual bool isInStreamableLocation(
58 ::ResourceLocation const& resourceLocation,
59 ::gsl::span<::std::string const> extensions
60 ) const;
61
62 virtual ::Core::PathBuffer<::std::string> getPath(::ResourceLocation const& resourceLocation) const;
63
64 virtual ::Core::PathBuffer<::std::string>
65 getPath(::ResourceLocation const& resourceLocation, ::gsl::span<::std::string const> extensions) const;
66
67 virtual ::Core::PathBuffer<::std::string>
68 getPathContainingResource(::ResourceLocation const& resourceLocation) const;
69
70 virtual ::Core::PathBuffer<::std::string> getPathContainingResource(
71 ::ResourceLocation const& resourceLocation,
72 ::gsl::span<::std::string const> extensions
73 ) const;
74
75 virtual ::std::pair<int, ::std::string_view> getPackStackIndexOfResource(
76 ::ResourceLocation const& resourceLocation,
77 ::gsl::span<::std::string const> extensions
78 ) const;
79 // NOLINTEND
80
81public:
82 // destructor thunk
83 // NOLINTBEGIN
84 MCFOLD void $dtor();
85 // NOLINTEND
86
87public:
88 // virtual function thunks
89 // NOLINTBEGIN
90 MCFOLD bool $load(
91 ::ResourceLocationPair const& resourceLocation,
92 ::std::string& resourceStream,
93 ::gsl::span<::std::string const> extensions
94 ) const;
95
96 MCFOLD bool $loadText(::ResourceLocation const& resourceLocation, ::std::string& resourceStream) const;
97
98 MCFOLD bool $isInStreamableLocation(::ResourceLocation const& resourceLocation) const;
99
100 MCFOLD bool $isInStreamableLocation(
101 ::ResourceLocation const& resourceLocation,
102 ::gsl::span<::std::string const> extensions
103 ) const;
104
105 MCAPI ::Core::PathBuffer<::std::string> $getPath(::ResourceLocation const& resourceLocation) const;
106
107 MCFOLD ::Core::PathBuffer<::std::string>
108 $getPath(::ResourceLocation const& resourceLocation, ::gsl::span<::std::string const> extensions) const;
109
110 MCFOLD ::Core::PathBuffer<::std::string>
111 $getPathContainingResource(::ResourceLocation const& resourceLocation) const;
112
113 MCFOLD ::Core::PathBuffer<::std::string> $getPathContainingResource(
114 ::ResourceLocation const& resourceLocation,
115 ::gsl::span<::std::string const> extensions
116 ) const;
117
118 MCAPI ::std::pair<int, ::std::string_view> $getPackStackIndexOfResource(
119 ::ResourceLocation const& resourceLocation,
120 ::gsl::span<::std::string const> extensions
121 ) const;
122
123
124 // NOLINTEND
125
126public:
127 // vftables
128 // NOLINTBEGIN
129 MCNAPI static void** $vftable();
130 // NOLINTEND
131};
Definition EnableNonOwnerReferences.h:7
Definition LoadedResourceData.h:5
Definition ResourceLoader.h:17
static MCAPI void ** $vftable()
Definition ResourceLocationPair.h:11
Definition ResourceLocation.h:15
Definition Image.h:12