LLVM API Documentation

Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
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]

List of all members.

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 getAnchor () const
 Get the value of the anchor attached to this node. If it does not have one, getAnchor().size() will be 0.
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 108 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 
)

Definition at line 1591 of file YAMLParser.cpp.

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

virtual llvm::yaml::Node::~Node ( ) [inline, protected, virtual]

Definition at line 156 of file YAMLParser.h.


Member Function Documentation

bool Node::failed ( ) const

Definition at line 1619 of file YAMLParser.cpp.

References Doc.

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

BumpPtrAllocator & Node::getAllocator ( )

Definition at line 1611 of file YAMLParser.cpp.

References Doc.

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

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

Token Node::getNext ( )
SMRange llvm::yaml::Node::getSourceRange ( ) const [inline]

Definition at line 125 of file YAMLParser.h.

References SourceRange.

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

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

Definition at line 146 of file YAMLParser.h.

References llvm::BumpPtrAllocator::Deallocate().

void llvm::yaml::Node::operator delete ( void *  ) throw () [inline, protected]

Definition at line 154 of file YAMLParser.h.

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

Definition at line 140 of file YAMLParser.h.

References llvm::BumpPtrAllocator::Allocate().

Node * Node::parseBlockNode ( )
Token & Node::peekNext ( )
void Node::setError ( const Twine Message,
Token Location 
) const

Definition at line 1615 of file YAMLParser.cpp.

References Doc.

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

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

Definition at line 126 of file YAMLParser.h.

References SourceRange.

virtual void llvm::yaml::Node::skip ( ) [inline, virtual]

Member Data Documentation


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