Saxum/converter/converter.hh

30 lines
899 B
C++
Raw Normal View History

#ifndef CONVERTER_INCLUDED
#define CONVERTER_INCLUDED
#include <vector>
#include <string>
2014-11-24 12:03:55 +00:00
#include "tinyxml2.hh"
using namespace tinyxml2;
class Converter {
public:
Converter(std::string level);
Converter();
~Converter();
void updateComposition(int idG, int idB, float posX, float posZ); //updates the position of a composition
std::vector<int> newComposition(int type, float posX, float posZ);//creates a new composition and returns its ID
void deleteComposition(int idG, int idB);
void save(); //writes the xml to file
std::vector<int> getNextID(); //returns the next unused ID
private:
2014-12-08 13:19:23 +00:00
std::vector<int> nextID;
void errorCheck(XMLError error);
std::string xmlFile;
XMLDocument* doc = new XMLDocument();
XMLDocument* compositions = new XMLDocument();
};
#endif