LLVM  4.0.0
Public Member Functions | List of all members
llvm::yaml::Output Class Reference

The Output class is used to generate a yaml document from in-memory structs and vectors. More...

#include <YAMLTraits.h>

Inheritance diagram for llvm::yaml::Output:
[legend]
Collaboration diagram for llvm::yaml::Output:
[legend]

Public Member Functions

 Output (llvm::raw_ostream &, void *Ctxt=nullptr, int WrapColumn=70)
 
 ~Output () override
 
bool outputting () override
 
bool mapTag (StringRef, bool) override
 
void beginMapping () override
 
void endMapping () override
 
bool preflightKey (const char *key, bool, bool, bool &, void *&) override
 
void postflightKey (void *) override
 
std::vector< StringRefkeys () override
 
void beginFlowMapping () override
 
void endFlowMapping () override
 
unsigned beginSequence () override
 
void endSequence () override
 
bool preflightElement (unsigned, void *&) override
 
void postflightElement (void *) override
 
unsigned beginFlowSequence () override
 
bool preflightFlowElement (unsigned, void *&) override
 
void postflightFlowElement (void *) override
 
void endFlowSequence () override
 
void beginEnumScalar () override
 
bool matchEnumScalar (const char *, bool) override
 
bool matchEnumFallback () override
 
void endEnumScalar () override
 
bool beginBitSetScalar (bool &) override
 
bool bitSetMatch (const char *, bool) override
 
void endBitSetScalar () override
 
void scalarString (StringRef &, bool) override
 
void blockScalarString (StringRef &) override
 
void setError (const Twine &message) override
 
bool canElideEmptySequence () override
 
void beginDocuments ()
 
bool preflightDocument (unsigned)
 
void postflightDocument ()
 
void endDocuments ()
 
- Public Member Functions inherited from llvm::yaml::IO
 IO (void *Ctxt=nullptr)
 
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 FBT , typename T >
void enumFallback (T &Val)
 
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)
 
template<typename T >
void maskedBitSetCase (T &Val, const char *Str, T ConstVal, T Mask)
 
template<typename T >
void maskedBitSetCase (T &Val, const char *Str, uint32_t ConstVal, uint32_t Mask)
 
void * getContext ()
 
void setContext (void *)
 
template<typename T >
void mapRequired (const char *Key, T &Val)
 
template<typename T , typename Context >
void mapRequired (const char *Key, T &Val, Context &Ctx)
 
template<typename T >
void mapOptional (const char *Key, T &Val)
 
template<typename T >
void mapOptional (const char *Key, T &Val, const T &Default)
 
template<typename T , typename Context >
std::enable_if
< has_SequenceTraits< T >
::value, void >::type 
mapOptionalWithContext (const char *Key, T &Val, Context &Ctx)
 
template<typename T , typename Context >
void mapOptionalWithContext (const char *Key, Optional< T > &Val, Context &Ctx)
 
template<typename T , typename Context >
std::enable_if
<!has_SequenceTraits< T >
::value, void >::type 
mapOptionalWithContext (const char *Key, T &Val, Context &Ctx)
 
template<typename T , typename Context >
void mapOptionalWithContext (const char *Key, T &Val, const T &Default, Context &Ctx)
 

Detailed Description

The Output class is used to generate a yaml document from in-memory structs and vectors.

Definition at line 1249 of file YAMLTraits.h.

Constructor & Destructor Documentation

Output::Output ( llvm::raw_ostream yout,
void *  Ctxt = nullptr,
int  WrapColumn = 70 
)

Definition at line 400 of file YAMLTraits.cpp.

Output::~Output ( )
override

Definition at line 413 of file YAMLTraits.cpp.

Member Function Documentation

bool Output::beginBitSetScalar ( bool DoClear)
overridevirtual

Implements llvm::yaml::IO.

Definition at line 590 of file YAMLTraits.cpp.

void Output::beginDocuments ( )

