LLVM  6.0.0svn
llvm::yaml::ScalarEnumerationTraits< T > Struct Template Reference

This class should be specialized by any integral type that converts to/from a YAML scalar where there is a one-to-one mapping between in-memory values and a string in YAML. More...

#include "llvm/Support/YAMLTraits.h"

Detailed Description

template<typename T>
struct llvm::yaml::ScalarEnumerationTraits< T >

This class should be specialized by any integral type that converts to/from a YAML scalar where there is a one-to-one mapping between in-memory values and a string in YAML.

For example:

struct ScalarEnumerationTraits<Colors> { static void enumeration(IO &io, Colors &value) { io.enumCase(value, "red", cRed); io.enumCase(value, "blue", cBlue); io.enumCase(value, "green", cGreen); } };

Definition at line 98 of file YAMLTraits.h.


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