LLVM  9.0.0svn
Public Member Functions | Static Public Member Functions | List of all members
llvm::msgpack::MapNode Class Reference

#include "llvm/BinaryFormat/MsgPackTypes.h"

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

Public Member Functions

 MapNode ()
 
void write (Writer &MPWriter) override
 Write to a MessagePack writer MPWriter. More...
 
- Public Member Functions inherited from llvm::msgpack::Node
NodeKind getKind () const
 
 Node (NodeKind Kind)
 Construct a Node. Used by derived classes to track kind information. More...
 
virtual ~Node ()=default
 
- Public Member Functions inherited from llvm::StringMap< NodePtr >
 StringMap ()
 
 StringMap (unsigned InitialSize)
 
 StringMap (MallocAllocator A)
 
 StringMap (unsigned InitialSize, MallocAllocator A)
 
 StringMap (std::initializer_list< std::pair< StringRef, NodePtr >> List)
 
 StringMap (StringMap &&RHS)
 
 StringMap (const StringMap &RHS)
 
StringMapoperator= (StringMap RHS)
 
 ~StringMap ()
 
MallocAllocatorgetAllocator ()
 
const MallocAllocatorgetAllocator () const
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
iterator_range< StringMapKeyIterator< NodePtr > > keys () const
 
iterator find (StringRef Key)
 
const_iterator find (StringRef Key) const
 
NodePtr lookup (StringRef Key) const
 lookup - Return the entry for the specified key, or a default constructed value if no such entry exists. More...
 
NodePtr & operator[] (StringRef Key)
 Lookup the ValueTy for the Key, or create a default constructed value if the key is not in the map. More...
 
size_type count (StringRef Key) const
 count - Return 1 if the element is in the map, 0 otherwise. More...
 
bool insert (MapEntryTy *KeyValue)
 insert - Insert the specified key/value pair into the map. More...
 
std::pair< iterator, boolinsert (std::pair< StringRef, NodePtr > KV)
 insert - Inserts the specified key/value pair into the map if the key isn't already in the map. More...
 
std::pair< iterator, booltry_emplace (StringRef Key, ArgsTy &&... Args)
 Emplace a new element for the specified key into the map if the key isn't already in the map. More...
 
void clear ()
 
void remove (MapEntryTy *KeyValue)
 remove - Remove the specified key/value pair from the map, but do not erase it. More...
 
void erase (iterator I)
 
bool erase (StringRef Key)
 
- Public Member Functions inherited from llvm::StringMapImpl
unsigned getNumBuckets () const
 
unsigned getNumItems () const
 
bool empty () const
 
unsigned size () const
 
void swap (StringMapImpl &Other)
 

Static Public Member Functions

static bool classof (const Node *N)
 
- Static Public Member Functions inherited from llvm::msgpack::Node
static Expected< OptNodePtrread (Reader &MPReader)
 Read from a MessagePack reader MPReader, returning an error if one is encountered, or None if MPReader is at the end of stream, or some Node pointer if some type is read. More...
 
- Static Public Member Functions inherited from llvm::StringMapImpl
static StringMapEntryBasegetTombstoneVal ()
 

Additional Inherited Members

- Public Types inherited from llvm::msgpack::Node
enum  NodeKind { NK_Scalar, NK_Array, NK_Map }
 
- Public Types inherited from llvm::StringMap< NodePtr >
using MapEntryTy = StringMapEntry< NodePtr >
 
using key_type = const char *
 
using mapped_type = NodePtr
 
using value_type = StringMapEntry< NodePtr >
 
using size_type = size_t
 
using const_iterator = StringMapConstIterator< NodePtr >
 
using iterator = StringMapIterator< NodePtr >
 
- Protected Member Functions inherited from llvm::StringMapImpl
 StringMapImpl (unsigned itemSize)
 
 StringMapImpl (StringMapImpl &&RHS)
 
 StringMapImpl (unsigned InitSize, unsigned ItemSize)
 
unsigned RehashTable (unsigned BucketNo=0)
 RehashTable - Grow the table, redistributing values into the buckets with the appropriate mod-of-hashtable-size. More...
 
unsigned LookupBucketFor (StringRef Key)
 LookupBucketFor - Look up the bucket that the specified string should end up in. More...
 
int FindKey (StringRef Key) const
 FindKey - Look up the bucket that contains the specified key. More...
 
void RemoveKey (StringMapEntryBase *V)
 RemoveKey - Remove the specified StringMapEntry from the table, but do not delete it. More...
 
StringMapEntryBaseRemoveKey (StringRef Key)
 RemoveKey - Remove the StringMapEntry for the specified key from the table, returning it. More...
 
void init (unsigned Size)
 Allocate the table with the specified number of buckets and otherwise setup the map as empty. More...
 
- Protected Attributes inherited from llvm::StringMapImpl
StringMapEntryBase ** TheTable = nullptr
 
unsigned NumBuckets = 0
 
unsigned NumItems = 0
 
unsigned NumTombstones = 0
 
unsigned ItemSize
 

Detailed Description

Definition at line 259 of file MsgPackTypes.h.

Constructor & Destructor Documentation

◆ MapNode()

llvm::msgpack::MapNode::MapNode ( )
inline

Definition at line 263 of file MsgPackTypes.h.

Member Function Documentation

◆ classof()

static bool llvm::msgpack::MapNode::classof ( const Node N)
inlinestatic

Definition at line 264 of file MsgPackTypes.h.

References llvm::msgpack::Node::getKind(), and llvm::msgpack::Node::NK_Map.

◆ write()

void llvm::msgpack::MapNode::write ( Writer MPWriter)
inlineoverridevirtual

Write to a MessagePack writer MPWriter.

Implements llvm::msgpack::Node.

Definition at line 266 of file MsgPackTypes.h.

References N, llvm::size(), llvm::msgpack::Writer::write(), and llvm::msgpack::Writer::writeMapSize().


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