BF2MC-Matchmaker
|
Represents game statistics. More...
#include <gamestat.h>
Public Types | |
enum class | VictoryState : uint8_t { Lost = 0 , Major = 1 , Minor = 2 , Draw = 3 } |
Enumerates the victory states for a game. More... | |
typedef bool(Battlefield::GameStat::* | SetterFunc) (const std::string &) |
Public Member Functions | |
int | GetId () const |
uint8_t | GetGameType () const |
std::string | GetGameVersion () const |
std::string | GetHostName () const |
uint8_t | GetMapId () const |
uint8_t | GetNumPlayers () const |
uint8_t | GetPPlayers () const |
uint16_t | GetTimePlayed () const |
int | GetTeam1ClanId () const |
int | GetTeam2ClanId () const |
uint8_t | GetTeam1Country () const |
uint8_t | GetTeam2Country () const |
uint8_t | GetTeam1Victory () const |
uint8_t | GetTeam2Victory () const |
VictoryState | GetTeam1VictoryEnum () const |
VictoryState | GetTeam2VictoryEnum () const |
int16_t | GetTeam1Score () const |
int16_t | GetTeam2Score () const |
std::string | GetCreatedAt () const |
GameStatPlayers | GetPlayers () const |
bool | SetId (int id) |
bool | SetId (const std::string &str_id) |
bool | SetGameType (uint8_t gametype) |
bool | SetGameType (const std::string &str_gametype) |
bool | SetGameVersion (const std::string &gamver) |
bool | SetHostName (const std::string &hostname) |
bool | SetMapId (uint8_t mapid) |
bool | SetMapId (const std::string &str_mapid) |
bool | SetNumPlayers (uint8_t numplayers) |
bool | SetNumPlayers (const std::string &str_numplayers) |
bool | SetPPlayers (uint8_t pplayers) |
bool | SetPPlayers (const std::string &str_pplayers) |
bool | SetTimePlayed (uint16_t tplayed) |
bool | SetTimePlayed (const std::string &str_tplayed) |
bool | SetTeam1ClanId (int clanid_t0) |
bool | SetTeam1ClanId (const std::string &str_clanid_t0) |
bool | SetTeam2ClanId (int clanid_t1) |
bool | SetTeam2ClanId (const std::string &str_clanid_t1) |
bool | SetTeam1Country (uint8_t country_t0) |
bool | SetTeam1Country (const std::string &str_country_t0) |
bool | SetTeam2Country (uint8_t country_t1) |
bool | SetTeam2Country (const std::string &str_country_t1) |
bool | SetTeam1Victory (uint8_t victory_t0) |
bool | SetTeam1Victory (const std::string &str_victory_t0) |
bool | SetTeam2Victory (uint8_t victory_t1) |
bool | SetTeam2Victory (const std::string &str_victory_t1) |
bool | SetTeam1Score (int16_t score0) |
bool | SetTeam1Score (const std::string &str_score0) |
bool | SetTeam2Score (int16_t score1) |
bool | SetTeam2Score (const std::string &str_score1) |
bool | SetCreatedAt (MYSQL_TIME created_at) |
void | AddPlayer (const GameStatPlayer &gsplayer) |
void | disablePlayer (int profileid) |
void | UpdateClanStats () |
void | Debug () |
Static Public Attributes | |
static std::unordered_map< std::string, SetterFunc > | SetterMap |
Private Attributes | |
int | _id = -1 |
uint8_t | _gametype = 0 |
std::string | _gamver = "" |
std::string | _hostname = "" |
uint8_t | _mapid = 0 |
uint8_t | _numplayers = 0 |
uint8_t | _pplayers = 0 |
uint16_t | _tplayed = 0 |
int | _clanid_t0 = 0 |
int | _clanid_t1 = 0 |
uint8_t | _country_t0 = 0 |
uint8_t | _country_t1 = 0 |
uint8_t | _victory_t0 = 0 |
uint8_t | _victory_t1 = 0 |
int16_t | _score0 = 0 |
int16_t | _score1 = 0 |
std::string | _created_at = "" |
GameStatPlayers | _players |
Represents game statistics.
Definition at line 36 of file gamestat.h.
|
strong |
Enumerates the victory states for a game.
Enumerator | |
---|---|
Lost | The game was lost. |
Major | Major victory. |
Minor | Minor victory. |
Draw | The game ended in a draw. |
Definition at line 42 of file gamestat.h.
|
private |
The clan ID for team 1.
Definition at line 59 of file gamestat.h.
|
private |
The clan ID for team 2.
Definition at line 60 of file gamestat.h.
|
private |
The country ID for team 1.
Definition at line 61 of file gamestat.h.
|
private |
The country ID for team 2.
Definition at line 62 of file gamestat.h.
|
private |
The datetime when the game statistics were created.
Definition at line 68 of file gamestat.h.
|
private |
The type of game (see: enum Battlefield::GameType).
Definition at line 52 of file gamestat.h.
|
private |
The game version.
Definition at line 53 of file gamestat.h.
|
private |
The hostname of the game server.
Definition at line 54 of file gamestat.h.
|
private |
The unique identifier for the game statistics.
Definition at line 51 of file gamestat.h.
|
private |
The ID of the map.
Definition at line 55 of file gamestat.h.
|
private |
The total number of players in the game.
Definition at line 56 of file gamestat.h.
|
private |
The list of players involved in the game.
Definition at line 69 of file gamestat.h.
|
private |
The number of present players at the end of the game.
Definition at line 57 of file gamestat.h.
|
private |
Score of team 1.
Definition at line 65 of file gamestat.h.
|
private |
Score of team 2.
Definition at line 66 of file gamestat.h.
|
private |
The total time played in seconds.
Definition at line 58 of file gamestat.h.
|
private |
The victory state for team 1 (see: enum Battlefield::GameStat::VictoryState).
Definition at line 63 of file gamestat.h.
|
private |
The victory state for team 2 (see: enum Battlefield::GameStat::VictoryState).
Definition at line 64 of file gamestat.h.
|
static |
Definition at line 74 of file gamestat.h.