• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ParadoxGameConverters / Vic3ToHoI4 / 4189923376

pending completion
4189923376

Pull #265

github

GitHub
Merge e4a325e0a into eb87403de
Pull Request #265: Convert technology

154 of 154 new or added lines in 16 files covered. (100.0%)

1607 of 1796 relevant lines covered (89.48%)

86692.45 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/hoi4_world/map/strategic_region.h
1
#ifndef SRC_HOI4WORLD_MAP_STRATEGICREGION_H
2
#define SRC_HOI4WORLD_MAP_STRATEGICREGION_H
3

4

5

6
#include <compare>
7
#include <map>
8
#include <optional>
9
#include <string>
10
#include <vector>
11

12

13

14
namespace hoi4
15
{
16

17
class StrategicRegion
18
{
19
  public:
20
   explicit StrategicRegion(std::string filename,
×
21
       int id,
22
       std::string name,
23
       std::vector<int> old_provinces,
24
       std::map<std::string, std::string> static_modifiers,
25
       std::optional<std::string> naval_terrain,
26
       std::string weather):
×
27
       filename_(std::move(filename)),
×
28
       id_(id),
×
29
       name_(std::move(name)),
×
30
       old_provinces_(std::move(old_provinces)),
×
31
       static_modifiers_(std::move(static_modifiers)),
×
32
       naval_terrain_(std::move(naval_terrain)),
×
33
       weather_(std::move(weather))
×
34
   {
35
   }
×
36

37
   [[nodiscard]] const std::string_view GetFilename() const { return filename_; }
×
38
   [[nodiscard]] int GetID() const { return id_; }
×
39
   [[nodiscard]] std::string_view GetName() const { return name_; }
×
40
   [[nodiscard]] const std::vector<int>& GetOldProvinces() const { return old_provinces_; }
×
41
   [[nodiscard]] const std::vector<int>& GetNewProvinces() const { return new_provinces_; }
×
42
   [[nodiscard]] bool hasStaticModifiers() const { return !static_modifiers_.empty(); }
×
43
   [[nodiscard]] const std::map<std::string, std::string>& GetStaticModifiers() const { return static_modifiers_; }
×
44
   [[nodiscard]] const std::optional<std::string>& GetNavalTerrain() const { return naval_terrain_; }
×
45
   [[nodiscard]] std::string_view GetWeather() const { return weather_; }
×
46

47
   void AddNewProvince(const int province) { new_provinces_.push_back(province); }
×
48

49
   std::strong_ordering operator<=>(const StrategicRegion&) const = default;
50

51
  private:
52
   std::string filename_;
53
   int id_ = 0;
54
   std::string name_;
55
   std::vector<int> old_provinces_;
56
   std::vector<int> new_provinces_;
57
   std::map<std::string, std::string> static_modifiers_;
58
   std::optional<std::string> naval_terrain_;
59
   std::string weather_;
60
};
61

62
}  // namespace hoi4
63

64

65

66
#endif  // SRC_HOI4WORLD_MAP_STRATEGICREGION_H
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc