LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Member Functions | Static Public Member Functions | List of all members
llvm::yaml::Input Class Reference

#include <YAMLTraits.h>

Inheritance diagram for llvm::yaml::Input:
Inheritance graph
[legend]
Collaboration diagram for llvm::yaml::Input:
Collaboration graph
[legend]

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 ()
 
- Public Member Functions inherited from llvm::yaml::IO
 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)
 

Detailed Description

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.

Constructor & Destructor Documentation

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.

Member Function Documentation

static bool llvm::yaml::Input::classof ( const IO io)
inlinestatic

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 ( )

The documentation for this class was generated from the following files: