BF2MC-Matchmaker
Public Member Functions | Private Attributes | List of all members
Battlefield::Player Class Reference

Represents a player with extended statistics. More...

#include <player.h>

Inheritance diagram for Battlefield::Player:
Inheritance graph
[legend]
Collaboration diagram for Battlefield::Player:
Collaboration graph
[legend]

Public Member Functions

int GetProfileId () const
 
int GetUserId () const
 
std::string GetNick () const
 
std::string GetUniquenick () const
 
std::string GetEmail () const
 
std::string GetPassword () const
 
std::string GetLastLogin () const
 
std::string GetLastLoginIp () const
 
std::string GetCreatedAt () const
 
std::vector< int > GetFriends () const
 
bool isVerified () const
 
bool isRestricted () const
 
bool SetProfileId (int profileid)
 
bool SetProfileId (const std::string &str_profileid)
 
bool SetUserId (int userid)
 
bool SetUserId (const std::string &str_userid)
 
bool SetNick (const std::string &nick)
 
bool SetUniquenick (const std::string &uniquenick)
 
bool SetUniquenickWithoutClanTag (const std::string &uniquenick)
 
bool SetEmail (const std::string &email)
 
bool SetPassword (const std::string &password)
 
bool SetMD5Password (const std::string &password)
 
bool SetLastLogin (MYSQL_TIME last_login)
 
bool SetLastLoginIp (const std::string &last_login_ip)
 
bool SetCreatedAt (MYSQL_TIME created_at)
 
bool SetVerified (bool verified)
 
bool SetVerified (uint8_t verified)
 
bool SetRestricted (bool restricted)
 
bool SetRestricted (uint8_t restricted)
 
bool AddFriend (int profileid)
 
void useExample ()
 Performs an example operation using the Player class. More...
 
- Public Member Functions inherited from Battlefield::PlayerStats
int32_t GetScore () const
 
uint32_t GetRank () const
 
uint32_t GetPPH () const
 
uint32_t GetKills () const
 
uint32_t GetDeaths () const
 
uint32_t GetSuicides () const
 
uint32_t GetTime () const
 
uint32_t GetVehiclesDestroyed () const
 
uint32_t GetLAVsDestroyed () const
 
uint32_t GetMAVsDestroyed () const
 
uint32_t GetHAVsDestroyed () const
 
uint32_t GetHelicoptersDestroyed () const
 
uint32_t GetPlanesDestroyed () const
 
uint32_t GetBoatsDestroyed () const
 
uint32_t GetKillsAssualtKit () const
 
uint32_t GetSpawnsAssualtKit () const
 
uint32_t GetKillsSniperKit () const
 
uint32_t GetSpawnsSniperKit () const
 
uint32_t GetKillsSpecialOpKit () const
 
uint32_t GetSpawnsSpecialOpKit () const
 
uint32_t GetKillsCombatEngineerKit () const
 
uint32_t GetSpawnsCombatEngineerKit () const
 
uint32_t GetKillsSupportKit () const
 
uint32_t GetSpawnsSupportKit () const
 
uint32_t GetTeamKills () const
 
uint32_t GetMedals () const
 
uint32_t GetTotalTopPlayer () const
 
uint32_t GetTotalVictories () const
 
uint32_t GetTotalGameSessions () const
 
uint32_t GetCapturedFlags () const
 
uint32_t GetNeutralizedFlags () const
 
uint32_t GetSavedFlags () const
 
double GetRatio () const
 
double GetRatioAssualtKit () const
 
double GetRatioSniperKit () const
 
double GetRatioSpecialOpKit () const
 
double GetRatioCombatEngineerKit () const
 
double GetRatioSupportKit () const
 
bool SetScore (int32_t score)
 
bool SetRank (uint32_t ran)
 
bool SetRank (Ranks ran)
 
bool SetPPH (uint32_t pph)
 
bool SetKills (uint32_t kills)
 
bool SetDeaths (uint32_t kills)
 
bool SetSuicides (uint32_t suicides)
 
bool SetTime (uint32_t time)
 
bool SetVehiclesDestroyed (uint32_t vehicles)
 
bool SetLAVsDestroyed (uint32_t lavd)
 
bool SetMAVsDestroyed (uint32_t mavd)
 
bool SetHAVsDestroyed (uint32_t havd)
 
