directives.cpp 454 Bytes
Newer Older
1
#include "directives.h"
2
3
4

namespace YAML
{
5
	Directives::Directives()
6
7
	{
		// version
8
		version.isDefault = true;
9
10
11
		version.major = 1;
		version.minor = 2;
	}
12
13
	
	const std::string Directives::TranslateTagHandle(const std::string& handle) const
14
15
	{
		std::map <std::string, std::string>::const_iterator it = tags.find(handle);
16
17
18
		if(it == tags.end()) {
			if(handle == "!!")
				return "tag:yaml.org,2002:";
19
			return handle;
20
		}
21
		
22
23
24
		return it->second;
	}
}