Grindstone Game Engine v0.2.0
An open source game engine and toolkit.
Loading...
Searching...
No Matches
ComponentFunctions.hpp
1#pragma once
2
3#include <entt/entt.hpp>
4#include "EngineCore/ECS/Entity.hpp"
5#include "EngineCore/Reflection/TypeDescriptorStruct.hpp"
6using namespace Grindstone;
7
8namespace Grindstone {
9 namespace ECS {
10 using SetupComponentFn = void(*)(entt::registry&, entt::entity);
11 using DestroyComponentFn = void(*)(entt::registry&, entt::entity);
12 using GetComponentReflectionDataFn = Grindstone::Reflection::TypeDescriptor_Struct(*)();
13 using TryGetComponentFn = bool(*)(entt::registry&, entt::entity, void*& outEntity);
14 using HasComponentFn = bool(*)(entt::registry&, entt::entity);
15 using CreateComponentFn = void*(*)(entt::registry&, entt::entity);
16 using RemoveComponentFn = void(*)(entt::registry&, entt::entity);
17 using CopyRegistryComponentsFn = void(*)(entt::registry& dst, entt::registry& src);
18
20 public:
21 SetupComponentFn SetupComponentFn = nullptr;
22 DestroyComponentFn DestroyComponentFn = nullptr;
23 CreateComponentFn CreateComponentFn = nullptr;
24 RemoveComponentFn RemoveComponentFn = nullptr;
25 HasComponentFn HasComponentFn = nullptr;
26 TryGetComponentFn TryGetComponentFn = nullptr;
27 GetComponentReflectionDataFn GetComponentReflectionDataFn = nullptr;
28 CopyRegistryComponentsFn CopyRegistryComponentsFn = nullptr;
29 };
30 }
31}
Definition ComponentFunctions.hpp:19
Definition TypeDescriptorStruct.hpp:9