bool SetHelicoptersDestroyed (uint32_t hed)
 
bool SetBoatsDestroyed (uint32_t bod)
 
bool SetKillsAssualtKit (uint32_t kills)
 
bool SetDeathsAssualtKit (uint32_t deaths)
 
bool SetKillsSniperKit (uint32_t kills)
 
bool SetDeathsSniperKit (uint32_t deaths)
 
bool SetKillsSpecialOpKit (uint32_t kills)
 
bool SetDeathsSpecialOpKit (uint32_t deaths)
 
bool SetKillsCombatEngineerKit (uint32_t kills)
 
bool SetDeathsCombatEngineerKit (uint32_t deaths)
 
bool SetKillsSupportKit (uint32_t kills)
 
bool SetDeathsSupportKit (uint32_t deaths)
 
bool SetMedals (uint32_t medals)
 
bool SetMedals (Medals medals)
 
bool SetTotalTopPlayer (uint32_t total)
 
bool SetTotalVictories (uint32_t total)
 
bool SetTotalGameSessions (uint32_t total)
 
bool SetCapturedFlags (uint32_t cflags)
 
bool SetNeutralizedFlags (uint32_t nflags)
 
bool SetSavedFlags (uint32_t sflags)
 
void Update (const Battlefield::GameStatPlayer &gsplayer)
 Update player stats based on played game.
 
void useExample ()
 Performs an example operation using the PlayerStats class. More...
 

Private Attributes

int _profileid = -1
 
int _userid = -1
 
std::string _nick = ""
 
std::string _uniquenick = ""
 
std::string _email = ""
 
std::string _password = ""
 
std::string _last_login = ""
 
std::string _last_login_ip = ""
 
std::string _created_at = ""
 
bool _verified = false
 
bool _restricted = false
 
std::vector< int > _friends
 

Additional Inherited Members

- Public Types inherited from Battlefield::PlayerStats
typedef bool(Battlefield::PlayerStats::* SetterFunc) (uint32_t)
 
- Static Public Attributes inherited from Battlefield::PlayerStats
static std::unordered_map< std::string, SetterFunc > SetterMap
 

Detailed Description

Represents a player with extended statistics.

Definition at line 37 of file player.h.

Member Function Documentation

◆ useExample()

void Battlefield::Player::useExample ( )

Performs an example operation using the Player class.

This member function demonstrates an example operation using the Player class. It serves as a placeholder for illustrating the usage of the Player class.

Note
This is just an example function and does not perform any meaningful operation.

Definition at line 8 of file battlefield/player.cpp.

Member Data Documentation

◆ _created_at

std::string Battlefield::Player::_created_at = ""
private

Creation timestamp of the player.

Definition at line 48 of file player.h.

◆ _email

std::string Battlefield::Player::_email = ""
private

Email address of the player.

Definition at line 44 of file player.h.

◆ _friends

std::vector<int> Battlefield::Player::_friends
private

List of profile IDs of the player's friends.

Definition at line 51 of file player.h.

◆ _last_login

std::string Battlefield::Player::_last_login = ""
private

Last login timestamp of the player.

Definition at line 46 of file player.h.

◆ _last_login_ip

std::string Battlefield::Player::_last_login_ip = ""
private

IP address of the last login.

Definition at line 47 of file player.h.

◆ _nick

std::string Battlefield::Player::_nick = ""
private

Nickname of the player.

Definition at line 42 of file player.h.

◆ _password

std::string Battlefield::Player::_password = ""
private

Password of the player.

Definition at line 45 of file player.h.

◆ _profileid

int Battlefield::Player::_profileid = -1
private

Profile ID of the player.

Definition at line 40 of file player.h.

◆ _restricted

bool Battlefield::Player::_restricted = false
private

Indicates if the player is restricted from progressing stats.

Definition at line 50 of file player.h.

◆ _uniquenick

std::string Battlefield::Player::_uniquenick = ""
private

Unique nickname of the player.

Definition at line 43 of file player.h.

◆ _userid

int Battlefield::Player::_userid = -1
private

User ID of the player.

Definition at line 41 of file player.h.

◆ _verified

bool Battlefield::Player::_verified = false
private

Indicates if the player is verified and can login.

Definition at line 49 of file player.h.


The documentation for this class was generated from the following files: