• 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/maps/map_data.h
1
#ifndef SRC_MAPS_MAPDATA_H
2
#define SRC_MAPS_MAPDATA_H
3

4

5

6
#include <map>
7
#include <optional>
8
#include <set>
9
#include <string_view>
10
#include <unordered_map>
11

12
#include "external/commonItems/Color.h"
13
#include "external/commonItems/ModLoader/ModFilesystem.h"
14
#include "src/maps/point.h"
15
#include "src/maps/province_definitions.h"
16
#include "src/maps/province_points.h"
17

18

19

20
namespace maps
21
{
22

23
using BorderPoints = std::vector<Point>;
24
using BordersWith = std::map<std::string, BorderPoints>;
25

26

27
class MapData
28
{
29
  public:
30
   MapData(std::map<std::string, std::set<std::string>> province_neighbors,
×
31
       std::map<std::string, BordersWith> borders,
32
       std::unordered_map<std::string, ProvincePoints> the_province_points,
33
       ProvinceDefinitions province_definitions,
34
       std::map<Point, std::string> points_to_provinces):
×
35
       province_neighbors_(std::move(province_neighbors)),
×
36
       borders_(std::move(borders)),
×
37
       the_province_points_(std::move(the_province_points)),
×
38
       province_definitions_(std::move(province_definitions)),
×
39
       points_to_provinces_(std::move(points_to_provinces))
×
40
   {
41
   }
×
42

43
   [[nodiscard]] std::set<std::string> GetNeighbors(const std::string& province) const;
44
   [[nodiscard]] std::optional<Point> GetSpecifiedBorderCenter(const std::string& main_province,
45
       const std::string& neighbor) const;
46
   [[nodiscard]] std::optional<Point> GetAnyBorderCenter(const std::string& province) const;
47
   [[nodiscard]] std::optional<std::string> GetProvinceName(const Point& point) const;
48

49
   [[nodiscard]] std::optional<ProvincePoints> GetProvincePoints(const std::string& province) const;
50

51
  private:
52
   std::map<std::string, std::set<std::string>> province_neighbors_;
53
   std::map<std::string, BordersWith> borders_;
54
   std::unordered_map<std::string, ProvincePoints> the_province_points_;
55

56
   ProvinceDefinitions province_definitions_;
57
   std::map<Point, std::string> points_to_provinces_;
58
};
59

60
}  // namespace maps
61

62

63

64
#endif  // SRC_MAPS_MAPDATA_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