Browse Source

emitter: reintroduced type_id for the internal pool

Michele Caini 6 years ago
parent
commit
08169b9180
1 changed files with 5 additions and 0 deletions
  1. 5 0
      src/entt/signal/emitter.hpp

+ 5 - 0
src/entt/signal/emitter.hpp

@@ -45,6 +45,7 @@ class emitter {
         virtual ~basic_pool() = default;
         virtual ~basic_pool() = default;
         virtual bool empty() const ENTT_NOEXCEPT = 0;
         virtual bool empty() const ENTT_NOEXCEPT = 0;
         virtual void clear() ENTT_NOEXCEPT = 0;
         virtual void clear() ENTT_NOEXCEPT = 0;
+        virtual id_type type_id() const ENTT_NOEXCEPT = 0;
     };
     };
 
 
     template<typename Event>
     template<typename Event>
@@ -113,6 +114,10 @@ class emitter {
             on_list.remove_if([](auto &&element) { return element.first; });
             on_list.remove_if([](auto &&element) { return element.first; });
         }
         }
 
 
+        id_type type_id() const ENTT_NOEXCEPT override {
+            return type_info<Event>::id();
+        }
+
     private:
     private:
         bool publishing{false};
         bool publishing{false};
         container_type once_list{};
         container_type once_list{};