LLVM API Documentation
#include <YAMLTraits.h>
Public Member Functions | |
Input (StringRef InputContent, void *Ctxt=NULL, SourceMgr::DiagHandlerTy DiagHandler=NULL, void *DiagHandlerCtxt=NULL) | |
~Input () | |
llvm::error_code | error () |
bool | setCurrentDocument () |
void | nextDocument () |
![]() | |
IO (void *Ctxt=NULL) | |
virtual | ~IO () |
template<typename T > | |
void | enumCase (T &Val, const char *Str, const T ConstVal) |
template<typename T > | |
void | enumCase (T &Val, const char *Str, const uint32_t ConstVal) |
template<typename T > | |
void | bitSetCase (T &Val, const char *Str, const T ConstVal) |
template<typename T > | |
void | bitSetCase (T &Val, const char *Str, const uint32_t ConstVal) |
void * | getContext () |
void | setContext (void *) |
template<typename T > | |
void | mapRequired (const char *Key, T &Val) |
template<typename T > | |
llvm::enable_if_c < has_SequenceTraits< T > ::value, void >::type | mapOptional (const char *Key, T &Val) |
template<typename T > | |
llvm::enable_if_c <!has_SequenceTraits< T > ::value, void >::type | mapOptional (const char *Key, T &Val) |
template<typename T > | |
void | mapOptional (const char *Key, T &Val, const T &Default) |
Static Public Member Functions | |
static bool | classof (const IO *io) |
The Input class is used to parse a yaml document into in-memory structs and vectors.
It works by using YAMLParser to do a syntax parse of the entire yaml document, then the Input class builds a graph of HNodes which wraps each yaml Node. The extra layer is buffering. The low level yaml parser only lets you look at each node once. The buffering layer lets you search and interate multiple times. This is necessary because the mapRequired() method calls may not be in the same order as the keys in the document.
Definition at line 686 of file YAMLTraits.h.
Input::Input | ( | StringRef | InputContent, |
void * | Ctxt = NULL , |
||
SourceMgr::DiagHandlerTy | DiagHandler = NULL , |
||
void * | DiagHandlerCtxt = NULL |
||
) |
Definition at line 44 of file YAMLTraits.cpp.
References llvm::SourceMgr::setDiagHandler().
Input::~Input | ( | ) |
Definition at line 56 of file YAMLTraits.cpp.
Definition at line 700 of file YAMLTraits.h.
References llvm::yaml::IO::outputting().
error_code Input::error | ( | ) |
Definition at line 59 of file YAMLTraits.cpp.
Referenced by llvm::yaml::operator>>(), and llvm::yaml2mcmodule().
void Input::nextDocument | ( | ) |
Definition at line 93 of file YAMLTraits.cpp.
Referenced by llvm::yaml::operator>>().
bool Input::setCurrentDocument | ( | ) |
Definition at line 72 of file YAMLTraits.cpp.
References llvm::OwningPtr< T >::get(), llvm::errc::invalid_argument, llvm::make_error_code(), N, and llvm::OwningPtr< T >::reset().
Referenced by llvm::yaml::operator>>().