LLVM: llvm::msgpack::DocNode Class Reference (original) (raw)

A node in a MsgPack Document. More...

#include "[llvm/BinaryFormat/MsgPackDocument.h](MsgPackDocument%5F8h%5Fsource.html)"

Public Member Functions
DocNode ()
bool isMap () const
bool isArray () const
bool isScalar () const
bool isString () const
bool isEmpty () const
Type getKind () const
Document * getDocument () const
int64_t & getInt ()
uint64_t & getUInt ()
bool & getBool ()
double & getFloat ()
int64_t getInt () const
uint64_t getUInt () const
bool getBool () const
double getFloat () const
StringRef getString () const
MemoryBufferRef getBinary () const
ArrayDocNode & getArray (bool Convert=false)
Get an ArrayDocNode for an array node.
MapDocNode & getMap (bool Convert=false)
Get a MapDocNode for a map node.
LLVM_ABI std::string toString () const
Convert this node to a string, assuming it is scalar.
LLVM_ABI StringRef fromString (StringRef S, StringRef Tag="")
Convert the StringRef and use it to set this DocNode (assuming scalar).
DocNode & operator= (const char *Val)
Convenience assignment operators.
LLVM_ABI DocNode & operator= (StringRef Val)
LLVM_ABI DocNode & operator= (MemoryBufferRef Val)
LLVM_ABI DocNode & operator= (bool Val)
LLVM_ABI DocNode & operator= (int Val)
LLVM_ABI DocNode & operator= (unsigned Val)
LLVM_ABI DocNode & operator= (int64_t Val)
LLVM_ABI DocNode & operator= (uint64_t Val)
LLVM_ABI DocNode & operator= (double Val)
Protected Attributes
union {
int64_t Int
uint64_t UInt
bool Bool
double Float
StringRef Raw
ArrayTy * Array
MapTy * Map
};
Friends
bool operator< (const DocNode &Lhs, const DocNode &Rhs)
Comparison operator, used for map keys.
bool operator== (const DocNode &Lhs, const DocNode &Rhs)
Equality operator.
bool operator!= (const DocNode &Lhs, const DocNode &Rhs)
Inequality operator.

A node in a MsgPack Document.

This is a simple copyable and passable-by-value type that does not own any memory.

Definition at line 39 of file MsgPackDocument.h.

ArrayTy

MapTy

llvm::msgpack::DocNode::DocNode ( ) inline

Definition at line 68 of file MsgPackDocument.h.

Referenced by llvm::msgpack::ArrayDocNode::ArrayDocNode(), llvm::msgpack::ArrayDocNode::back(), llvm::msgpack::MapDocNode::erase(), llvm::msgpack::MapDocNode::find(), llvm::msgpack::MapDocNode::MapDocNode(), operator!=, operator<, operator=(), operator=(), operator=(), operator=(), operator=(), operator=(), operator=(), operator=(), operator=(), operator==, llvm::msgpack::ArrayDocNode::operator, llvm::msgpack::MapDocNode::operator, llvm::msgpack::MapDocNode::operator, llvm::msgpack::MapDocNode::operator, llvm::msgpack::MapDocNode::operator, llvm::msgpack::MapDocNode::operator, llvm::msgpack::MapDocNode::operator, and llvm::msgpack::ArrayDocNode::push_back().

fromString()

getArray()

getBinary()

getBool() [1/2]

bool & llvm::msgpack::DocNode::getBool ( ) inline

getBool() [2/2]

bool llvm::msgpack::DocNode::getBool ( ) const inline

getDocument()

Document * llvm::msgpack::DocNode::getDocument ( ) const inline

Definition at line 81 of file MsgPackDocument.h.

Referenced by llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV4::emitKernelAttrs(), llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV5::emitKernelAttrs(), llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV4::emitKernelLanguage(), llvm::msgpack::MapDocNode::find(), fromString(), getNode(), operator=(), operator=(), operator=(), operator=(), operator=(), operator=(), operator=(), operator=(), llvm::msgpack::ArrayDocNode::operator, llvm::msgpack::MapDocNode::operator, llvm::msgpack::MapDocNode::operator, llvm::msgpack::MapDocNode::operator, llvm::msgpack::MapDocNode::operator, llvm::msgpack::MapDocNode::operator, llvm::msgpack::MapDocNode::operator, llvm::msgpack::ArrayDocNode::push_back(), and toString().

