2014-11-21 14:43:27 +00:00
|
|
|
#ifndef CONVERTER_INCLUDED
|
|
|
|
#define CONVERTER_INCLUDED
|
2014-11-25 12:51:25 +00:00
|
|
|
|
2014-11-21 14:43:27 +00:00
|
|
|
#include <vector>
|
2014-11-25 12:51:25 +00:00
|
|
|
#include <string>
|
2014-11-24 12:03:55 +00:00
|
|
|
#include "tinyxml2.hh"
|
2014-11-21 14:43:27 +00:00
|
|
|
|
2014-11-25 12:51:25 +00:00
|
|
|
using namespace tinyxml2;
|
2014-11-21 14:43:27 +00:00
|
|
|
class Converter {
|
|
|
|
public:
|
2014-11-25 12:51:25 +00:00
|
|
|
Converter(std::string level);
|
2014-11-21 14:43:27 +00:00
|
|
|
Converter();
|
|
|
|
~Converter();
|
2014-11-25 12:51:25 +00:00
|
|
|
void updateComposition(unsigned int idG, unsigned int idB, unsigned int posX, unsigned int posZ);
|
2014-11-21 14:43:27 +00:00
|
|
|
std::vector<unsigned int> newComposition(unsigned int type, unsigned int posX, unsigned int posZ);
|
|
|
|
void deleteComposition(unsigned int idG, unsigned int idB);
|
2014-11-25 12:51:25 +00:00
|
|
|
void save();
|
|
|
|
std::vector<unsigned int> getNextId();
|
2014-11-21 14:43:27 +00:00
|
|
|
|
|
|
|
private:
|
2014-11-25 12:51:25 +00:00
|
|
|
std::vector<unsigned int> nextId;
|
|
|
|
std::string xmlFile;
|
|
|
|
XMLDocument* doc = new XMLDocument();
|
2014-11-28 16:05:49 +00:00
|
|
|
XMLDocument* compositions = new XMLDocument();
|
2014-11-21 14:43:27 +00:00
|
|
|
void newObject(unsigned int type, unsigned int idG, unsigned int idB, unsigned int posX, unsigned int posZ);
|
|
|
|
};
|
2014-11-25 12:51:25 +00:00
|
|
|
|
2014-11-21 14:43:27 +00:00
|
|
|
#endif
|