LeviLamina
Loading...
Searching...
No Matches
WeakStorageEntity.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4#include "mc/deps/ecs/gamerefs_entity/StackResultStorageEntity.h"
5
6// auto generated inclusion list
7#include "mc/deps/ecs/EntityId.h"
8#include "mc/deps/game_refs/WeakRef.h"
9
10// auto generated forward declare list
11// clang-format off
12class EntityRegistry;
13// clang-format on
14
15class Actor;
16
17class WeakStorageEntity {
18public:
19 // member variables
20 // NOLINTBEGIN
22 ::EntityId mEntity;
23 // NOLINTEND
24
25public:
26 template <class Entity = Actor, bool IncludeRemoved = false>
27 [[nodiscard]] optional_ref<Entity> tryUnwrap() const {
28 return StackResultStorageEntity(*this).tryUnwrap<Entity, IncludeRemoved>();
29 }
30
31 WeakStorageEntity() = default;
32 WeakStorageEntity(::WeakStorageEntity&&) = default;
33 WeakStorageEntity(::WeakStorageEntity const&) = default;
34 WeakStorageEntity& operator=(::WeakStorageEntity&&) = default;
35 WeakStorageEntity& operator=(::WeakStorageEntity const&) = default;
36};
Definition Actor.h:123
Definition EntityId.h:13
Definition EntityRegistry.h:11
Definition StackResultStorageEntity.h:16
Definition WeakRef.h:8
Definition optional_ref.h:10