Divide Framework 0.1
A free and open-source 3D Framework under heavy development
Loading...
Searching...
No Matches
Event.h
Go to the documentation of this file.
1/*
2 Author : Tobias Stein
3 Date : 6th July, 2016
4 File : Event.h
5
6 Event class.
7
8 All Rights Reserved. (c) Copyright 2016.
9*/
10
11#pragma once
12#ifndef ECS__EVENT_H__
13#define ECS__EVENT_H__
14
15#include "Event/IEvent.h"
16
17#include "util/FamilyTypeID.h"
18
19namespace ECS { namespace Event {
20
21 template<class T>
22 class Event : public IEvent
23 {
24 public:
25
26 // note: wont be part of stored event memory DATA
28
29 Event(ECSEngine* engine, ECS::EntityId sourceEntityID)
30 : IEvent(engine, sourceEntityID, STATIC_EVENT_TYPE_ID)
31 {}
32
33 }; // class Event<T>
34
35 template<class T>
36 const EventTypeId Event<T>::STATIC_EVENT_TYPE_ID { typeid(T).hash_code() };
37
38}} // namespace ECS::Event
39
40#endif // ECS__EVENT_H__
Event(ECSEngine *engine, ECS::EntityId sourceEntityID)
Definition: Event.h:29
static const EventTypeId STATIC_EVENT_TYPE_ID
Definition: Event.h:27
TypeID EventTypeId
Definition: IEvent.h:22