<commit_before>#import <iostream>

class Room {
  private:
	const int width;
	const int height;
  public:
	
	Room(){}
	Room(int w, int h) {
		width = w;
		height = h;
	}
	
	void print_dimensions();
};

void Room::print_dimensions() {
	std::cout << width << "x" << height << std::endl;
}

int main() {
	Room a_room(25,25);

	a_room.print_dimensions();
	
	return 0;
}<commit_msg>Add start of xml parser for room<commit_after>#import <iostream>

class Room {
  private:
	const int width;
	const int height;
  public:
	
	Room(){}
	Room(int w, int h) {
		width = w;
		height = h;
	}
	
	void print_dimensions();
	bool loadFromXMLFile();
};

void Room::print_dimensions() {
	std::cout << width << "x" << height << std::endl;
}

bool Room::loadFromXMLFile (const char* filename) {
	// Create xml dom
	TiXmlDocument doc(filename);
	
	// Load the document
	if (!doc.LoadFile()) {
		cerr << "File " << filename << " not found" << endl;
		return false;
	}

	// Get root element
	TiXmlElement* root = doc.FirstChildElement();
	if (root == NULL) {
		cerr << "XML Error: No root element" << endl;
		return false;
	}

	// Root element should be 'veld'
	if (root->Value() !== "VELD") {
		cerr << "XML Error: Root element has to be called 'veld'" << endl;
		return false;
	}
	
	// Parse the tags 'NAAM', 'LENGTE', 'BREEDTE', 'SPELER', 'OBSTAKEL'
	for (TiXmlElement* elem = root->FirstChildElement(); elem != NULL; elem = elem->NextSiblingElement()) {
		string elemName = elem->Value();
		
		if (elemName == "NAAM" || elemName == "LENGTE" || elemName == "BREEDTE") {
			// Get the text between the name, length and width tags
			TiXmlNode* node = elem->FirstChild();
			TiXmlText* text = node->ToText();
			string str = text->Value();
			
			if (elemName == "NAAM") this->set_name(str);
			if (elemName == "LENGTE") this->set_length(stoi(str));
			if (elemName == "BREEDTE") this->set_width(stoi(str));
		}

		if (elemName == "OBSTAKEL") {

		}

		if (elemName == "SPELER") {
			
		}
	}

	return true;
}

int main() {
	Room a_room(25,25);

	a_room.print_dimensions();
	
	return 0;
}
{'fraction_non_alphanumeric': 0.16328413284132842, 'fraction_numerical': 0.004612546125461255, 'mean_word_length': 2.8663101604278074, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4957727', 'n_tokens_mistral': 859, 'n_tokens_neox': 766, 'n_words': 209}