LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 <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_KeyValue, NK_Mapping,
  NK_Sequence, NK_Alias
}
 

Public Member Functions

 Node (unsigned int Type, OwningPtr< Document > &, StringRef Anchor, StringRef Tag)
 
StringRef getAnchor () const
 Get the value of the anchor attached to this node. If it does not have one, getAnchor().size() will be 0. More...
 
StringRef getRawTag () const
 Get the tag as it was written in the document. This does not perform tag resolution. More...
 
std::string getVerbatimTag () const
 Get the verbatium tag for a given Node. This performs tag resoluton and substitution. 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
 
void * operator new (size_t Size, BumpPtrAllocator &Alloc, size_t Alignment=16) throw ()
 
void operator delete (void *Ptr, BumpPtrAllocator &Alloc, size_t) throw ()
 

Protected Member Functions

void operator delete (void *) throw ()
 
virtual ~Node ()
 

Protected Attributes

OwningPtr< Document > & Doc
 
SMRange SourceRange
 

Detailed Description

Abstract base class for all Nodes.

Definition at line 107 of file YAMLParser.h.

Member Enumeration Documentation

Enumerator
NK_Null 
NK_Scalar 
NK_KeyValue 
NK_Mapping 
NK_Sequence 
NK_Alias 

Definition at line 110 of file YAMLParser.h.

Constructor & Destructor Documentation

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

Definition at line 1604 of file YAMLParser.cpp.

References llvm::SMLoc::getFromPointer(), peekNext(), and SourceRange.

virtual llvm::yaml::Node::~Node ( )
inlineprotectedvirtual

Definition at line 165 of file YAMLParser.h.

Member Function Documentation

bool Node::failed ( ) const

Definition at line 1677 of file YAMLParser.cpp.

BumpPtrAllocator & Node::getAllocator ( )

Definition at line 1669 of file YAMLParser.cpp.

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 124 of file YAMLParser.h.

Token Node::getNext ( )

Definition at line 1661 of file YAMLParser.cpp.

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 128 of file YAMLParser.h.

Referenced by getVerbatimTag().

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

Definition at line 134 of file YAMLParser.h.

References SourceRange.

Referenced by llvm::yaml::Stream::printError().

unsigned int llvm::yaml::Node::getType ( ) const
inline
std::string Node::getVerbatimTag ( ) const
void llvm::yaml::Node::operator delete ( void *  Ptr,
BumpPtrAllocator Alloc,
size_t   
)
throw (
)
inline

Definition at line 155 of file YAMLParser.h.

void llvm::yaml::Node::operator delete ( void *  )
throw (
)
inlineprotected

Definition at line 163 of file YAMLParser.h.

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

Definition at line 149 of file YAMLParser.h.

Node * Node::parseBlockNode ( )

Definition at line 1665 of file YAMLParser.cpp.

References parseBlockNode().

Referenced by parseBlockNode().

Token & Node::peekNext ( )

Definition at line 1657 of file YAMLParser.cpp.

Referenced by Node().

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

Definition at line 1673 of file YAMLParser.cpp.

Referenced by getVerbatimTag().

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

Definition at line 135 of file YAMLParser.h.

References SourceRange.

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

Member Data Documentation

OwningPtr<Document>& llvm::yaml::Node::Doc
protected

Definition at line 160 of file YAMLParser.h.

Referenced by getVerbatimTag().

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

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