forked from krojew/evernus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Character.cpp
358 lines (289 loc) · 8.37 KB
/
Character.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
/**
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <QLocale>
#include "TextUtils.h"
#include "Character.h"
namespace Evernus
{
QString Character::getName() const &
{
return mData.mName;
}
QString &&Character::getName() && noexcept
{
return std::move(mData.mName);
}
void Character::setName(const QString &name)
{
mData.mName = name;
}
void Character::setName(QString &&name)
{
mData.mName = std::move(name);
}
QString Character::getCorporationName() const &
{
return mData.mCorporationName;
}
QString &&Character::getCorporationName() && noexcept
{
return std::move(mData.mCorporationName);
}
void Character::setCorporationName(const QString &name)
{
mData.mCorporationName = name;
}
void Character::setCorporationName(QString &&name)
{
mData.mCorporationName = std::move(name);
}
quint64 Character::getCorporationId() const noexcept
{
return mData.mCorporationId;
}
void Character::setCorporationId(quint64 id) noexcept
{
mData.mCorporationId = id;
}
QString Character::getRace() const &
{
return mData.mRace;
}
QString &&Character::getRace() && noexcept
{
return std::move(mData.mRace);
}
void Character::setRace(const QString &race)
{
mData.mRace = race;
}
void Character::setRace(QString &&race)
{
mData.mRace = std::move(race);
}
QString Character::getBloodline() const &
{
return mData.mBloodline;
}
QString &&Character::getBloodline() && noexcept
{
return std::move(mData.mBloodline);
}
void Character::setBloodline(const QString &bloodline)
{
mData.mBloodline = bloodline;
}
void Character::setBloodline(QString &&bloodline)
{
mData.mBloodline = std::move(bloodline);
}
QString Character::getAncestry() const &
{
return mData.mAncestry;
}
QString &&Character::getAncestry() && noexcept
{
return std::move(mData.mAncestry);
}
void Character::setAncestry(const QString &ancestry)
{
mData.mAncestry = ancestry;
}
void Character::setAncestry(QString &&ancestry)
{
mData.mAncestry = std::move(ancestry);
}
QString Character::getGender() const &
{
return mData.mGender;
}
QString &&Character::getGender() && noexcept
{
return std::move(mData.mGender);
}
void Character::setGender(const QString &gender)
{
mData.mGender = gender;
}
void Character::setGender(QString &&gender)
{
mData.mGender = std::move(gender);
}
CharacterData::ISKType Character::getISK() const noexcept
{
return mData.mISK;
}
QString Character::getISKPresentation() const
{
QLocale locale;
return TextUtils::currencyToString(getISK(), locale);
}
void Character::setISK(CharacterData::ISKType isk) noexcept
{
mData.mISK = isk;
}
float Character::getCorpStanding() const noexcept
{
return mData.mCorpStanding;
}
void Character::setCorpStanding(float standing) noexcept
{
mData.mCorpStanding = standing;
}
float Character::getFactionStanding() const noexcept
{
return mData.mFactionStanding;
}
void Character::setFactionStanding(float standing) noexcept
{
mData.mFactionStanding = standing;
}
std::optional<double> Character::getBuyBrokersFee() const
{
return mData.mBuyBrokersFee;
}
void Character::setBuyBrokersFee(std::optional<double> fee)
{
mData.mBuyBrokersFee = std::move(fee);
}
std::optional<double> Character::getSellBrokersFee() const
{
return mData.mSellBrokersFee;
}
void Character::setSellBrokersFee(std::optional<double> fee)
{
mData.mSellBrokersFee = std::move(fee);
}
float Character::getReprocessingImplantBonus() const noexcept
{
return mData.mReprocessingImplantBonus;
}
void Character::setReprocessingImplantBonus(float value) noexcept
{
mData.mReprocessingImplantBonus = value;
}
float Character::getManufacturingTimeImplantBonus() const noexcept
{
return mData.mManufacturingTimeImplantBonus;
}
void Character::setManufacturingTimeImplantBonus(float value) noexcept
{
mData.mManufacturingTimeImplantBonus = value;
}
bool Character::isAlphaClone() const noexcept
{
return mData.mAlphaClone;
}
void Character::setAlphaClone(bool flag) noexcept
{
mData.mAlphaClone = flag;
}
CharacterData::OrderAmountSkills Character::getOrderAmountSkills() const noexcept
{
return mData.mOrderAmountSkills;
}
void Character::setOrderAmountSkills(const CharacterData::OrderAmountSkills &skills) noexcept
{
mData.mOrderAmountSkills = skills;
}
void Character::setOrderAmountSkills(CharacterData::OrderAmountSkills &&skills) noexcept
{
mData.mOrderAmountSkills = std::move(skills);
}
CharacterData::TradeRangeSkills Character::getTradeRangeSkills() const noexcept
{
return mData.mTradeRangeSkills;
}
void Character::setTradeRangeSkills(const CharacterData::TradeRangeSkills &skills) noexcept
{
mData.mTradeRangeSkills = skills;
}
void Character::setTradeRangeSkills(CharacterData::TradeRangeSkills &&skills) noexcept
{
mData.mTradeRangeSkills = std::move(skills);
}
CharacterData::FeeSkills Character::getFeeSkills() const noexcept
{
return mData.mFeeSkills;
}
void Character::setFeeSkills(const CharacterData::FeeSkills &skills) noexcept
{
mData.mFeeSkills = skills;
}
void Character::setFeeSkills(CharacterData::FeeSkills &&skills) noexcept
{
mData.mFeeSkills = std::move(skills);
}
CharacterData::ContractSkills Character::getContractSkills() const noexcept
{
return mData.mContractSkills;
}
void Character::setContractSkills(const CharacterData::ContractSkills &skills) noexcept
{
mData.mContractSkills = skills;
}
void Character::setContractSkills(CharacterData::ContractSkills &&skills) noexcept
{
mData.mContractSkills = std::move(skills);
}
CharacterData::ReprocessingSkills Character::getReprocessingSkills() const noexcept
{
return mData.mReprocessingSkills;
}
void Character::setReprocessingSkills(const CharacterData::ReprocessingSkills &skills) noexcept
{
mData.mReprocessingSkills = skills;
}
void Character::setReprocessingSkills(CharacterData::ReprocessingSkills &&skills) noexcept
{
mData.mReprocessingSkills = std::move(skills);
}
CharacterData::IndustrySkills Character::getIndustrySkills() const noexcept
{
return mData.mIndustrySkills;
}
void Character::setIndustrySkills(const CharacterData::IndustrySkills &skills) noexcept
{
mData.mIndustrySkills = skills;
}
void Character::setIndustrySkills(CharacterData::IndustrySkills &&skills) noexcept
{
mData.mIndustrySkills = std::move(skills);
}
CharacterData Character::getCharacterData() const &
{
return mData;
}
CharacterData &&Character::getCharacterData() && noexcept
{
return std::move(mData);
}
void Character::setCharacterData(const CharacterData &data)
{
mData = data;
}
void Character::setCharacterData(CharacterData &&data)
{
mData = std::move(data);
}
bool Character::isEnabled() const noexcept
{
return mEnabled;
}
void Character::setEnabled(bool flag) noexcept
{
mEnabled = flag;
}
}