12 class BGSLoadFormBuffer;
13 class BGSSaveFormBuffer;
137 virtual void Revert(BGSLoadFormBuffer* a_buf);
184 std::reference_wrapper<BSReadWriteLock>>;
189 std::reference_wrapper<BSReadWriteLock>>;
197 return form ? form->As<T>() :
nullptr;
206 return form ? form->As<T>() :
nullptr;
211 [[nodiscard]] T* As() noexcept
213 return const_cast<T*
>(
214 static_cast<const TESForm*
>(
this)->As<T>());
219 [[nodiscard]]
const T* As() const noexcept
222 return static_cast<const T*
>(
this);
230 [[nodiscard]]
const T* As() const noexcept;
238 if (!array || array->empty()) {
242 if (a_idx < 0 ||
static_cast<std::uint32_t
>(a_idx) >= array->size()) {
243 return array->
back();
245 return (*array)[a_idx];
261 template <
class... Args>
262 [[nodiscard]]
bool Is(Args... a_args)
const noexcept
263 requires(std::same_as<Args, FormType>&&...)
265 return (
Is(a_args) || ...);
281 template <
class... Args>
282 [[nodiscard]]
bool IsNot(Args... a_args)
const noexcept
283 requires(std::same_as<Args, FormType>&&...)
285 return (
IsNot(a_args) && ...);
303 static_assert(
sizeof(
TESForm) == 0x20);
Definition: BSTArray.h:707
constexpr reference back() noexcept
Definition: BSTArray.h:733
Definition: BSTHashMap.h:21
Definition: TESBoundObject.h:24
TESFileArray * array
Definition: TESForm.h:29
Definition: TESObjectREFR.h:105
Definition: AbsorbEffect.h:6
FormType
Definition: FormTypes.h:139
std::uint32_t FormID
Definition: BSCoreTypes.h:5
constexpr REL::ID RTTI_TESForm
Definition: Offsets_RTTI.h:5995