12 class BGSLoadFormBuffer;
13 class BGSSaveFormBuffer;
137 virtual void Revert(BGSLoadFormBuffer* a_buf);
183 return func(a_id, a_file);
189 std::reference_wrapper<BSReadWriteLock>>
193 return { *allForms, std::ref(*allFormsMapLock) };
199 std::reference_wrapper<BSReadWriteLock>>
203 return { *allFormsByEditorID, std::ref(*allFormsEditorIDMapLock) };
211 const auto it = map->find(a_formID);
212 return it != map->end() ? it->second :
nullptr;
222 return form ? form->As<T>() :
nullptr;
230 const auto it = map->find(a_editorID);
231 return it != map->end() ? it->second :
nullptr;
241 return form ? form->As<T>() :
nullptr;
246 class = std::enable_if_t<
250 std::is_reference<T>,
252 std::is_volatile<T>>>>>
253 [[nodiscard]] T*
As() noexcept;
257 class =
std::enable_if_t<
261 std::is_reference<T>,
263 std::is_volatile<T>>>>>
264 [[nodiscard]] const T*
As() const noexcept;
272 if (!array || array->empty()) {
276 if (a_idx < 0 ||
static_cast<std::uint32_t
>(a_idx) >= array->size()) {
277 return array->
back();
279 return (*array)[a_idx];
295 template <
class... Args>
296 [[nodiscard]]
bool Is(Args... a_args)
const noexcept
297 requires(std::same_as<Args, FormType>&&...)
299 return (
Is(a_args) || ...);
315 template <
class... Args>
316 [[nodiscard]]
bool IsNot(Args... a_args)
const noexcept
317 requires(std::same_as<Args, FormType>&&...)
319 return (
IsNot(a_args) && ...);
337 static_assert(
sizeof(
TESForm) == 0x20);
Definition: Relocation.h:841
Definition: Relocation.h:867
Definition: BSAtomic.h:69
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:29
Definition: TESObjectREFR.h:103
Definition: AbsorbEffect.h:6
constexpr REL::ID RTTI_TESForm
Definition: Offsets_RTTI.h:5995
FormType
Definition: FormTypes.h:139
std::uint32_t FormID
Definition: BSCoreTypes.h:5
requires(std::invocable< std::remove_reference_t< EF >>) class scope_exit
Definition: PCH.h:148
Definition: NiBinaryStream.h:94