-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathxml_loader.hpp
More file actions
25 lines (22 loc) · 852 Bytes
/
xml_loader.hpp
File metadata and controls
25 lines (22 loc) · 852 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
#ifndef XML_LOADER_HPP
#define XML_LOADER_HPP
#include <cstring>
#include <boost/property_tree/ptree.hpp>
#include <boost/property_tree/xml_parser.hpp>
#include <boost/foreach.hpp>
//#include <boost/regex.hpp>
#include "map.hpp"
#include "entity_manager.hpp"
#include "unit_manager.hpp"
#include "unit.hpp"
class XmlLoader {
private:
static Tile* loadTile(boost::property_tree::ptree tile_tree, Map* map = NULL, Material* mat_made_of = NULL);
static Doodad* loadWall(boost::property_tree::ptree wall_tree, DoodadManager* doodad_manager, Material* mat_made_of = NULL);
static bool hasTag(std::string text, std::string tag);
static int parseTags(std::string tags);
public:
static void loadUnits(UnitManager* unit_manager, std::string filename);
static void loadMaterials(DoodadManager* doodad_manager, Map* map, std::string filename);
};
#endif