Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
LinkedAssetValidator.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/threading/BasicLockbox.h"
7#include "mc/deps/core/utility/EnableNonOwnerReferences.h"
8
9class LinkedAssetValidator : public ::Bedrock::EnableNonOwnerReferences {
10public:
11 // LinkedAssetValidator inner types declare
12 // clang-format off
13 struct KnownObject;
14 struct KnownObjectHasher;
15 struct Reference;
16 struct AssetCollection;
17 // clang-format on
18
19 // LinkedAssetValidator inner types define
20 enum class ValidatorStatus : uchar {
21 New = 0,
22 Loaded = 1,
23 Validated = 2,
24 };
25
26 struct KnownObject {
27 public:
28 // member variables
29 // NOLINTBEGIN
30 ::ll::TypedStorage<4, 4, int> mAssetType;
31 ::ll::TypedStorage<8, 32, ::std::string> mIdentifier;
32 // NOLINTEND
33 };
34
36
37 struct Reference {
38 public:
39 // member variables
40 // NOLINTBEGIN
41 ::ll::TypedStorage<4, 4, int> mAssetType;
42 ::ll::TypedStorage<8, 32, ::std::string> mIdentifier;
43 ::ll::TypedStorage<8, 32, ::std::string> mReferencedFromContext;
44 // NOLINTEND
45 };
46
48 public:
49 // member variables
50 // NOLINTBEGIN
51 ::ll::TypedStorage<1, 1, bool> mIsClientAssetCollection;
52 ::ll::TypedStorage<8, 24, ::std::vector<::LinkedAssetValidator::Reference>> mAssetReferences;
53 ::ll::TypedStorage<8, 24, ::std::vector<::LinkedAssetValidator::Reference>> mFileReferences;
54 ::ll::TypedStorage<
55 8,
56 64,
57 ::std::unordered_set<
60 ::std::equal_to<::LinkedAssetValidator::KnownObject>>>
61 mAllIdentifiers;
62 ::ll::TypedStorage<
63 8,
64 64,
65 ::std::unordered_set<
68 ::std::equal_to<::LinkedAssetValidator::KnownObject>>>
69 mAllFiles;
70 // NOLINTEND
71 };
72
73public:
74 // member variables
75 // NOLINTBEGIN
76 ::ll::TypedStorage<
77 8,
78 104,
79 ::Bedrock::Threading::
80 BasicLockbox<::std::vector<::std::shared_ptr<::LinkedAssetValidator::AssetCollection>>, ::std::mutex>>
81 mAllAssetCollections;
82 ::ll::TypedStorage<1, 1, ::std::atomic<::LinkedAssetValidator::ValidatorStatus>> mIsLoadingReferences;
83 ::ll::TypedStorage<1, 1, bool const> mIsClient;
84 // NOLINTEND
85
86public:
87 // prevent constructor by default
88 LinkedAssetValidator();
89
90public:
91 // virtual functions
92 // NOLINTBEGIN
93 virtual ~LinkedAssetValidator() /*override*/;
94 // NOLINTEND
95
96public:
97 // member functions
98 // NOLINTBEGIN
99 MCNAPI explicit LinkedAssetValidator(bool isClient);
100
102
103#ifdef LL_PLAT_C
104 MCNAPI void addFile(int assetType, ::std::string const& filepath);
105#endif
106
107 MCNAPI void addFileReference(int assetType, ::std::string const& filepath, ::std::string contextString);
108
109 MCNAPI void addIdentifier(int assetType, ::std::string const& identifier);
110
111 MCNAPI void addReference(int assetType, ::std::string const& identifier, ::std::string contextString);
112
113 MCNAPI void reset();
114
115#ifdef LL_PLAT_C
116 MCNAPI ::std::vector<::std::string> validateLinkedAssets();
117#endif
118 // NOLINTEND
119
120public:
121 // static variables
122 // NOLINTBEGIN
123 MCNAPI static ::std::weak_ptr<::LinkedAssetValidator::AssetCollection>& mPerThreadAssetCollection();
124 // NOLINTEND
125
126public:
127 // constructor thunks
128 // NOLINTBEGIN
129 MCNAPI void* $ctor(bool isClient);
130 // NOLINTEND
131
132public:
133 // destructor thunk
134 // NOLINTBEGIN
135 MCNAPI void $dtor();
136 // NOLINTEND
137
138public:
139 // vftables
140 // NOLINTBEGIN
141 MCNAPI static void** $vftable();
142 // NOLINTEND
143};
Definition EnableNonOwnerReferences.h:7
MCAPI void addReference(int assetType, ::std::string const &identifier, ::std::string contextString)
static MCAPI void ** $vftable()
MCAPI void reset()
MCAPI void _initThreadAssetCollection()
MCAPI void * $ctor(bool isClient)
MCAPI LinkedAssetValidator(bool isClient)
MCAPI void addFileReference(int assetType, ::std::string const &filepath, ::std::string contextString)
MCAPI void $dtor()
MCAPI void addIdentifier(int assetType, ::std::string const &identifier)
static MCAPI ::std::weak_ptr<::LinkedAssetValidator::AssetCollection > & mPerThreadAssetCollection()
Definition LinkedAssetValidator.h:47
Definition LinkedAssetValidator.h:35
Definition LinkedAssetValidator.h:26
Definition LinkedAssetValidator.h:37