LLVM 20.0.0git
|
Reads MessagePack objects from memory, one at a time. More...
#include "llvm/BinaryFormat/MsgPackReader.h"
Public Member Functions | |
Reader (MemoryBufferRef InputBuffer) | |
Construct a reader, keeping a reference to the InputBuffer . | |
Reader (StringRef Input) | |
Construct a reader, keeping a reference to the Input . | |
Reader (const Reader &)=delete | |
Reader & | operator= (const Reader &)=delete |
Expected< bool > | read (Object &Obj) |
Read one object from the input buffer, advancing past it. | |
Reads MessagePack objects from memory, one at a time.
Definition at line 104 of file MsgPackReader.h.
Reader::Reader | ( | MemoryBufferRef | InputBuffer | ) |
Construct a reader, keeping a reference to the InputBuffer
.
Definition at line 23 of file MsgPackReader.cpp.
Reader::Reader | ( | StringRef | Input | ) |
Construct a reader, keeping a reference to the Input
.
Definition at line 27 of file MsgPackReader.cpp.
Read one object from the input buffer, advancing past it.
The Obj
is updated with the kind of the object read, and the corresponding union member is updated.
For the collection objects (Array and Map), only the length is read, and the caller must make and additional N
calls (in the case of Array) or N*2
calls (in the case of Map) to Read
to retrieve the collection elements.
[out] | Obj | filled with next object on success. |
Obj
was not updated), otherwise an error. Definition at line 29 of file MsgPackReader.cpp.
References llvm::msgpack::Array, llvm::msgpack::Binary, llvm::msgpack::Object::Bool, llvm::msgpack::Boolean, llvm::msgpack::Extension, llvm::msgpack::Float, llvm::msgpack::Object::Float, I, llvm::msgpack::Int, llvm::msgpack::Object::Int, llvm::msgpack::Object::Kind, llvm::msgpack::Object::Length, llvm::msgpack::Map, llvm::msgpack::Nil, Size, llvm::msgpack::String, llvm::msgpack::UInt, and llvm::msgpack::Object::UInt.
Referenced by llvm::msgpack::Document::readFromBlob().