test.cc File Reference #include <fstream> #include <string> #include <iostream> #include "yaml.h"
Include dependency graph for test.cc:
![]() Go to the source code of this file.
Function Documentation
Definition at line 8 of file test.cc. References Rivet::s. { ifstream io("test.yaml"); YAML::Parser parser(io); YAML::Node doc; parser.GetNextDocument(doc); const YAML::Node& things = doc["things"]; string s; for (YAML::Iterator it = things.begin(); it != things.end(); ++it) { *it >> s; cout << "&&& " << s << " &&&" << endl; } const YAML::Node& stuff = doc["stuff"]; int a; for (YAML::Iterator it = stuff.begin(); it != stuff.end(); ++it) { *it >> a; cout << "%%% " << a << " %%%" << endl; } const YAML::Node& desc = doc["desc"]; string d; desc >> d; cout << "*** " << d << " ***" << endl; parser.GetNextDocument(doc); return 0; } Generated on Fri Dec 21 2012 15:03:49 for The Rivet MC analysis system by ![]() |