|
- #pragma once
-
- #include <ecs/config.h>
-
- #include "./base.h"
-
- namespace ecs {
- namespace context {
-
- namespace detail
- {
- /**
- * proxy class to make entity, component and system management visible to users of the context
- */
- template<typename T_settings>
- struct defer_proxy_t
- : public base_t<T_settings>
- {
- private:
- using settings_type = T_settings;
- using this_type = defer_proxy_t<settings_type>;
- using base_type = base_t<settings_type>;
-
- protected:
- using context_type = typename base_type::context_type;
-
- public:
- inline defer_proxy_t(context_type& p_context)
- : base_type(p_context)
- { }
-
- public: /* entity */
- ecs_context_proxy_func(this_type, create_entity)
- ecs_context_proxy_func(this_type, kill_entity)
- ecs_context_proxy_func(this_type, is_alive)
- ecs_context_proxy_func(this_type, entity_meta_data)
-
- public: /* component */
- ecs_context_proxy_func(this_type, add_component)
- ecs_context_proxy_func(this_type, has_component)
- ecs_context_proxy_func(this_type, get_component)
- ecs_context_proxy_func(this_type, remove_component)
-
- public: /* system */
- ecs_context_proxy_func(this_type, system_by_tag)
- ecs_context_proxy_func(this_type, system_by_index)
- ecs_context_proxy_func(this_type, instance_by_tag)
- ecs_context_proxy_func(this_type, instance_by_index)
- };
- }
-
- } }
|