Event.h 472 Bytes
Newer Older
Alex44098's avatar
Alex44098 committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#pragma once

#include "IEvent.h"
#include "Utilities/TypeIDCounter.h"

namespace GECS {
	namespace Event {
		template<class T>
		class Event : public IEvent {

		public:

			static const type_id EVENT_TYPE_ID;

			Event() {}

			virtual ~Event() {}

			virtual inline const type_id GetEventTypeId() const override {
				return EVENT_TYPE_ID;
			}
		};

		template <class T>
		const type_id Event<T>::EVENT_TYPE_ID = Identifier::TypeIDCounter<IEvent>::GetTypeId<T>();
	}
}