LLVM  14.0.0git
Public Member Functions | List of all members
llvm::msgpack::MapDocNode Class Reference

A DocNode that is a map. More...

#include "llvm/BinaryFormat/MsgPackDocument.h"

Inheritance diagram for llvm::msgpack::MapDocNode:
Inheritance graph
[legend]
Collaboration diagram for llvm::msgpack::MapDocNode:
Collaboration graph
[legend]

Public Member Functions

 MapDocNode ()
 
 MapDocNode (DocNode &N)
 
size_t size () const
 
bool empty () const
 
MapTy::iterator begin ()
 
MapTy::iterator end ()
 
MapTy::iterator find (DocNode Key)
 
MapTy::iterator find (StringRef Key)
 Find the key in the MapDocNode. More...
 
MapTy::iterator erase (MapTy::const_iterator I)
 
size_t erase (DocNode Key)
 
MapTy::iterator erase (MapTy::const_iterator First, MapTy::const_iterator Second)
 
DocNodeoperator[] (StringRef S)
 Member access. More...
 
DocNodeoperator[] (DocNode Key)
 Member access, with convenience versions for an integer key. More...
 
DocNodeoperator[] (int Key)
 Member access for MapDocNode for integer key. More...
 
DocNodeoperator[] (unsigned Key)
 
DocNodeoperator[] (int64_t Key)
 
DocNodeoperator[] (uint64_t Key)
 
- 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 ()
 
bool & getBool ()
 
doublegetFloat ()
 
int64_t getInt () const
 
uint64_t getUInt () const
 
bool getBool () const
 
double getFloat () const
 
StringRef getString () const
 
ArrayDocNodegetArray (bool Convert=false)
 Get an ArrayDocNode for an array node. More...
 
MapDocNodegetMap (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...
 
DocNodeoperator= (const char *Val)
 Convenience assignment operators. More...
 
DocNodeoperator= (StringRef 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 a map.

Definition at line 219 of file MsgPackDocument.h.

Constructor & Destructor Documentation

◆ MapDocNode() [1/2]

llvm::msgpack::MapDocNode::MapDocNode ( )
inline

Definition at line 221 of file MsgPackDocument.h.

◆ MapDocNode() [2/2]

llvm::msgpack::MapDocNode::MapDocNode ( DocNode N)
inline

Member Function Documentation

◆ begin()

MapTy::iterator llvm::msgpack::MapDocNode::begin ( )
inline

Definition at line 227 of file MsgPackDocument.h.

References llvm::msgpack::DocNode::Map.

◆ empty()

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

Definition at line 226 of file MsgPackDocument.h.

References size().

◆ end()

MapTy::iterator llvm::msgpack::MapDocNode::end ( )
inline

Definition at line 228 of file MsgPackDocument.h.

References llvm::msgpack::DocNode::Map.

◆ erase() [1/3]

size_t llvm::msgpack::MapDocNode::erase ( DocNode  Key)
inline

Definition at line 232 of file MsgPackDocument.h.

References llvm::msgpack::DocNode::Map.

◆ erase() [2/3]

MapTy::iterator llvm::msgpack::MapDocNode::erase ( MapTy::const_iterator  First,
MapTy::const_iterator  Second 
)
inline

Definition at line 233 of file MsgPackDocument.h.

References First, and llvm::msgpack::DocNode::Map.

◆ erase() [3/3]

MapTy::iterator llvm::msgpack::MapDocNode::erase ( MapTy::const_iterator  I)
inline

Definition at line 231 of file MsgPackDocument.h.

References I, and llvm::msgpack::DocNode::Map.

◆ find() [1/2]

MapTy::iterator llvm::msgpack::MapDocNode::find ( DocNode  Key)
inline

Definition at line 229 of file MsgPackDocument.h.

References llvm::msgpack::DocNode::Map.

Referenced by find().

◆ find() [2/2]

DocNode::MapTy::iterator MapDocNode::find ( StringRef  Key)

Find the key in the MapDocNode.

Definition at line 30 of file MsgPackDocument.cpp.

References find(), llvm::msgpack::DocNode::getDocument(), and S.

◆ operator[]() [1/6]

DocNode & MapDocNode::operator[] ( DocNode  Key)

Member access, with convenience versions for an integer key.

Member access for MapDocNode.

Definition at line 41 of file MsgPackDocument.cpp.

References assert(), llvm::msgpack::DocNode::getDocument(), llvm::msgpack::Document::getEmptyNode(), and N.

◆ operator[]() [2/6]

DocNode & MapDocNode::operator[] ( int  Key)

Member access for MapDocNode for integer key.

Definition at line 52 of file MsgPackDocument.cpp.

References llvm::msgpack::DocNode::getDocument(), and llvm::msgpack::Document::getNode().

◆ operator[]() [3/6]

DocNode & MapDocNode::operator[] ( int64_t  Key)

◆ operator[]() [4/6]

DocNode & MapDocNode::operator[] ( StringRef  S)

Member access.

Member access for MapDocNode.

The string data must remain valid for the lifetime of the Document.

Definition at line 36 of file MsgPackDocument.cpp.

References llvm::msgpack::DocNode::getDocument(), llvm::msgpack::Document::getNode(), and S.

◆ operator[]() [5/6]

DocNode & MapDocNode::operator[] ( uint64_t  Key)

◆ operator[]() [6/6]

DocNode & MapDocNode::operator[] ( unsigned  Key)

◆ size()

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

Definition at line 225 of file MsgPackDocument.h.

References llvm::msgpack::DocNode::Map.

Referenced by empty().


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