class DocNode

Declaration

class DocNode { /* full declaration omitted */ };

Description

A node in a MsgPack Document. This is a simple copyable and passable-by-value type that does not own any memory.

Declared at: llvm/include/llvm/BinaryFormat/MsgPackDocument.h:38

Member Variables

private const llvm::msgpack::KindAndDocument* KindAndDoc
protected anonymous struct / union

Method Overview

Methods

DocNode(const llvm::msgpack::KindAndDocument*
            KindAndDoc)

Declared at: llvm/include/llvm/BinaryFormat/MsgPackDocument.h:212

Parameters

const llvm::msgpack::KindAndDocument* KindAndDoc

DocNode()

Declared at: llvm/include/llvm/BinaryFormat/MsgPackDocument.h:67

void convertToArray()

Declared at: llvm/include/llvm/BinaryFormat/MsgPackDocument.h:214

void convertToMap()

Declared at: llvm/include/llvm/BinaryFormat/MsgPackDocument.h:215

llvm::StringRef fromString(
    llvm::StringRef S,
    llvm::StringRef Tag = "")

Description

Convert the StringRef and use it to set this DocNode (assuming scalar). If it is a string, copy the string into the Document's strings list so we do not rely on S having a lifetime beyond this call. Tag is "" or a YAML tag.

Declared at: llvm/include/llvm/BinaryFormat/MsgPackDocument.h:195

Parameters

llvm::StringRef S
llvm::StringRef Tag = ""

llvm::msgpack::ArrayDocNode& getArray(
    bool Convert = false)

Description

Get an ArrayDocNode for an array node. If Convert, convert the node to an array node if necessary.

Declared at: llvm/include/llvm/BinaryFormat/MsgPackDocument.h:129

Parameters

bool Convert = false

bool getBool() const

Declared at: llvm/include/llvm/BinaryFormat/MsgPackDocument.h:112

bool& getBool()

Declared at: llvm/include/llvm/BinaryFormat/MsgPackDocument.h:92

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

Declared at: llvm/include/llvm/BinaryFormat/MsgPackDocument.h:80

double getFloat() const

Declared at: llvm/include/llvm/BinaryFormat/MsgPackDocument.h:117

double& getFloat()

Declared at: llvm/include/llvm/BinaryFormat/MsgPackDocument.h:97

int64_t getInt() const

Declared at: llvm/include/llvm/BinaryFormat/MsgPackDocument.h:102

int64_t& getInt()

Declared at: llvm/include/llvm/BinaryFormat/MsgPackDocument.h:82

llvm::msgpack::Type getKind() const

Declared at: llvm/include/llvm/BinaryFormat/MsgPackDocument.h:79

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

Description

Get a MapDocNode for a map node. If Convert, convert the node to a map node if necessary.

Declared at: llvm/include/llvm/BinaryFormat/MsgPackDocument.h:140

Parameters

bool Convert = false

llvm::StringRef getString() const

Declared at: llvm/include/llvm/BinaryFormat/MsgPackDocument.h:122

uint64_t& getUInt()

Declared at: llvm/include/llvm/BinaryFormat/MsgPackDocument.h:87

uint64_t getUInt() const

Declared at: llvm/include/llvm/BinaryFormat/MsgPackDocument.h:107

bool isArray() const

Declared at: llvm/include/llvm/BinaryFormat/MsgPackDocument.h:71

bool isEmpty() const

Declared at: llvm/include/llvm/BinaryFormat/MsgPackDocument.h:78

bool isMap() const

Declared at: llvm/include/llvm/BinaryFormat/MsgPackDocument.h:70

bool isScalar() const

Declared at: llvm/include/llvm/BinaryFormat/MsgPackDocument.h:72

bool isString() const

Declared at: llvm/include/llvm/BinaryFormat/MsgPackDocument.h:73

std::string toString() const

Description

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

Declared at: llvm/include/llvm/BinaryFormat/MsgPackDocument.h:190