13 class BGSLoadFormBuffer;
14 class BGSSaveFormBuffer;
186 return func(a_id, a_file);
192 std::reference_wrapper<BSReadWriteLock>>
196 return { *allForms, std::ref(*allFormsMapLock) };
202 std::reference_wrapper<BSReadWriteLock>>
206 return { *allFormsByEditorID, std::ref(*allFormsEditorIDMapLock) };
214 const auto it = map->find(a_formID);
215 return it != map->end() ? it->second :
nullptr;
225 return form ? form->As<T>() :
nullptr;
233 const auto it = map->find(a_editorID);
234 return it != map->end() ? it->second :
nullptr;
244 return form ? form->As<T>() :
nullptr;
249 class = std::enable_if_t<
253 std::is_reference<T>,
255 std::is_volatile<T>>>>>
256 [[nodiscard]] T*
As() noexcept;
260 class =
std::enable_if_t<
264 std::is_reference<T>,
266 std::is_volatile<T>>>>>
267 [[nodiscard]] const T*
As() const noexcept;
275 if (!array || array->empty()) {
279 if (a_idx < 0 ||
static_cast<std::uint32_t
>(a_idx) >= array->size()) {
280 return array->
back();
282 return (*array)[a_idx];
296 RE::FormID fileIndex = file->compileIndex << (3 * 8);
297 fileIndex += file->smallFileCompileIndex << ((1 * 8) + 4);
299 return formID & ~fileIndex;
304 [[nodiscard]]
bool HasKeywordInArray(
const std::vector<BGSKeyword*>& a_keywords,
bool a_matchAll)
const;
312 template <
class... Args>
313 [[nodiscard]]
bool Is(Args... a_args)
const noexcept
314 requires(std::same_as<Args, FormType>&&...)
316 return (
Is(a_args) || ...);
333 template <
class... Args>
334 [[nodiscard]]
bool IsNot(Args... a_args)
const noexcept
335 requires(std::same_as<Args, FormType>&&...)
337 return (
IsNot(a_args) && ...);
355 static_assert(
sizeof(
TESForm) == 0x20);
#define RELOCATION_ID(a_se, a_ae)
Definition PCH.h:794
Definition BSTArray.h:656
constexpr reference back() noexcept
Definition BSTArray.h:682
Definition BSTHashMap.h:21
Definition TESBoundObject.h:24
TESFileArray * array
Definition TESForm.h:30
Definition TESObjectREFR.h:112
Definition Relocation.h:1638
Definition AbsorbEffect.h:6
FormType
Definition FormTypes.h:139
std::uint32_t FormID
Definition BSCoreTypes.h:5
constexpr REL::VariantID RTTI_TESForm(513848, 392216, 0x1ed6d20)
Definition ActorValueList.h:28