OpenXcom  1.0
Open-source clone of the original X-Com
AlienRace.h
1 #pragma once
2 /*
3  * Copyright 2010-2016 OpenXcom Developers.
4  *
5  * This file is part of OpenXcom.
6  *
7  * OpenXcom is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * OpenXcom is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with OpenXcom. If not, see <http://www.gnu.org/licenses/>.
19  */
20 #include <string>
21 #include <vector>
22 #include <yaml-cpp/yaml.h>
23 
24 enum AlienRank{AR_HUMAN = -1, AR_COMMANDER, AR_LEADER, AR_ENGINEER, AR_MEDIC, AR_NAVIGATOR, AR_SOLDIER, AR_TERRORIST, AR_TERRORIST2};
25 
26 namespace OpenXcom
27 {
28 
33 class AlienRace
34 {
35 private:
36  std::string _id;
37  std::vector<std::string> _members;
38 public:
40  AlienRace(const std::string &id);
42  ~AlienRace();
44  void load(const YAML::Node& node);
46  std::string getId() const;
48  std::string getMember(int id) const;
49 };
50 
51 }
~AlienRace()
Cleans up the alien race ruleset.
Definition: AlienRace.cpp:32
std::string getId() const
Gets the alien race&#39;s id.
Definition: AlienRace.cpp:51
std::string getMember(int id) const
Gets a certain member of this alien race family.
Definition: AlienRace.cpp:61
Represents a specific race "family", or a "main race" if you wish.
Definition: AlienRace.h:33
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
Definition: BaseInfoState.cpp:40