-
Notifications
You must be signed in to change notification settings - Fork 3
/
utilEventLog.angelscript
45 lines (40 loc) · 1.29 KB
/
utilEventLog.angelscript
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
void logEvent(const string &in event)
{
const string str = "flurry " + event;
ForwardCommand(str);
#if TESTING
print(str);
#endif
}
void logEvent(const string &in event, EventDataPair@ dataPair0, EventDataPair@ dataPair1, EventDataPair@ dataPair2, EventDataPair@ dataPair3)
{
logEvent(event + " " + dataPair0.m_tag + ":" + dataPair0.m_value
+ " " + dataPair1.m_tag + ":" + dataPair1.m_value
+ " " + dataPair2.m_tag + ":" + dataPair2.m_value
+ " " + dataPair3.m_tag + ":" + dataPair3.m_value);
}
void logEvent(const string &in event, EventDataPair@ dataPair0, EventDataPair@ dataPair1, EventDataPair@ dataPair2)
{
logEvent(event + " " + dataPair0.m_tag + ":" + dataPair0.m_value
+ " " + dataPair1.m_tag + ":" + dataPair1.m_value
+ " " + dataPair2.m_tag + ":" + dataPair2.m_value);
}
void logEvent(const string &in event, EventDataPair@ dataPair0, EventDataPair@ dataPair1)
{
logEvent(event + " " + dataPair0.m_tag + ":" + dataPair0.m_value
+ " " + dataPair1.m_tag + ":" + dataPair1.m_value);
}
void logEvent(const string &in event, EventDataPair@ dataPair)
{
logEvent(event + " " + dataPair.m_tag + ":" + dataPair.m_value);
}
class EventDataPair
{
EventDataPair(const string &in tag, const string &in value)
{
m_tag = tag;
m_value = value;
}
string m_tag;
string m_value;
}