mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-10 04:51:17 +00:00
Added an iterator class that can iterate through both sequence and map nodes.
This commit is contained in:
@@ -41,8 +41,17 @@ namespace YAML
|
||||
pScanner->EatNextToken();
|
||||
}
|
||||
|
||||
const Node& Document::GetRoot() const
|
||||
{
|
||||
if(!m_pRoot)
|
||||
throw;
|
||||
|
||||
return *m_pRoot;
|
||||
}
|
||||
|
||||
std::ostream& operator << (std::ostream& out, const Document& doc)
|
||||
{
|
||||
out << "---\n";
|
||||
if(!doc.m_pRoot) {
|
||||
out << "{empty node}\n";
|
||||
return out;
|
||||
|
Reference in New Issue
Block a user