openMSX
Main Page
Namespaces
Classes
Files
File List
File Members
events
Event.cc
Go to the documentation of this file.
1
#include "
Event.hh
"
2
#include "
TclObject.hh
"
3
4
namespace
openmsx {
5
6
// class Event
7
8
Event::Event
(
EventType
type_)
9
: type(type_)
10
{
11
}
12
13
Event::~Event
()
14
{
15
}
16
17
EventType
Event::getType
()
const
18
{
19
return
type;
20
}
21
22
std::string
Event::toString
()
const
23
{
24
TclObject
result;
25
toStringImpl(result);
26
return
result.
getString
().
str
();
27
}
28
29
bool
Event::operator<
(
const
Event
& other)
const
30
{
31
return
(
getType
() != other.
getType
())
32
? (
getType
() < other.
getType
())
33
: lessImpl(other);
34
}
35
36
bool
Event::operator==
(
const
Event
& other)
const
37
{
38
return
!(*
this
< other) && !(other < *
this
);
39
}
40
bool
Event::operator!=
(
const
Event
& other)
const
41
{
42
return
!(*
this
== other);
43
}
44
45
void
SimpleEvent::toStringImpl
(
TclObject
& result)
const
46
{
47
result.
addListElement
(
"simple"
);
48
result.
addListElement
(
int
(
getType
()));
49
}
50
51
bool
SimpleEvent::lessImpl
(
const
Event
&
/*other*/
)
const
52
{
53
return
false
;
54
}
55
56
}
// namespace openmsx
Generated on Mon May 20 2013 12:16:57 for openMSX by
1.8.1.2