-
Notifications
You must be signed in to change notification settings - Fork 0
/
xmlsqlmap.cpp
82 lines (66 loc) · 1.87 KB
/
xmlsqlmap.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
#include "xmlsqlmap.h"
bool xmlsqlmap::instantiated = false;
xmlsqlmap* xmlsqlmap::_singleton = NULL;
QString xmlsqlmap::language = "EN";
void xmlsqlmap::printMap()
{
if(!instantiated)
_singleton = new xmlsqlmap();
for(QMap<QString,QString>::Iterator it = _singleton->theMap.begin(); it != _singleton->theMap.end(); ++it)
std::cout << it.key().latin1() << " --> " << it.data().latin1() << std::endl;
}
bool xmlsqlmap::contains(QString s)
{
if(!instantiated)
_singleton = new xmlsqlmap();
return(_singleton->theMap.contains(s));
}
QString xmlsqlmap::translate(QString s)
{
if(!instantiated)
_singleton = new xmlsqlmap();
return(_singleton->theMap[s]);
}
xmlsqlmap::xmlsqlmap()
{
instantiated = true;
if(language == "EN")
{
theMap["PlayerID"] = "ID";
theMap["PlayerName"] = "Name";
theMap["PlayerNumber"] = "";
theMap["Age"] = "Age";
theMap["MarketValue"] = "";
theMap["TSI"] = "TSI";
theMap["PlayerForm"] = "Form";
theMap["Statement"] = "";
theMap["Experience"] = "Experience";
theMap["Leadership"] = "Leadership";
theMap["Salary"] = "Salary";
theMap["IsAbroad"] = "";
theMap["Agreeability"] = "";
theMap["Aggressiveness"] = "";
theMap["Honesty"] = "";
theMap["LeagueGoals"] = "";
theMap["CupGoals"] = "";
theMap["FriendliesGoals"] = "";
theMap["CareerGoals"] = "";
theMap["CareerHattricks"] = "";
theMap["Specialty"] = "";
theMap["TransferListed"] = "";
theMap["NationalTeamID"] = "";
theMap["CountryID"] = "";
theMap["Caps"] = "";
theMap["CapsU20"] = "";
theMap["Cards"] = "";
theMap["InjuryLevel"] = "";
theMap["StaminaSkill"] = "Stamina";
theMap["KeeperSkill"] = "Keeper";
theMap["PlaymakerSkill"] = "Playmaking";
theMap["ScorerSkill"] = "Scoring";
theMap["PassingSkill"] = "Passing";
theMap["WingerSkill"] = "Winger";
theMap["DefenderSkill"] = "Defending";
theMap["SetPiecesSkill"] = "SetPieces";
}
}