-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path_Analytics.hpp
114 lines (101 loc) · 3.18 KB
/
_Analytics.hpp
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
//
// _Analytics.hpp
// Maw Kit
//
// Created by Lluís Ulzurrun de Asanza Sàez on 18/02/16.
//
//
#ifndef _Analytics_hpp
#define _Analytics_hpp
#include "Analytics.hpp"
namespace MK {
namespace Analytics {
/**
* Logs given event without additional attributes.
*
* @native
*
* @param event Name of the event to log.
*/
void _logEvent( const std::string &event );
/**
* Logs given event with given additional attributes.
*
* @native
*
* @param event Name of the event to log.
* @param attr Additional attributes.
*/
void _logEvent( const std::string &event, const std::map<std::string, std::string> &attr );
/**
* Logs given event with given additional attributes.
*
* @native
*
* @param event Name of the event to log.
* @param attr Additional attributes.
*/
void _logEvent( const std::string &event, const std::map<std::string, double> &attr );
/**
* Logs start of level with given name/identifier and given optional additional
* attributes.
*
* @native
*
* @param levelName Name of the started level to log.
* @param attr Additional attributes to log in this event.
*/
void _logLevelStart( const std::string &levelName,
const std::map<std::string, std::string> &attr = {} );
/**
* Logs start of level with given name/identifier and given optional additional
* attributes.
*
* @native
*
* @param levelName Name of the started level to log.
* @param attr Additional attributes to log in this event.
*/
void _logLevelStart( const std::string &levelName,
const std::map<std::string, double> &attr = {} );
/**
* Logs end of level with given name/identifier, given score, whether user
* succeeded or not in the level and given optional additional attributes.
*
* @native
*
* @param levelName Name of the finished level to log.
* @param score Score use achieved in this level.
* @param succeeded Whether used suceeded in this level (`true) or not.
* @param attr Additional attributes to log in this event.
*/
void _logLevelEnd( const std::string &levelName,
const long long score,
const bool succeeded,
const std::map<std::string, std::string> &attr = {} );
/**
* Logs end of level with given name/identifier, given score, whether user
* succeeded or not in the level and given optional additional attributes.
*
* @native
*
* @param levelName Name of the finished level to log.
* @param score Score use achieved in this level.
* @param succeeded Whether used suceeded in this level (`true) or not.
* @param attr Additional attributes to log in this event.
*/
void _logLevelEnd( const std::string &levelName,
const long long score,
const bool succeeded,
const std::map<std::string, double> &attr = {} );
/**
* Logs frames per second.
*
* @param isIntensive Whether this log is due to intensive performance
* information report or a regular performance information
* report. Defaults to false.
*/
void _logPerformance( const bool isIntensive = false );
}; // namespace Analytics
}; // namespace MK
#endif /* _Fabric_hpp */