Definition at line 500 of file YAMLTraits.cpp.

Referenced by llvm::yaml::operator<<().

void Output::beginEnumScalar ( )
overridevirtual

Implements llvm::yaml::IO.

Definition at line 565 of file YAMLTraits.cpp.

void Output::beginFlowMapping ( )
overridevirtual
unsigned Output::beginFlowSequence ( )
overridevirtual
void Output::beginMapping ( )
overridevirtual
unsigned Output::beginSequence ( )
overridevirtual
bool Output::bitSetMatch ( const char *  Str,
bool  Matches 
)
overridevirtual

Implements llvm::yaml::IO.

Definition at line 598 of file YAMLTraits.cpp.

void Output::blockScalarString ( StringRef S)
overridevirtual
bool Output::canElideEmptySequence ( )
overridevirtual
void Output::endBitSetScalar ( )
overridevirtual

Implements llvm::yaml::IO.

Definition at line 608 of file YAMLTraits.cpp.

void Output::endDocuments ( )

Definition at line 513 of file YAMLTraits.cpp.

Referenced by llvm::yaml::operator<<().

void Output::endEnumScalar ( )
overridevirtual

Implements llvm::yaml::IO.

Definition at line 585 of file YAMLTraits.cpp.

References llvm_unreachable.

void Output::endFlowMapping ( )
overridevirtual
void Output::endFlowSequence ( )
overridevirtual
void Output::endMapping ( )
overridevirtual
void Output::endSequence ( )
overridevirtual
std::vector< StringRef > Output::keys ( )
overridevirtual

Implements llvm::yaml::IO.

Definition at line 458 of file YAMLTraits.cpp.

References llvm::report_fatal_error().

bool Output::mapTag ( StringRef  Tag,
bool  Use 
)
overridevirtual
bool Output::matchEnumFallback ( )
overridevirtual

Implements llvm::yaml::IO.

Definition at line 578 of file YAMLTraits.cpp.

bool Output::matchEnumScalar ( const char *  Str,
bool  Match 
)
overridevirtual

Implements llvm::yaml::IO.

Definition at line 569 of file YAMLTraits.cpp.

bool Output::outputting ( )
overridevirtual

Implements llvm::yaml::IO.

Definition at line 416 of file YAMLTraits.cpp.

void Output::postflightDocument ( )

Definition at line 510 of file YAMLTraits.cpp.

Referenced by llvm::yaml::operator<<().

void Output::postflightElement ( void *  )
overridevirtual

Implements llvm::yaml::IO.

Definition at line 531 of file YAMLTraits.cpp.

void Output::postflightFlowElement ( void *  )
overridevirtual

Implements llvm::yaml::IO.

Definition at line 561 of file YAMLTraits.cpp.

void Output::postflightKey ( void *  )
overridevirtual
bool Output::preflightDocument ( unsigned  index)

Definition at line 504 of file YAMLTraits.cpp.

Referenced by llvm::yaml::operator<<().

bool Output::preflightElement ( unsigned  ,
void *&   
)
overridevirtual

Implements llvm::yaml::IO.

Definition at line 527 of file YAMLTraits.cpp.

bool Output::preflightFlowElement ( unsigned  ,
void *&   
)
overridevirtual

Implements llvm::yaml::IO.

Definition at line 548 of file YAMLTraits.cpp.

References i.

bool Output::preflightKey ( const char *  key,
bool  Required,
bool  SameAsDefault,
bool UseDefault,
void *&   
)
overridevirtual

Implements llvm::yaml::IO.

Definition at line 462 of file YAMLTraits.cpp.

References llvm::SmallVectorTemplateCommon< T, typename >::back().

void Output::scalarString ( StringRef S,
bool  MustQuote 
)
overridevirtual
void Output::setError ( const Twine message)
overridevirtual

Implements llvm::yaml::IO.

Definition at line 661 of file YAMLTraits.cpp.


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