| 4 | Directives::Directives() : version{true, 1, 2}, tags{} {} |
| 5 | |
| 6 | std::string Directives::TranslateTagHandle( |
| 7 | const std::string& handle) const { |
| 8 | auto it = tags.find(handle); |
| 9 | if (it == tags.end()) { |
| 10 | if (handle == "!!") |
| 11 | return "tag:yaml.org,2002:"; |
| 12 | return handle; |
| 13 | } |
| 14 | |
| 15 | return it->second; |
| 16 | } |
| 17 | } // namespace YAML |