LLVM 19.0.0git
Public Member Functions | List of all members
llvm::msgpack::ArrayDocNode Class Reference

A DocNode that is an array. More...

#include "llvm/BinaryFormat/MsgPackDocument.h"

Inheritance diagram for llvm::msgpack::ArrayDocNode:
Inheritance graph
[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)
 
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.
 
std::string toString () const
 Convert this node to a string, assuming it is scalar.
 
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.
 
DocNodeoperator= (StringRef Val)
 
DocNodeoperator= (MemoryBufferRef Val)
 
DocNodeoperator= (bool Val)
 
DocNodeoperator= (int Val)
 
DocNodeoperator= (unsigned Val)
 
DocNodeoperator= (int64_t Val)
 
DocNodeoperator= (uint64_t 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 255 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

Definition at line 263 of file MsgPackDocument.h.

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

◆ begin()

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

Definition at line 264 of file MsgPackDocument.h.

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

◆ empty()

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

Definition at line 262 of file MsgPackDocument.h.

References size().

◆ end()

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

Definition at line 265 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::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 261 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: