LeviLamina
Loading...
Searching...
No Matches
LifetimeRegistry.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated forward declare list
6// clang-format off
7namespace Scripting { class ILifetimeObjectListener; }
8namespace Scripting { class ILifetimeScopeListener; }
9namespace Scripting { class IScriptRef; }
10namespace Scripting { class LifetimeRegistryReference; }
11namespace Scripting { struct ContextId; }
12namespace Scripting { struct ObjectHandle; }
13namespace Scripting::internal { struct BaseScriptComponent; }
14// clang-format on
15
16namespace Scripting {
17
18class LifetimeRegistry {
19public:
20 // member variables
21 // NOLINTBEGIN
30 // NOLINTEND
31
32public:
33 // prevent constructor by default
34 LifetimeRegistry& operator=(LifetimeRegistry const&);
35 LifetimeRegistry(LifetimeRegistry const&);
36 LifetimeRegistry();
37
38public:
39 // member functions
40 // NOLINTBEGIN
42
43 MCNAPI ::Scripting::ObjectHandle _createBaseObject(::Scripting::internal::BaseScriptComponent&& baseScriptComp);
44
45 MCNAPI void
47
48 MCNAPI bool _doTypesMatch(::Scripting::ObjectHandle handle, ::entt::meta_type const& expectedType);
49
50 MCNAPI void addObjectListener(::std::weak_ptr<::Scripting::ILifetimeObjectListener> objectListener);
51
53
54 MCNAPI void destroyLifetimeScope(bool);
55
56 MCNAPI ::Scripting::IScriptRef* getScriptRef(::Scripting::ObjectHandle handle);
57
58 MCNAPI void removeObjectListener(::std::shared_ptr<::Scripting::ILifetimeObjectListener> strongListener);
59
61
62 MCNAPI ::entt::meta_any resolveAsAny(::Scripting::ObjectHandle handle);
63
65
67
69
70 MCNAPI ::entt::meta_type const& resolvedType(::Scripting::ObjectHandle handle);
71
72 MCNAPI void setScopeListener(::std::weak_ptr<::Scripting::ILifetimeScopeListener> scopeListener);
73
74 MCNAPI void setScriptRef(::Scripting::ObjectHandle handle, ::std::unique_ptr<::Scripting::IScriptRef>&& scriptRef);
75
76 MCNAPI bool valid(::Scripting::ObjectHandle const& handle);
77
79 // NOLINTEND
80
81public:
82 // constructor thunks
83 // NOLINTBEGIN
85 // NOLINTEND
86
87public:
88 // destructor thunk
89 // NOLINTBEGIN
90 MCNAPI void $dtor();
91 // NOLINTEND
92};
93
94} // namespace Scripting
Definition ILifetimeObjectListener.h:13
Definition ILifetimeScopeListener.h:12
Definition IScriptRef.h:7
Definition LifetimeRegistryReference.h:7
MCAPI bool valid(::Scripting::ObjectHandle const &handle)
MCAPI bool removeReference(::Scripting::ObjectHandle handle)
MCAPI bool _doTypesMatch(::Scripting::ObjectHandle handle, ::entt::meta_type const &expectedType)
MCAPI::entt::meta_type const & resolvedType(::Scripting::ObjectHandle handle)
MCAPI::entt::meta_any resolveAsStrongTypedObjectHandle(::Scripting::ObjectHandle handle)
MCAPI void destroyLifetimeScope(bool)
MCAPI LifetimeRegistry(::Scripting::ContextId contextId, ::Scripting::LifetimeRegistryReference &registryRef)
MCAPI void removeObjectListener(::std::shared_ptr<::Scripting::ILifetimeObjectListener > strongListener)
MCAPI::Scripting::IScriptRef * getScriptRef(::Scripting::ObjectHandle handle)
MCAPI::entt::meta_any resolveAsTypedObjectHandle(::Scripting::ObjectHandle handle)
MCAPI void setScopeListener(::std::weak_ptr<::Scripting::ILifetimeScopeListener > scopeListener)
MCAPI void _destroyObject(::Scripting::ObjectHandle handle, ::Scripting::internal::BaseScriptComponent &baseScriptComp)
MCAPI void addObjectListener(::std::weak_ptr<::Scripting::ILifetimeObjectListener > objectListener)
MCAPI::Scripting::ObjectHandle _createBaseObject(::Scripting::internal::BaseScriptComponent &&baseScriptComp)
MCAPI void setScriptRef(::Scripting::ObjectHandle handle, ::std::unique_ptr<::Scripting::IScriptRef > &&scriptRef)
MCAPI void * $ctor(::Scripting::ContextId contextId, ::Scripting::LifetimeRegistryReference &registryRef)
MCAPI void addReference(::Scripting::ObjectHandle handle)
MCAPI::entt::meta_any resolveAsWeakTypedObjectHandle(::Scripting::ObjectHandle handle)
MCAPI::entt::meta_any resolveAsAny(::Scripting::ObjectHandle handle)
Definition ContextId.h:7
Definition ObjectHandle.h:15
Definition BaseScriptComponent.h:7
Definition Alias.h:14