From 39165338e02c8507198344431c0e90653758e01d Mon Sep 17 00:00:00 2001 From: Jesse Beder Date: Sun, 20 May 2012 01:46:08 -0500 Subject: [PATCH] Added sandbox to play with --- util/CMakeLists.txt | 2 ++ util/sandbox.cpp | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 util/sandbox.cpp diff --git a/util/CMakeLists.txt b/util/CMakeLists.txt index e69de29..1321b2a 100644 --- a/util/CMakeLists.txt +++ b/util/CMakeLists.txt @@ -0,0 +1,2 @@ +add_executable(sandbox sandbox.cpp) +target_link_libraries(sandbox yaml-cpp) diff --git a/util/sandbox.cpp b/util/sandbox.cpp new file mode 100644 index 0000000..e0979f2 --- /dev/null +++ b/util/sandbox.cpp @@ -0,0 +1,18 @@ +#include "yaml-cpp/yaml.h" +#include + +int main() +{ + YAML::Emitter out; + out << YAML::BeginSeq; + out << "foo"; + out << YAML::Comment("Skills"); + out << YAML::BeginMap; + out << YAML::Key << "attack" << YAML::Value << 23; + out << YAML::Key << "intelligence" << YAML::Value << 56; + out << YAML::EndMap; + out << YAML::EndSeq; + + std::cout << out.c_str() << "\n"; + return 0; +}