class Writer
Declaration
class Writer { /* full declaration omitted */ };
Description
Writes MessagePack objects to an output stream, one at a time.
Declared at: llvm/include/llvm/BinaryFormat/MsgPackWriter.h:41
Member Variables
- private support::endian::Writer EW
- private bool Compatible
Method Overview
- public Writer(llvm::raw_ostream & OS, bool Compatible = false)
- public Writer(const llvm::msgpack::Writer &)
- public void write(bool b)
- public void write(int64_t i)
- public void write(uint64_t u)
- public void write(double d)
- public void write(llvm::StringRef s)
- public void write(llvm::MemoryBufferRef Buffer)
- public void writeArraySize(uint32_t Size)
- public void writeExt(int8_t Type, llvm::MemoryBufferRef Buffer)
- public void writeMapSize(uint32_t Size)
- public void writeNil()
Methods
¶Writer(llvm::raw_ostream& OS,
bool Compatible = false)
Writer(llvm::raw_ostream& OS,
bool Compatible = false)
Description
Construct a writer, optionally enabling "Compatibility Mode" as defined in the MessagePack specification. When in \p Compatible mode, the writer will write \c Str16 formats instead of \c Str8 formats, and will refuse to write any \c Bin formats.
Declared at: llvm/include/llvm/BinaryFormat/MsgPackWriter.h:51
Parameters
- llvm::raw_ostream& OS
- stream to output MessagePack objects to.
- bool Compatible = false
- when set, write in "Compatibility Mode".
¶Writer(const llvm::msgpack::Writer&)
Writer(const llvm::msgpack::Writer&)
Declared at: llvm/include/llvm/BinaryFormat/MsgPackWriter.h:53
Parameters
- const llvm::msgpack::Writer&
¶void write(bool b)
void write(bool b)
Description
Write a \em Boolean to the output stream. The output will be a \em bool format.
Declared at: llvm/include/llvm/BinaryFormat/MsgPackWriter.h:64
Parameters
- bool b
¶void write(int64_t i)
void write(int64_t i)
Description
Write a signed integer to the output stream. The output will be in the smallest possible \em int format. The format chosen may be for an unsigned integer.
Declared at: llvm/include/llvm/BinaryFormat/MsgPackWriter.h:71
Parameters
- int64_t i
¶void write(uint64_t u)
void write(uint64_t u)
Description
Write an unsigned integer to the output stream. The output will be in the smallest possible \em int format.
Declared at: llvm/include/llvm/BinaryFormat/MsgPackWriter.h:76
Parameters
- uint64_t u
¶void write(double d)
void write(double d)
Description
Write a floating point number to the output stream. The output will be in the smallest possible \em float format.
Declared at: llvm/include/llvm/BinaryFormat/MsgPackWriter.h:81
Parameters
- double d
¶void write(llvm::StringRef s)
void write(llvm::StringRef s)
Description
Write a string to the output stream. The output will be in the smallest possible \em str format.
Declared at: llvm/include/llvm/BinaryFormat/MsgPackWriter.h:86
Parameters
¶void write(llvm::MemoryBufferRef Buffer)
void write(llvm::MemoryBufferRef Buffer)
Description
Write a memory buffer to the output stream. The output will be in the smallest possible \em bin format.
Declared at: llvm/include/llvm/BinaryFormat/MsgPackWriter.h:93
Parameters
- llvm::MemoryBufferRef Buffer
¶void writeArraySize(uint32_t Size)
void writeArraySize(uint32_t Size)
Description
The header contains an identifier for the \em array format used, as well as an encoding of the size of the array. N.B. The caller must subsequently call \c Write an additional \p Size times to complete the array.
Declared at: llvm/include/llvm/BinaryFormat/MsgPackWriter.h:104
Parameters
- uint32_t Size
¶void writeExt(int8_t Type,
llvm::MemoryBufferRef Buffer)
void writeExt(int8_t Type,
llvm::MemoryBufferRef Buffer)
Description
Write a typed memory buffer (an extension type) to the output stream. The output will be in the smallest possible \em ext format.
Declared at: llvm/include/llvm/BinaryFormat/MsgPackWriter.h:121
Parameters
- int8_t Type
- llvm::MemoryBufferRef Buffer
¶void writeMapSize(uint32_t Size)
void writeMapSize(uint32_t Size)
Description
The header contains an identifier for the \em map format used, as well as an encoding of the size of the map. N.B. The caller must subsequently call \c Write and additional \c Size*2 times to complete the map. Each even numbered call to \c Write defines a new key, and each odd numbered call defines the previous key's value.
Declared at: llvm/include/llvm/BinaryFormat/MsgPackWriter.h:116
Parameters
- uint32_t Size
¶void writeNil()
void writeNil()
Description
Write a \em Nil to the output stream. The output will be the \em nil format.
Declared at: llvm/include/llvm/BinaryFormat/MsgPackWriter.h:59