LLVM  10.0.0
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:
[legend]
Collaboration diagram for llvm::msgpack::ArrayDocNode:
[legend]

Public Member Functions

 ArrayDocNode ()
 
 ArrayDocNode (DocNode &N)
 
size_t size () const
 
bool empty () const
 
ArrayTy::iterator begin ()
 
ArrayTy::iterator end ()
 
void push_back (DocNode N)
 
DocNode & operator[] (size_t Index)
 Element access. This extends the array if necessary. More...
 
- 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
 
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
 
ArrayDocNode & getArray (bool Convert=false)
 Get an ArrayDocNode for an array node. More...
 
MapDocNode & getMap (bool Convert=false)
 Get a MapDocNode for a map node. More...
 
std::string toString () const
 Convert this node to a string, assuming it is scalar. More...
 
StringRef fromString (StringRef S, StringRef Tag="")
 Convert the StringRef and use it to set this DocNode (assuming scalar). More...
 

Additional Inherited Members

- Public Types inherited from llvm::msgpack::DocNode
typedef std::map< DocNode, DocNode > MapTy
 
typedef std::vector< DocNode > ArrayTy
 
- 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 217 of file MsgPackDocument.h.

Constructor & Destructor Documentation

◆ ArrayDocNode() [1/2]

llvm::msgpack::ArrayDocNode::ArrayDocNode ( )
inline

Definition at line 219 of file MsgPackDocument.h.

◆ ArrayDocNode() [2/2]

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

Definition at line 220 of file MsgPackDocument.h.

References llvm::msgpack::Array, and assert().

Member Function Documentation

◆ begin()

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

Definition at line 225 of file MsgPackDocument.h.

References llvm::msgpack::Array.

◆ empty()

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

Definition at line 224 of file MsgPackDocument.h.

References llvm::size().

◆ end()

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

Definition at line 226 of file MsgPackDocument.h.

References llvm::msgpack::Array.

◆ operator[]()

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

Element access. This extends the array if necessary.

Array element access. This extends the array if necessary.

Definition at line 53 of file MsgPackDocument.cpp.

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

◆ push_back()

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

◆ size()

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

Definition at line 223 of file MsgPackDocument.h.

References llvm::msgpack::Array.

Referenced by llvm::yaml::SequenceTraits< ArrayDocNode >::size().


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