BF2MC-Matchmaker
|
Represents a clan in the Battlefield game. More...
#include <clan.h>
Public Types | |
enum class | Regions : uint8_t { America = 0x1 , Europe = 0x2 , Asia = 0x3 , Unknown = 0xf } |
Represents the regions associated with clans. More... | |
enum class | Ranks { Leader = 0x0 , Co_Leader = 0x1 , Member = 0x2 , Unknown = 0xf } |
Represents the ranks within a clan. More... | |
typedef bool(Battlefield::Clan::* | SetterFunc) (const std::string &) |
Public Member Functions | |
int | GetClanId () const |
std::string | GetName () const |
std::string | GetTag () const |
std::string | GetHomepage () const |
std::string | GetInfo () const |
uint8_t | GetRegion () const |
Regions | GetRegionEnum () const |
uint32_t | GetScore () const |
uint32_t | GetWins () const |
uint32_t | GetLosses () const |
uint32_t | GetDraws () const |
std::string | GetCreatedAt () const |
bool | IsDisabled () const |
const std::map< int, Ranks > | GetRanks () const |
bool | SetClanId (int clanid) |
bool | SetClanId (const std::string &clanid) |
bool | SetName (const std::string &name) |
bool | SetTag (const std::string &tag) |
bool | SetHomepage (const std::string &homepage) |
bool | SetInfo (const std::string &info) |
bool | SetRegion (Battlefield::Clan::Regions region) |
bool | SetRegion (uint8_t int_region) |
bool | SetRegion (const std::string ®ion) |
bool | SetScore (uint32_t score) |
bool | SetWins (uint32_t wins) |
bool | SetLosses (uint32_t losses) |
bool | SetDraws (uint32_t draws) |
bool | SetCreatedAt (MYSQL_TIME created_at) |
bool | SetDisable (bool disable) |
bool | SetDisable (uint8_t disable) |
void | AddRank (int profileid, Ranks rank) |
void | AddRank (int profileid, uint8_t int_rank) |
Ranks | GetRank (int profileid) const |
void | useExample () |
Performs an example operation using the Clan class. More... | |
Static Public Member Functions | |
static Ranks | convertRank (const std::string &rank) |
Converts a string representation of a rank to its corresponding enum value. More... | |
static Ranks | convertRank (uint8_t int_rank) |
Converts an integer representation of a rank to its corresponding enum value. More... | |
static Regions | convertRegion (const std::string &str_region) |
Converts a string representation of a region to its corresponding enum value. More... | |
static Regions | convertRegion (uint8_t int_region) |
Converts an integer representation of a region to its corresponding enum value. More... | |
Static Public Attributes | |
static const int | ELO_WEIGHT = 25 |
The Elo score weight for clan battles. More... | |
static const int | ELO_MAX_RANGE = 1000 |
The maximum range for clan battles. More... | |
static std::unordered_map< std::string, SetterFunc > | SetterMap |
Private Attributes | |
int | _clanid = -1 |
std::string | _name = "" |
std::string | _tag = "" |
std::string | _homepage = "" |
std::string | _info = "" |
Regions | _region = Regions::America |
uint32_t | _score = 0 |
uint32_t | _wins = 0 |
uint32_t | _losses = 0 |
uint32_t | _draws = 0 |
std::string | _created_at = "" |
bool | _disable = false |
std::map< int, Ranks > | _ranks |
Represents a clan in the Battlefield game.
This class encapsulates data and behavior related to a clan in the Battlefield game.
|
strong |
Represents the ranks within a clan.
This enum class defines different ranks within a clan. Each rank corresponds to a specific position or role within the clan hierarchy.
Enumerator | |
---|---|
Leader | The leader of the clan. |
Co_Leader | A co-leader within the clan. |
Member | A regular member of the clan. |
Unknown | Unknown rank. |
|
strong |
|
static |
Converts a string representation of a rank to its corresponding enum value.
This static member function converts a string representation of a rank to its corresponding enum value of the Ranks enumeration.
rank | A string representing the rank. |
Definition at line 199 of file battlefield/clan.cpp.
|
static |
Converts an integer representation of a rank to its corresponding enum value.
This static member function converts an integer representation of a rank to its corresponding enum value of the Ranks enumeration.
int_rank | An integer representing the rank. |
Definition at line 212 of file battlefield/clan.cpp.
|
static |
Converts a string representation of a region to its corresponding enum value.
This static member function converts a string representation of a region to its corresponding enum value of the Regions enumeration.
str_region | A string representing the region. |
Definition at line 222 of file battlefield/clan.cpp.
|
static |
Converts an integer representation of a region to its corresponding enum value.
This static member function converts an integer representation of a region to its corresponding enum value of the Regions enumeration.
int_region | An integer representing the region. |
Definition at line 235 of file battlefield/clan.cpp.
void Battlefield::Clan::useExample | ( | ) |
Performs an example operation using the Clan class.
This member function demonstrates an example operation using the Clan class. It serves as a placeholder for illustrating the usage of the Clan class.
Definition at line 15 of file battlefield/clan.cpp.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
static |
|
static |
|
static |