|
1 | | -#pragma once |
2 | | - |
3 | | -#include <vector> |
4 | | -#include <unordered_map> |
5 | | -#include <cassert> |
6 | | -#include <span> |
7 | | -#include <type_traits> |
8 | | -#include "ecsact/runtime/common.h" |
9 | | -#include "ecsact/runtime/core.h" |
10 | | -#include "entt/entity/registry.hpp" |
11 | | -#include "ecsact/entt/entity.hh" |
12 | | - |
13 | | -namespace ecsact::entt::detail { |
14 | | -template<typename> |
15 | | -constexpr bool error_check_unimplemented_by_codegen = false; |
16 | | -} |
17 | | - |
18 | | -namespace ecsact::entt { |
19 | | - |
20 | | -template<typename C> |
21 | | -auto check_add_component_error( // |
22 | | - ::entt::registry&, |
23 | | - ::ecsact::entt::entity_id, |
24 | | - const C& |
25 | | -) -> ecsact_add_error { |
26 | | - static_assert(detail::error_check_unimplemented_by_codegen<C>, R"( |
27 | | - ----------------------------------------------------------------------------- |
28 | | -| (!) CODEGEN ERROR | |
29 | | -| `check_add_component_error<>` template specialization cannot be found. This | |
30 | | -| is typically generated by ecsact_rt_entt_codegen. | |
31 | | - ----------------------------------------------------------------------------- |
32 | | -)"); |
33 | | -} |
34 | | - |
35 | | -template<typename C> |
36 | | -auto check_update_component_error( // |
37 | | - ::entt::registry&, |
38 | | - ::ecsact::entt::entity_id, |
39 | | - const C& |
40 | | -) -> ecsact_update_error { |
41 | | - static_assert(detail::error_check_unimplemented_by_codegen<C>, R"( |
42 | | - ----------------------------------------------------------------------------- |
43 | | -| (!) CODEGEN ERROR | |
44 | | -| `check_update_component_error<>` template specialization cannot be found. | |
45 | | -| This is typically generated by ecsact_rt_entt_codegen. | |
46 | | - ----------------------------------------------------------------------------- |
47 | | -)"); |
48 | | -} |
49 | | - |
50 | | -template<typename A> |
51 | | -auto check_action_error( // |
52 | | - ::entt::registry&, |
53 | | - const A& |
54 | | -) -> ecsact_execute_systems_error { |
55 | | - static_assert(detail::error_check_unimplemented_by_codegen<A>, R"( |
56 | | - ----------------------------------------------------------------------------- |
57 | | -| (!) CODEGEN ERROR | |
58 | | -| `check_action_error<>` template specialization cannot be found. | |
59 | | -| This is typically generated by ecsact_rt_entt_codegen. | |
60 | | - ----------------------------------------------------------------------------- |
61 | | -)"); |
62 | | -} |
63 | | - |
64 | | -} // namespace ecsact::entt |
| 1 | +#pragma once |
| 2 | + |
| 3 | +#include <vector> |
| 4 | +#include <unordered_map> |
| 5 | +#include <cassert> |
| 6 | +#include <span> |
| 7 | +#include <type_traits> |
| 8 | +#include "ecsact/runtime/common.h" |
| 9 | +#include "ecsact/runtime/core.h" |
| 10 | +#include "entt/entity/registry.hpp" |
| 11 | +#include "ecsact/entt/entity.hh" |
| 12 | + |
| 13 | +namespace ecsact::entt::detail { |
| 14 | +template<typename> |
| 15 | +constexpr bool error_check_unimplemented_by_codegen = false; |
| 16 | +} |
| 17 | + |
| 18 | +namespace ecsact::entt { |
| 19 | + |
| 20 | +template<typename C> |
| 21 | +auto check_add_component_error( // |
| 22 | + ::entt::registry&, |
| 23 | + ::ecsact::entt::entity_id, |
| 24 | + const C& |
| 25 | +) -> ecsact_add_error { |
| 26 | + static_assert(detail::error_check_unimplemented_by_codegen<C>, R"( |
| 27 | + ----------------------------------------------------------------------------- |
| 28 | +| (!) CODEGEN ERROR | |
| 29 | +| `check_add_component_error<>` template specialization cannot be found. This | |
| 30 | +| is typically generated by ecsact_rt_entt_codegen. | |
| 31 | + ----------------------------------------------------------------------------- |
| 32 | +)"); |
| 33 | +} |
| 34 | + |
| 35 | +template<typename C> |
| 36 | +auto check_update_component_error( // |
| 37 | + ::entt::registry&, |
| 38 | + ::ecsact::entt::entity_id, |
| 39 | + const C& |
| 40 | +) -> ecsact_update_error { |
| 41 | + static_assert(detail::error_check_unimplemented_by_codegen<C>, R"( |
| 42 | + ----------------------------------------------------------------------------- |
| 43 | +| (!) CODEGEN ERROR | |
| 44 | +| `check_update_component_error<>` template specialization cannot be found. | |
| 45 | +| This is typically generated by ecsact_rt_entt_codegen. | |
| 46 | + ----------------------------------------------------------------------------- |
| 47 | +)"); |
| 48 | +} |
| 49 | + |
| 50 | +template<typename A> |
| 51 | +auto check_action_error( // |
| 52 | + ::entt::registry&, |
| 53 | + const A& |
| 54 | +) -> ecsact_execute_systems_error { |
| 55 | + static_assert(detail::error_check_unimplemented_by_codegen<A>, R"( |
| 56 | + ----------------------------------------------------------------------------- |
| 57 | +| (!) CODEGEN ERROR | |
| 58 | +| `check_action_error<>` template specialization cannot be found. | |
| 59 | +| This is typically generated by ecsact_rt_entt_codegen. | |
| 60 | + ----------------------------------------------------------------------------- |
| 61 | +)"); |
| 62 | +} |
| 63 | + |
| 64 | +} // namespace ecsact::entt |
0 commit comments