OpenXcom  1.0
Open-source clone of the original X-Com
Region.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 <vector>
21 #include <yaml-cpp/yaml.h>
22 
23 namespace OpenXcom
24 {
25 
26 class RuleRegion;
27 
33 class Region
34 {
35 private:
36  RuleRegion *_rules;
37  std::vector<int> _activityXcom, _activityAlien;
38 public:
40  Region(RuleRegion *rules);
42  ~Region();
44  void load(const YAML::Node& node);
46  YAML::Node save() const;
48  RuleRegion *getRules() const;
50  void addActivityXcom(int activity);
52  void addActivityAlien(int activity);
54  std::vector<int> &getActivityXcom();
56  std::vector<int> &getActivityAlien();
58  void newMonth();
59 };
60 
61 }
void newMonth()
start new month of activity
Definition: Region.cpp:113
void addActivityAlien(int activity)
add alien activity in this region
Definition: Region.cpp:87
RuleRegion * getRules() const
Gets the region&#39;s ruleset.
Definition: Region.cpp:69
YAML::Node save() const
Saves the region to YAML.
Definition: Region.cpp:56
std::vector< int > & getActivityXcom()
get xcom activity to this region
Definition: Region.cpp:96
void addActivityXcom(int activity)
add xcom activity in this region
Definition: Region.cpp:78
std::vector< int > & getActivityAlien()
get xcom activity to this region
Definition: Region.cpp:105
void load(const YAML::Node &node)
Loads the region from YAML.
Definition: Region.cpp:46
Region(RuleRegion *rules)
Creates a new region of the specified type.
Definition: Region.cpp:29
Represents a region of the world.
Definition: Region.h:33
Represents a specific region of the world.
Definition: RuleRegion.h:71
~Region()
Cleans up the region.
Definition: Region.cpp:38
Definition: BaseInfoState.cpp:40