yaml-cpp

FORK: A YAML parser and emitter in C++
git clone https://git.neptards.moe/neptards/yaml-cpp.git
Log | Files | Refs | README | LICENSE

directives.cpp (374B)


      1 #include "directives.h"
      2 
      3 namespace YAML {
      4 Directives::Directives() : version{true, 1, 2}, tags{} {}
      5 
      6 const 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