LLVM  16.0.0git
Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
llvm::yaml::MappingNode Class Referencefinal

Represents a YAML map created from either a block map for a flow map. More...

#include "llvm/Support/YAMLParser.h"

Inheritance diagram for llvm::yaml::MappingNode:
Inheritance graph
Collaboration diagram for llvm::yaml::MappingNode:
Collaboration graph

Public Types

enum  MappingType { MT_Block, MT_Flow, MT_Inline }
using iterator = basic_collection_iterator< MappingNode, KeyValueNode >
- Public Types inherited from llvm::yaml::Node
enum  NodeKind {
  NK_Null, NK_Scalar, NK_BlockScalar, NK_KeyValue,
  NK_Mapping, NK_Sequence, NK_Alias

Public Member Functions

 MappingNode (std::unique_ptr< Document > &D, StringRef Anchor, StringRef Tag, MappingType MT)
iterator begin ()
iterator end ()
void skip () override
- Public Member Functions inherited from llvm::yaml::Node
 Node (unsigned int Type, std::unique_ptr< Document > &, StringRef Anchor, StringRef Tag)
 Node (const Node &)=delete
void operator= (const Node &)=delete
void * operator new (size_t Size, BumpPtrAllocator &Alloc, size_t Alignment=16) noexcept
void operator delete (void *Ptr, BumpPtrAllocator &Alloc, size_t Size) noexcept
void operator delete (void *) noexcept=delete
StringRef getAnchor () const
 Get the value of the anchor attached to this node. More...
StringRef getRawTag () const
 Get the tag as it was written in the document. More...
std::string getVerbatimTag () const
 Get the verbatium tag for a given Node. More...
SMRange getSourceRange () const
void setSourceRange (SMRange SR)
TokenpeekNext ()
Token getNext ()
NodeparseBlockNode ()
BumpPtrAllocatorgetAllocator ()
void setError (const Twine &Message, Token &Location) const
bool failed () const
unsigned int getType () const

Static Public Member Functions

static bool classof (const Node *N)


class basic_collection_iterator< MappingNode, KeyValueNode >
template<class T >
T::iterator yaml::begin (T &)
template<class T >
void yaml::skip (T &)

Additional Inherited Members

- Protected Member Functions inherited from llvm::yaml::Node
 ~Node ()=default
- Protected Attributes inherited from llvm::yaml::Node
std::unique_ptr< Document > & Doc
SMRange SourceRange

Detailed Description

Represents a YAML map created from either a block map for a flow map.

This parses the YAML stream as increment() is called.

Example: Name: _main Scope: Global

Definition at line 413 of file YAMLParser.h.

Member Typedef Documentation

◆ iterator

Definition at line 429 of file YAMLParser.h.

Member Enumeration Documentation

◆ MappingType


An inline mapping node is used for "[key: value]".

Definition at line 417 of file YAMLParser.h.

Constructor & Destructor Documentation

◆ MappingNode()

llvm::yaml::MappingNode::MappingNode ( std::unique_ptr< Document > &  D,
StringRef  Anchor,
StringRef  Tag,
MappingType  MT 

Definition at line 423 of file YAMLParser.h.

Member Function Documentation

◆ begin()

iterator llvm::yaml::MappingNode::begin ( )

Definition at line 434 of file YAMLParser.h.

References llvm::yaml::begin().

◆ classof()

static bool llvm::yaml::MappingNode::classof ( const Node N)

Definition at line 440 of file YAMLParser.h.

References N, and llvm::yaml::Node::NK_Mapping.

◆ end()

iterator llvm::yaml::MappingNode::end ( )

Definition at line 436 of file YAMLParser.h.

◆ skip()

void llvm::yaml::MappingNode::skip ( )

Reimplemented from llvm::yaml::Node.

Definition at line 438 of file YAMLParser.h.

References llvm::yaml::skip().

Friends And Related Function Documentation

◆ basic_collection_iterator< MappingNode, KeyValueNode >

Definition at line 427 of file YAMLParser.h.

◆ yaml::begin

template<class T >
T::iterator yaml::begin ( T )

◆ yaml::skip

template<class T >
void yaml::skip ( T )

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