getFloat() [1/2]

double & llvm::msgpack::DocNode::getFloat ( ) inline

getFloat() [2/2]

double llvm::msgpack::DocNode::getFloat ( ) const inline

getInt() [1/2]

int64_t & llvm::msgpack::DocNode::getInt ( ) inline

getInt() [2/2]

int64_t llvm::msgpack::DocNode::getInt ( ) const inline

getKind()

Type llvm::msgpack::DocNode::getKind ( ) const inline

Definition at line 80 of file MsgPackDocument.h.

Referenced by llvm::msgpack::ArrayDocNode::ArrayDocNode(), getArray(), getBinary(), getBool(), getBool(), getFloat(), getFloat(), getInt(), getInt(), getMap(), getString(), getUInt(), getUInt(), isArray(), isEmpty(), isMap(), isString(), llvm::msgpack::MapDocNode::MapDocNode(), operator<, llvm::msgpack::Document::readFromBlob(), and toString().

getMap()

MapDocNode & llvm::msgpack::DocNode::getMap ( bool Convert = false) inline

getString()

StringRef llvm::msgpack::DocNode::getString ( ) const inline

getUInt() [1/2]

uint64_t & llvm::msgpack::DocNode::getUInt ( ) inline

getUInt() [2/2]

uint64_t llvm::msgpack::DocNode::getUInt ( ) const inline

isArray()

bool llvm::msgpack::DocNode::isArray ( ) const inline

isEmpty()

bool llvm::msgpack::DocNode::isEmpty ( ) const inline

isMap()

bool llvm::msgpack::DocNode::isMap ( ) const inline

isScalar()

bool llvm::msgpack::DocNode::isScalar ( ) const inline

isString()

bool llvm::msgpack::DocNode::isString ( ) const inline

operator=() [1/9]

operator=() [2/9]

Convenience assignment operators.

This only works if the destination DocNode has an associated Document, i.e. it was not constructed using the default constructor. The string one does not copy, so the string must remain valid for the lifetime of the Document. Use fromString to avoid that restriction.

Definition at line 208 of file MsgPackDocument.h.

References DocNode().

operator=() [3/9]

DocNode & DocNode::operator= ( double Val )

operator=() [4/9]

DocNode & DocNode::operator= ( int Val )

operator=() [5/9]

DocNode & DocNode::operator= ( int64_t Val )

operator=() [6/9]

operator=() [7/9]

operator=() [8/9]

operator=() [9/9]

toString()

std::string DocNode::toString ( ) const

Convert this node to a string, assuming it is scalar.

Convert this DocNode to a string, assuming it is scalar.

Definition at line 35 of file MsgPackDocumentYAML.cpp.

References Bool, llvm::msgpack::Boolean, Float, llvm::msgpack::Float, llvm::format(), getDocument(), getKind(), Int, llvm::msgpack::Int, llvm_unreachable, llvm::msgpack::Nil, Raw, llvm::raw_string_ostream::str(), llvm::msgpack::String, UInt, and llvm::msgpack::UInt.

operator!=

operator<

Comparison operator, used for map keys.

Definition at line 156 of file MsgPackDocument.h.

References llvm::msgpack::Binary, Bool, llvm::msgpack::Boolean, DocNode(), Float, llvm::msgpack::Float, getKind(), Int, llvm::msgpack::Int, isEmpty(), llvm_unreachable, llvm::msgpack::Nil, Raw, llvm::msgpack::String, UInt, and llvm::msgpack::UInt.

operator==

[union]

Array

ArrayTy* llvm::msgpack::DocNode::Array

Bool

bool llvm::msgpack::DocNode::Bool

Float

double llvm::msgpack::DocNode::Float

Int

int64_t llvm::msgpack::DocNode::Int

Map

MapTy* llvm::msgpack::DocNode::Map

Raw

UInt


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