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&, ::std::string&) const = 0;
34
35 virtual bool load(::ResourceLocation const&, ::std::string&, ::gsl::span<::std::string const>) const = 0;
36
37 virtual bool load(
38 ::ResourceLocationPair const& resourceLocation,
39 ::std::string& resourceStream,
40 ::gsl::span<::std::string const> extensions
41 ) const;
42
43 virtual bool loadText(::ResourceLocation const& resourceLocation, ::std::string& resourceStream) const;
44
45 virtual ::std::vector<::LoadedResourceData> loadAllVersionsOf(::ResourceLocation const&) const = 0;
46
47#ifdef LL_PLAT_C
48 virtual ::mce::Image loadTexture(::ResourceLocation const&) const = 0;
49
50#endif
51 virtual bool isInStreamableLocation(::ResourceLocation const& resourceLocation) const;
52
53 virtual bool isInStreamableLocation(
54 ::ResourceLocation const& resourceLocation,
55 ::gsl::span<::std::string const> extensions
56 ) const;
57
58 virtual ::Core::PathBuffer<::std::string> getPath(::ResourceLocation const& resourceLocation) const;
59
60 virtual ::Core::PathBuffer<::std::string>
61 getPath(::ResourceLocation const& resourceLocation, ::gsl::span<::std::string const> extensions) const;
62
63 virtual ::Core::PathBuffer<::std::string>
64 getPathContainingResource(::ResourceLocation const& resourceLocation) const;
65
66 virtual ::Core::PathBuffer<::std::string> getPathContainingResource(
67 ::ResourceLocation const& resourceLocation,
68 ::gsl::span<::std::string const> extensions
69 ) const;
70
71 virtual ::std::pair<int, ::std::string_view> getPackStackIndexOfResource(
72 ::ResourceLocation const& resourceLocation,
73 ::gsl::span<::std::string const> extensions
74 ) const;
75 // NOLINTEND
76
77public:
78 // destructor thunk
79 // NOLINTBEGIN
80 MCFOLD void $dtor();
81 // NOLINTEND
82
83public:
84 // virtual function thunks
85 // NOLINTBEGIN
86 MCFOLD bool $load(
87 ::ResourceLocationPair const& resourceLocation,
88 ::std::string& resourceStream,
89 ::gsl::span<::std::string const> extensions
90 ) const;
91
92 MCFOLD bool $loadText(::ResourceLocation const& resourceLocation, ::std::string& resourceStream) const;
93
94 MCFOLD bool $isInStreamableLocation(::ResourceLocation const& resourceLocation) const;
95
96 MCFOLD bool $isInStreamableLocation(
97 ::ResourceLocation const& resourceLocation,
98 ::gsl::span<::std::string const> extensions
99 ) const;
100
101 MCAPI ::Core::PathBuffer<::std::string> $getPath(::ResourceLocation const& resourceLocation) const;
102
103 MCFOLD ::Core::PathBuffer<::std::string>
104 $getPath(::ResourceLocation const& resourceLocation, ::gsl::span<::std::string const> extensions) const;
105
106 MCFOLD ::Core::PathBuffer<::std::string>
107 $getPathContainingResource(::ResourceLocation const& resourceLocation) const;
108
109 MCFOLD ::Core::PathBuffer<::std::string> $getPathContainingResource(
110 ::ResourceLocation const& resourceLocation,
111 ::gsl::span<::std::string const> extensions
112 ) const;
113
114 MCAPI ::std::pair<int, ::std::string_view> $getPackStackIndexOfResource(
115 ::ResourceLocation const& resourceLocation,
116 ::gsl::span<::std::string const> extensions
117 ) const;
118
119
120 // NOLINTEND
121
122public:
123 // vftables
124 // NOLINTBEGIN
125 MCNAPI static void** $vftable();
126 // NOLINTEND
127};
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