GUI
Event.cpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2017 by Maciej Wiecierzewski
3  */
4 
5 #include "Event.h"
6 
7 using namespace gui;
8 
10  type(EventType::NONE),
11  obj(NULL)
12 {
13 }
14 
16  type(eventType),
17  obj(obj)
18 {
19 }
20 
22 {
23  type = other.type;
24  obj = other.obj;
25 
26  other.obj = NULL;
27  other.type = EventType::NONE;
28 }
29 
31 {
32  type = other.type;
33  obj = other.obj;
34 
35  other.obj = NULL;
36  other.type = EventType::NONE;
37 
38  return *this;
39 }
40 
42 {
43  if(obj != NULL)
44  delete obj;
45 }