-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEvent.cpp
More file actions
49 lines (39 loc) · 668 Bytes
/
Copy pathEvent.cpp
File metadata and controls
49 lines (39 loc) · 668 Bytes
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
*
* Author: eric
*/
#include "Event.hpp"
#include <iostream>
#include <sstream>
Event::Event( const unsigned char aValue):value(aValue)
{
}
Event::Event( const Event& e): value(e.value)
{
}
std::string Event::ToString() const
{
std::ostringstream stream;
stream <<(int)value;
return stream.str();;
}
Event::~Event()
{
// TODO Auto-generated destructor stub
}
const unsigned char& Event::getValue() const
{
return value;
}
void Event::setValue( const unsigned char value)
{
this->value = value;
}
bool Event::operator ==( Event aEvent)
{
return value == aEvent.value;
}
bool Event::operator ==( unsigned char aValue)
{
return value == aValue;
}