-
Notifications
You must be signed in to change notification settings - Fork 6
/
logevent.cpp
90 lines (73 loc) · 2.11 KB
/
logevent.cpp
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#include "logevent.h"
#include <QMap>
namespace Yate {
LogEvent::LogEvent(int eId, LogEventType eType, float eTimestamp, int eValue, QString eStrVal):id_(eId), type_(eType), timestamp_(eTimestamp), value_(eValue), strValue_(eStrVal)
{
}
int LogEvent::id() const
{
return id_;
}
void LogEvent::setId(int newId)
{
id_ = newId;
}
LogEventType LogEvent::type() const
{
return type_;
}
void LogEvent::setType(LogEventType newType)
{
type_ = newType;
}
float LogEvent::timestamp() const
{
return timestamp_;
}
void LogEvent::setTimestamp(float newTimestamp)
{
timestamp_ = newTimestamp;
}
int LogEvent::value() const
{
return value_;
}
void LogEvent::setValue(int newValue)
{
value_ = newValue;
}
const QString &LogEvent::strValue() const
{
return strValue_;
}
void LogEvent::setStrValue(const QString &newStrValue)
{
strValue_ = newStrValue;
}
QString LogEvent::typeName() const
{
static QMap<LogEventType, QString> logEvtTypName{
{LogEventType::NightBegin, "NightBegin"},
{LogEventType::DayBegin, "DayBegin"},
{LogEventType::TeralystSpawn, "TeralystSpawn"},
{LogEventType::LimbBreak, "LimbBreak"},
{LogEventType::EidolonCapture, "EidolonCapture"},
{LogEventType::EidolonKill, "EidolonKill"},
{LogEventType::LootDrop, "LootDrop"},
{LogEventType::ShrineEnable, "ShrineEnable"},
{LogEventType::ShardInsert, "ShardInsert"},
{LogEventType::ShardRemove, "ShardRemove"},
{LogEventType::ShrineDisable, "ShrineDisable"},
{LogEventType::EidolonSpawn, "EidolonSpawn"},
{LogEventType::EidolonTeleport, "EidolonTeleported"},
{LogEventType::HostJoin, "HostJoin"},
{LogEventType::SquadJoin, "SquadJoin"},
{LogEventType::HostUnload, "HostUnload"},
{LogEventType::EidolonDespawn, "EidolonDespawn"},
{LogEventType::DoorOpening, "DoorOpening"},
{LogEventType::DoorOpened, "DoorOpened"},
{LogEventType::Invalid, "Invalid"}
};
return logEvtTypName.value(type_, "Invalid");
}
}