LLVM 22.0.0git
llvm::msgpack::ArrayDocNode Class Reference

A DocNode that is an array. More...

#include "llvm/BinaryFormat/MsgPackDocument.h"

Inheritance diagram for llvm::msgpack::ArrayDocNode:
[legend]

Public Member Functions

 ArrayDocNode ()=default
 ArrayDocNode (DocNode &N)
size_t size () const
bool empty () const
DocNodeback () const
ArrayTy::iterator begin ()
ArrayTy::iterator end ()
void push_back (DocNode N)
LLVM_ABI DocNodeoperator[] (size_t Index)
 Element access. This extends the array if necessary, with empty nodes.
Public Member Functions inherited from llvm::msgpack::DocNode
 DocNode ()
bool isMap () const
bool isArray () const
bool isScalar () const
bool isString () const
bool isEmpty () const
Type getKind () const
DocumentgetDocument () const
int64_t & getInt ()
uint64_tgetUInt ()
boolgetBool ()
double & getFloat ()
int64_t getInt () const
uint64_t getUInt () const
bool getBool () const
double getFloat () const
StringRef getString () const
MemoryBufferRef getBinary () const
ArrayDocNodegetArray (bool Convert=false)
 Get an ArrayDocNode for an array node.
MapDocNodegetMap (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).
DocNodeoperator= (const char *Val)
 Convenience assignment operators.
LLVM_ABI DocNodeoperator= (StringRef Val)
LLVM_ABI DocNodeoperator= (MemoryBufferRef Val)
LLVM_ABI DocNodeoperator= (bool Val)
LLVM_ABI DocNodeoperator= (int Val)
LLVM_ABI DocNodeoperator= (unsigned Val)
LLVM_ABI DocNodeoperator= (int64_t Val)
LLVM_ABI DocNodeoperator= (uint64_t Val)
LLVM_ABI DocNodeoperator= (double Val)

Additional Inherited Members

Public Types inherited from llvm::msgpack::DocNode
typedef std::map< DocNode, DocNodeMapTy
typedef std::vector< DocNodeArrayTy
Protected Attributes inherited from llvm::msgpack::DocNode
union { 
   int64_t   Int 
   uint64_t   UInt 
   bool   Bool 
   double   Float 
   StringRef   Raw 
   ArrayTy *   Array 
   MapTy *   Map 
}; 

Detailed Description

A DocNode that is an array.

Definition at line 257 of file MsgPackDocument.h.

Constructor & Destructor Documentation

◆ ArrayDocNode() [1/2]

llvm::msgpack::ArrayDocNode::ArrayDocNode ( )
default

◆ ArrayDocNode() [2/2]

llvm::msgpack::ArrayDocNode::ArrayDocNode ( DocNode & N)
inline

Member Function Documentation

◆ back()

DocNode & llvm::msgpack::ArrayDocNode::back ( ) const
inline

◆ begin()

ArrayTy::iterator llvm::msgpack::ArrayDocNode::begin ( )
inline

Definition at line 266 of file MsgPackDocument.h.

References llvm::msgpack::DocNode::Array.

◆ empty()

bool llvm::msgpack::ArrayDocNode::empty ( ) const
inline

Definition at line 264 of file MsgPackDocument.h.

References size().

◆ end()

ArrayTy::iterator llvm::msgpack::ArrayDocNode::end ( )
inline

Definition at line 267 of file MsgPackDocument.h.

References llvm::msgpack::DocNode::Array.

◆ operator[]()

DocNode & ArrayDocNode::operator[] ( size_t Index)

Element access. This extends the array if necessary, with empty nodes.

Array element access. This extends the array if necessary.

Definition at line 66 of file MsgPackDocument.cpp.

References llvm::msgpack::DocNode::Array, llvm::msgpack::DocNode::DocNode(), llvm::msgpack::DocNode::getDocument(), and size().

◆ push_back()

void llvm::msgpack::ArrayDocNode::push_back ( DocNode N)
inline

◆ size()

size_t llvm::msgpack::ArrayDocNode::size ( ) const
inline

Definition at line 263 of file MsgPackDocument.h.

References llvm::msgpack::DocNode::Array.

Referenced by empty(), and operator[]().


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