LLVM: llvm::yaml::BlockScalarTraits< T > Struct Template Reference (original) (raw)
This class should be specialized by type that requires custom conversion to/from a YAML literal block scalar. More...
#include "[llvm/Support/YAMLTraits.h](YAMLTraits%5F8h%5Fsource.html)"
template<typename T>
struct llvm::yaml::BlockScalarTraits< T >
This class should be specialized by type that requires custom conversion to/from a YAML literal block scalar.
For example:
template <> struct BlockScalarTraits { static void output(const MyType &Value, void*, llvm::raw_ostream &Out) { // stream out custom formatting Out << Value; } static StringRef input(StringRef Scalar, void*, MyType &Value) { // parse scalar and set value // return empty string on success, or error string return StringRef(); } };
Definition at line 179 of file YAMLTraits.h.
The documentation for this struct was generated from the following file:
- include/llvm/Support/YAMLTraits.h