1 #ifndef BATTLEFIELD_CLAN_H
2 #define BATTLEFIELD_CLAN_H
7 #include <unordered_map>
37 typedef std::vector<Battlefield::Clan> Clans;
46 typedef std::map<int, Battlefield::Clan> RankClans;
119 static std::unordered_map<std::string, SetterFunc> SetterMap;
122 int GetClanId()
const {
return this->
_clanid; }
123 std::string GetName()
const {
return this->
_name; }
124 std::string GetTag()
const {
return this->
_tag; }
125 std::string GetHomepage()
const {
return this->
_homepage; }
126 std::string GetInfo()
const {
return this->
_info; }
127 uint8_t GetRegion()
const {
return static_cast<uint8_t
>(this->
_region); }
129 uint32_t GetScore()
const {
return this->
_score; }
130 uint32_t GetWins()
const {
return this->
_wins; }
131 uint32_t GetLosses()
const {
return this->
_losses; }
132 uint32_t GetDraws()
const {
return this->
_draws; }
133 std::string GetCreatedAt()
const {
return this->
_created_at; }
134 bool IsDisabled()
const {
return this->
_disable; }
135 const std::map<int, Ranks> GetRanks()
const {
return this->
_ranks; }
137 bool SetClanId(
int clanid);
138 bool SetClanId(
const std::string& clanid);
139 bool SetName(
const std::string& name);
140 bool SetTag(
const std::string& tag);
141 bool SetHomepage(
const std::string& homepage);
142 bool SetInfo(
const std::string& info);
144 bool SetRegion(uint8_t int_region);
145 bool SetRegion(
const std::string& region);
146 bool SetScore(uint32_t score);
147 bool SetWins(uint32_t wins);
148 bool SetLosses(uint32_t losses);
149 bool SetDraws(uint32_t draws);
150 bool SetCreatedAt(MYSQL_TIME created_at);
151 bool SetDisable(
bool disable);
152 bool SetDisable(uint8_t disable);
153 void AddRank(
int profileid,
Ranks rank);
154 void AddRank(
int profileid, uint8_t int_rank);
155 Ranks GetRank(
int profileid)
const;
Represents a clan in the Battlefield game.
static const int ELO_MAX_RANGE
The maximum range for clan battles.
static Regions convertRegion(const std::string &str_region)
Converts a string representation of a region to its corresponding enum value.
static Ranks convertRank(const std::string &rank)
Converts a string representation of a rank to its corresponding enum value.
std::map< int, Ranks > _ranks
Regions
Represents the regions associated with clans.
void useExample()
Performs an example operation using the Clan class.
Ranks
Represents the ranks within a clan.
static const int ELO_WEIGHT
The Elo score weight for clan battles.