LLVM  9.0.0svn
Public Types | Public Member Functions | Static Public Member Functions | List of all members
llvm::msgpack::Node Class Referenceabstract

Abstract base-class which can be any MessagePack type. More...

#include "llvm/BinaryFormat/MsgPackTypes.h"

Inheritance diagram for llvm::msgpack::Node:
Inheritance graph
[legend]

Public Types

enum  NodeKind { NK_Scalar, NK_Array, NK_Map }
 

Public Member Functions

NodeKind getKind () const
 
 Node (NodeKind Kind)
 Construct a Node. Used by derived classes to track kind information. More...
 
virtual ~Node ()=default
 
virtual void write (Writer &MPWriter)=0
 Write to a MessagePack writer MPWriter. More...
 

Static Public Member Functions

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...
 

Detailed Description

Abstract base-class which can be any MessagePack type.

Definition at line 38 of file MsgPackTypes.h.

Member Enumeration Documentation

◆ NodeKind

Enumerator
NK_Scalar 
NK_Array 
NK_Map 

Definition at line 40 of file MsgPackTypes.h.

Constructor & Destructor Documentation

◆ Node()

llvm::msgpack::Node::Node ( NodeKind  Kind)
inline

Construct a Node. Used by derived classes to track kind information.

Definition at line 57 of file MsgPackTypes.h.

References read(), write(), and ~Node().

◆ ~Node()

virtual llvm::msgpack::Node::~Node ( )
virtualdefault

Referenced by Node().

Member Function Documentation

◆ getKind()

NodeKind llvm::msgpack::Node::getKind ( ) const
inline

◆ read()

Expected< OptNodePtr > Node::read ( Reader MPReader)
static

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.

Definition at line 74 of file MsgPackTypes.cpp.

References llvm::msgpack::Reader::read().

Referenced by Node().

◆ write()

virtual void llvm::msgpack::Node::write ( Writer MPWriter)
pure virtual

Write to a MessagePack writer MPWriter.

Implemented in llvm::msgpack::MapNode, llvm::msgpack::ArrayNode, and llvm::msgpack::ScalarNode.

Referenced by llvm::msgpack::ScalarNode::classof(), and Node().


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