Horizon Official Technical Documentation
Affiliation.hpp
Go to the documentation of this file.
1/***************************************************
2 * _ _ _ *
3 * | | | | (_) *
4 * | |_| | ___ _ __ _ _______ _ __ *
5 * | _ |/ _ \| '__| |_ / _ \| '_ \ *
6 * | | | | (_) | | | |/ / (_) | | | | *
7 * \_| |_/\___/|_| |_/___\___/|_| |_| *
8 ***************************************************
9 * This file is part of Horizon (c).
10 *
11 * Copyright (c) 2019 Sagun K. (sagunxp@gmail.com).
12 * Copyright (c) 2019 Horizon Dev Team.
13 *
14 * Base Author - Sagun K. (sagunxp@gmail.com)
15 *
16 * This library is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation, either version 3 of the License, or
19 * (at your option) any later version.
20 *
21 * This library is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 * GNU General Public License for more details.
25 *
26 * You should have received a copy of the GNU General Public License
27 * along with this library. If not, see <http://www.gnu.org/licenses/>.
28 **************************************************/
29
30#ifndef HORIZON_MODELS_GUILD_AFFILIATIONS_HPP
31#define HORIZON_MODELS_GUILD_AFFILIATIONS_HPP
32
33namespace Horizon
34{
35namespace Models
36{
37namespace Guild
38{
40{
43};
45{
46public:
49
50 /* Guild ID */
51 uint32_t get_guild_id() { return _guild_id; }
52 void set_guild_id(uint32_t guild_id) { _guild_id = guild_id; }
53 /* Affiliation Type */
54 void setAntagonist(uint32_t guild_id) { _affiliate_id = guild_id; _type = AFFTYPE_ANTAGONIST; }
55 void setAlliance(uint32_t guild_id) { _affiliate_id = guild_id; _type = AFFTYPE_ALLIANCE; }
56 bool isAlly() { return _type == AFFTYPE_ALLIANCE; }
58 /* Affiliate */
59 uint32_t getAffiliateID() { return _affiliate_id; }
60 void setAffiliateID(uint32_t guild_id) { _affiliate_id = guild_id; }
61
62private:
63 uint32_t _guild_id;
65 uint32_t _affiliate_id;
66}
67}
68}
69}
70#endif /* HORIZON_MODELS_GUILD_AFFILIATIONS_HPP */
Definition: Affiliation.hpp:45
void set_guild_id(uint32_t guild_id)
Definition: Affiliation.hpp:52
uint32_t getAffiliateID()
Definition: Affiliation.hpp:59
void setAlliance(uint32_t guild_id)
Definition: Affiliation.hpp:55
void setAffiliateID(uint32_t guild_id)
Definition: Affiliation.hpp:60
uint32_t _affiliate_id
Definition: Affiliation.hpp:65
uint32_t get_guild_id()
Definition: Affiliation.hpp:51
bool isAlly()
Definition: Affiliation.hpp:56
bool isAntagonist()
Definition: Affiliation.hpp:57
affiliation_type _type
Definition: Affiliation.hpp:64
~Affiliation()
Definition: Affiliation.hpp:48
void setAntagonist(uint32_t guild_id)
Definition: Affiliation.hpp:54
Affiliation()
Definition: Affiliation.hpp:47
uint32_t _guild_id
Definition: Affiliation.hpp:63
Definition: Guild.hpp:42
affiliation_type
Definition: Affiliation.hpp:40
@ AFFTYPE_ALLIANCE
Definition: Affiliation.hpp:42
@ AFFTYPE_ANTAGONIST
Definition: Affiliation.hpp:41
Definition: Element.hpp:7