-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMapLoader.h
More file actions
30 lines (25 loc) · 809 Bytes
/
MapLoader.h
File metadata and controls
30 lines (25 loc) · 809 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
//
// Created by lllll on 2021-02-05.
//
#pragma once
#include <iostream>
#include <string>
#include "Map.h"
using namespace std;
class MapLoader {
public:
MapLoader();
MapLoader(string);
MapLoader(MapLoader* mapLoader);
~MapLoader();
friend ostream& operator<<(ostream& output, MapLoader * mapLoader);
MapLoader &operator=(const MapLoader &ml);
static Map* loadMap(string filePath);
static int counter;
static string lshape;
private:
static void validateMapFile(vector<string>,vector<string>,vector<string>,int, int,int);
static void split(string,const string&, vector<string>&);
static void split(string,const string&, vector<int>&);
void validateMapFile(vector<string> map_buffer, vector<string> continent_buffer, vector<string> regions_buffer);
};