- First commit

This commit is contained in:
2025-11-20 17:31:52 +01:00
commit 72c7574391
65 changed files with 5632 additions and 0 deletions

31
main.cpp Normal file
View File

@@ -0,0 +1,31 @@
#include <iostream>
#include <fstream>
#include <sstream>
#include "yamal.hpp"
int main(int argc, char* argv[]) {
/*if (argc < 2) {
std::cerr << "Usage: " << argv[0] << " <yaml_file>\n";
return 1;
}*/
std::ifstream file("data/room/01.yaml"); //argv[1]);
if (!file) {
std::cerr << "Error: Could not open file " << argv[1] << "\n";
return 1;
}
std::ostringstream buffer;
buffer << file.rdbuf();
std::string yamlText = buffer.str();
yamal_ns::yamal root;
root.deserialize(yamlText);
//for (auto &att : root.attributes())
// std::cout << att.first << ": " << att.second.asString() << std::endl;
std::cout << root.serialize() << std::endl;
return 0;
}