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
- private DocNode(const llvm::msgpack::KindAndDocument * KindAndDoc)
- public DocNode()
- private void convertToArray()
- private void convertToMap()
- public llvm::StringRef fromString(llvm::StringRef S, llvm::StringRef Tag = "")
- public llvm::msgpack::ArrayDocNode & getArray(bool Convert = false)
- public bool getBool() const
- public bool & getBool()
- public llvm::msgpack::Document * getDocument() const
- public double getFloat() const
- public double & getFloat()
- public int64_t getInt() const
- public int64_t & getInt()
- public llvm::msgpack::Type getKind() const
- public llvm::msgpack::MapDocNode & getMap(bool Convert = false)
- public llvm::StringRef getString() const
- public uint64_t & getUInt()
- public uint64_t getUInt() const
- public bool isArray() const
- public bool isEmpty() const
- public bool isMap() const
- public bool isScalar() const
- public bool isString() const
- public std::string toString() const
Methods
¶DocNode(const llvm::msgpack::KindAndDocument*
KindAndDoc)
DocNode(const llvm::msgpack::KindAndDocument*
KindAndDoc)
Declared at: llvm/include/llvm/BinaryFormat/MsgPackDocument.h:212
Parameters
- const llvm::msgpack::KindAndDocument* KindAndDoc
¶DocNode()
DocNode()
Declared at: llvm/include/llvm/BinaryFormat/MsgPackDocument.h:67
¶void convertToArray()
void convertToArray()
Declared at: llvm/include/llvm/BinaryFormat/MsgPackDocument.h:214
¶void convertToMap()
void convertToMap()
Declared at: llvm/include/llvm/BinaryFormat/MsgPackDocument.h:215
¶llvm::StringRef fromString(
llvm::StringRef S,
llvm::StringRef Tag = "")
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)
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
bool getBool() const
Declared at: llvm/include/llvm/BinaryFormat/MsgPackDocument.h:112
¶bool& getBool()
bool& getBool()
Declared at: llvm/include/llvm/BinaryFormat/MsgPackDocument.h:92
¶llvm::msgpack::Document* getDocument() const
llvm::msgpack::Document* getDocument() const
Declared at: llvm/include/llvm/BinaryFormat/MsgPackDocument.h:80
¶double getFloat() const
double getFloat() const
Declared at: llvm/include/llvm/BinaryFormat/MsgPackDocument.h:117
¶double& getFloat()
double& getFloat()
Declared at: llvm/include/llvm/BinaryFormat/MsgPackDocument.h:97
¶int64_t getInt() const
int64_t getInt() const
Declared at: llvm/include/llvm/BinaryFormat/MsgPackDocument.h:102
¶int64_t& getInt()
int64_t& getInt()
Declared at: llvm/include/llvm/BinaryFormat/MsgPackDocument.h:82
¶llvm::msgpack::Type getKind() const
llvm::msgpack::Type getKind() const
Declared at: llvm/include/llvm/BinaryFormat/MsgPackDocument.h:79
¶llvm::msgpack::MapDocNode& getMap(
bool Convert = false)
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
llvm::StringRef getString() const
Declared at: llvm/include/llvm/BinaryFormat/MsgPackDocument.h:122
¶uint64_t& getUInt()
uint64_t& getUInt()
Declared at: llvm/include/llvm/BinaryFormat/MsgPackDocument.h:87
¶uint64_t getUInt() const
uint64_t getUInt() const
Declared at: llvm/include/llvm/BinaryFormat/MsgPackDocument.h:107
¶bool isArray() const
bool isArray() const
Declared at: llvm/include/llvm/BinaryFormat/MsgPackDocument.h:71
¶bool isEmpty() const
bool isEmpty() const
Declared at: llvm/include/llvm/BinaryFormat/MsgPackDocument.h:78
¶bool isMap() const
bool isMap() const
Declared at: llvm/include/llvm/BinaryFormat/MsgPackDocument.h:70
¶bool isScalar() const
bool isScalar() const
Declared at: llvm/include/llvm/BinaryFormat/MsgPackDocument.h:72
¶bool isString() const
bool isString() const
Declared at: llvm/include/llvm/BinaryFormat/MsgPackDocument.h:73
¶std::string toString() const
std::string toString() const
Description
Convert this node to a string, assuming it is scalar.
Declared at: llvm/include/llvm/BinaryFormat/MsgPackDocument.h:190