LLVM  8.0.1
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
llvm::yaml::Node Class Reference

Abstract base class for all Nodes. More...

#include "llvm/Support/YAMLParser.h"

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

Public Types

enum  NodeKind {
  NK_Null, NK_Scalar, NK_BlockScalar, NK_KeyValue,
  NK_Mapping, NK_Sequence, NK_Alias
}
 

Public Member Functions

 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
 
virtual void skip ()
 
unsigned int getType () const
 

Protected Member Functions

 ~Node ()=default
 

Protected Attributes

std::unique_ptr< Document > & Doc
 
SMRange SourceRange
 

Detailed Description

Abstract base class for all Nodes.

Definition at line 114 of file YAMLParser.h.

Member Enumeration Documentation

◆ NodeKind

Enumerator
NK_Null 
NK_Scalar 
NK_BlockScalar 
NK_KeyValue 
NK_Mapping 
NK_Sequence 
NK_Alias 

Definition at line 118 of file YAMLParser.h.

Constructor & Destructor Documentation

◆ Node() [1/2]

Node::Node ( unsigned int  Type,
std::unique_ptr< Document > &  D,
StringRef  Anchor,
StringRef  Tag 
)

Definition at line 1802 of file YAMLParser.cpp.

◆ Node() [2/2]

llvm::yaml::Node::Node ( const Node )
delete

◆ ~Node()

llvm::yaml::Node::~Node ( )
protecteddefault

Member Function Documentation

◆ failed()

bool Node::failed ( ) const

Definition at line 1874 of file YAMLParser.cpp.

References Doc.

Referenced by llvm::yaml::KeyValueNode::getValue(), and llvm::yaml::SequenceNode::increment().

◆ getAllocator()

BumpPtrAllocator & Node::getAllocator ( )

Definition at line 1866 of file YAMLParser.cpp.

References Doc.

Referenced by llvm::yaml::KeyValueNode::getKey(), and llvm::yaml::KeyValueNode::getValue().

◆ getAnchor()

StringRef llvm::yaml::Node::getAnchor ( ) const
inline

Get the value of the anchor attached to this node.

If it does not have one, getAnchor().size() will be 0.

Definition at line 150 of file YAMLParser.h.

◆ getNext()

Token Node::getNext ( )

◆ getRawTag()

StringRef llvm::yaml::Node::getRawTag ( ) const
inline

Get the tag as it was written in the document.

This does not perform tag resolution.

Definition at line 154 of file YAMLParser.h.

Referenced by getVerbatimTag().

◆ getSourceRange()

SMRange llvm::yaml::Node::getSourceRange ( ) const
inline

◆ getType()

unsigned int llvm::yaml::Node::getType ( ) const
inline

◆ getVerbatimTag()

std::string Node::getVerbatimTag ( ) const

◆ operator delete() [1/2]

void llvm::yaml::Node::operator delete ( void *  Ptr,
BumpPtrAllocator Alloc,
size_t  Size 
)
inlinenoexcept

Definition at line 141 of file YAMLParser.h.

◆ operator delete() [2/2]

void llvm::yaml::Node::operator delete ( void *  )
deletenoexcept

◆ operator new()

void* llvm::yaml::Node::operator new ( size_t  Size,
BumpPtrAllocator Alloc,
size_t  Alignment = 16 
)
inlinenoexcept

Definition at line 136 of file YAMLParser.h.

◆ operator=()

void llvm::yaml::Node::operator= ( const Node )
delete

◆ parseBlockNode()

Node * Node::parseBlockNode ( )

◆ peekNext()

Token & Node::peekNext ( )

◆ setError()

void Node::setError ( const Twine Message,
Token Location 
) const

◆ setSourceRange()

void llvm::yaml::Node::setSourceRange ( SMRange  SR)
inline

Definition at line 161 of file YAMLParser.h.

References llvm::yaml::Stream::failed().

◆ skip()

virtual void llvm::yaml::Node::skip ( )
inlinevirtual

Member Data Documentation

◆ Doc

std::unique_ptr<Document>& llvm::yaml::Node::Doc
protected

◆ SourceRange

SMRange llvm::yaml::Node::SourceRange
protected

Definition at line 177 of file YAMLParser.h.


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