OpenXcom  1.0
Open-source clone of the original X-Com
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
AlienRace.h
1 /*
2  * Copyright 2010-2014 OpenXcom Developers.
3  *
4  * This file is part of OpenXcom.
5  *
6  * OpenXcom is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * OpenXcom is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with OpenXcom. If not, see <http://www.gnu.org/licenses/>.
18  */
19 #ifndef OPENXCOM_ALIENRACE_H
20 #define OPENXCOM_ALIENRACE_H
21 
22 #include <string>
23 #include <vector>
24 #include <yaml-cpp/yaml.h>
25 
26 enum AlienRank{AR_HUMAN = -1, AR_COMMANDER, AR_LEADER, AR_ENGINEER, AR_MEDIC, AR_NAVIGATOR, AR_SOLDIER, AR_TERRORIST, AR_TERRORIST2};
27 
28 namespace OpenXcom
29 {
30 
35 class AlienRace
36 {
37 private:
38  std::string _id;
39  std::vector<std::string> _members;
40  bool _retaliation;
41 public:
43  AlienRace(const std::string &id);
45  ~AlienRace();
47  void load(const YAML::Node& node);
49  std::string getId() const;
51  std::string getMember(int id) const;
53  bool canRetaliate() const;
54 };
55 
56 }
57 
58 #endif
bool canRetaliate() const
Gets if the race can retaliate.
Definition: AlienRace.cpp:71
~AlienRace()
Cleans up the alien race ruleset.
Definition: AlienRace.cpp:32
std::string getMember(int id) const
Gets a certain member of this alien race family.
Definition: AlienRace.cpp:62
Represents a specific race "family", or a "main race" if you wish.
Definition: AlienRace.h:35
std::string getId() const
Gets the alien race's id.
Definition: AlienRace.cpp:52
AlienRace(const std::string &id)
Creates a blank alien race ruleset.
Definition: AlienRace.cpp:28
void load(const YAML::Node &node)
Loads alien race data from YAML.
Definition: AlienRace.cpp:40