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;
14// clang-format on
15
16class Actor;
17
18class WeakStorageEntity {
19public:
20 // member variables
21 // NOLINTBEGIN
23 ::EntityId mEntity;
24 // NOLINTEND
25
26public:
27 template <class Entity = Actor, bool IncludeRemoved = false>
28 [[nodiscard]] optional_ref<Entity> tryUnwrap() const {
29 return StackResultStorageEntity(*this).tryUnwrap<Entity, IncludeRemoved>();
30 }
31
32 WeakStorageEntity() = default;
33 WeakStorageEntity(::WeakStorageEntity&&) = default;
34 WeakStorageEntity(::WeakStorageEntity const&) = default;
35 WeakStorageEntity& operator=(::WeakStorageEntity&&) = default;
36 WeakStorageEntity& operator=(::WeakStorageEntity const&) = default;
37};
Definition Actor.h:113
Definition EntityId.h:27
Definition EntityRegistry.h:10
Definition OwnerStorageEntity.h:10
Definition StackResultStorageEntity.h:15
Definition WeakRef.h:8
Definition optional_ref.h:10