LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
llvm::yaml::MappingTraits< T > Struct Template Reference

#include <YAMLTraits.h>

Detailed Description

template<class T>
struct llvm::yaml::MappingTraits< T >

This class should be specialized by any type that needs to be converted to/from a YAML mapping. For example:

struct ScalarBitSetTraits<MyStruct> {
  static void mapping(IO &io, MyStruct &s) {
    io.mapRequired("name", s.name);
    io.mapRequired("size", s.size);
    io.mapOptional("age",  s.age);
  }
};  

Definition at line 45 of file YAMLTraits.h.


The documentation for this struct was generated from the following file: