nlib
|
Defines various static member functions for directly writing MessagePack into memory. More...
#include "nn/nlib/msgpack/MpDirectWriter.h"
Static Public Member Functions | |
static nlib_byte_t * | WriteUint8 (nlib_byte_t *p, nlib_byte_t *pend, uint8_t val) noexcept |
Writes two-byte data that starts with 0xcc. More... | |
static nlib_byte_t * | WriteUint16 (nlib_byte_t *p, nlib_byte_t *pend, uint16_t val) noexcept |
Writes three-byte data that starts with 0xcd. More... | |
static nlib_byte_t * | WriteUint32 (nlib_byte_t *p, nlib_byte_t *pend, uint32_t val) noexcept |
Writes five-byte data that starts with 0xce. More... | |
static nlib_byte_t * | WriteUint64 (nlib_byte_t *p, nlib_byte_t *pend, uint64_t val) noexcept |
Writes nine-byte data that starts with 0xcf. More... | |
static nlib_byte_t * | WriteInt8 (nlib_byte_t *p, nlib_byte_t *pend, int8_t val) noexcept |
Writes two-byte data that starts with 0xd0. More... | |
static nlib_byte_t * | WriteInt16 (nlib_byte_t *p, nlib_byte_t *pend, int16_t val) noexcept |
Writes three-byte data that starts with 0xd1. More... | |
static nlib_byte_t * | WriteInt32 (nlib_byte_t *p, nlib_byte_t *pend, int32_t val) noexcept |
Writes five-byte data that starts with 0xd2. More... | |
static nlib_byte_t * | WriteInt64 (nlib_byte_t *p, nlib_byte_t *pend, int64_t val) noexcept |
Writes nine-byte data that starts with 0xd3. More... | |
static nlib_byte_t * | WriteNil (nlib_byte_t *p, nlib_byte_t *pend) noexcept |
Writes 0xc0. More... | |
static nlib_byte_t * | WriteBoolean (nlib_byte_t *p, nlib_byte_t *pend, bool val) noexcept |
Writes 0xc2 (if true ) or 0xc3 (if false ). More... | |
static nlib_byte_t * | WriteFloat (nlib_byte_t *p, nlib_byte_t *pend, float val) noexcept |
Writes five-byte data that starts with 0xca. More... | |
static nlib_byte_t * | WriteDouble (nlib_byte_t *p, nlib_byte_t *pend, double val) noexcept |
Writes nine-byte data that starts with 0xcb. More... | |
static nlib_byte_t * | WriteString (nlib_byte_t *p, nlib_byte_t *pend, const char *str, uint32_t len) noexcept |
Writes data according to the string length. More... | |
static nlib_byte_t * | WriteString (nlib_byte_t *p, nlib_byte_t *pend, const char *str) noexcept |
Returns WriteString(p, pend, str, nlib_strlen(str)). | |
static nlib_byte_t * | WriteStringHeader (nlib_byte_t *p, nlib_byte_t *pend, uint32_t len) noexcept |
Data according to the string length is written, but the string itself is not written. More... | |
static nlib_byte_t * | WriteBin (nlib_byte_t *p, nlib_byte_t *pend, const nlib_byte_t *bin, uint32_t n) noexcept |
Writes binary data according to the data size. More... | |
static nlib_byte_t * | WriteBinHeader (nlib_byte_t *p, nlib_byte_t *pend, uint32_t n) noexcept |
Data according to the binary data size is written, but the binary data itself is not written. More... | |
static nlib_byte_t * | WriteExt (nlib_byte_t *p, nlib_byte_t *pend, int8_t type, const nlib_byte_t *data, uint32_t n) noexcept |
Writes data according to the data size. More... | |
static nlib_byte_t * | WriteExtHeader (nlib_byte_t *p, nlib_byte_t *pend, int8_t type, uint32_t n) noexcept |
Data according to the data size is written, but the data itself is not written. More... | |
static nlib_byte_t * | WriteArrayHeader (nlib_byte_t *p, nlib_byte_t *pend, uint32_t count) noexcept |
Writes data according to the number of elements in the array. More... | |
static nlib_byte_t * | WriteMapHeader (nlib_byte_t *p, nlib_byte_t *pend, uint32_t count) noexcept |
Writes data according to the number of elements in the array. More... | |
static nlib_byte_t * | WriteUnsignedInt (nlib_byte_t *p, nlib_byte_t *pend, uint8_t val) noexcept |
Encodes the provided numerical data into data with the minimum length. Writes data of a size up to two bytes. More... | |
static nlib_byte_t * | WriteUnsignedInt (nlib_byte_t *p, nlib_byte_t *pend, uint16_t val) noexcept |
Encodes the provided numerical data into data with the minimum length. Writes data of a size up to three bytes. More... | |
static nlib_byte_t * | WriteUnsignedInt (nlib_byte_t *p, nlib_byte_t *pend, uint32_t val) noexcept |
Encodes the provided numerical data into data with the minimum length. Writes data of a size up to five bytes. More... | |
static nlib_byte_t * | WriteUnsignedInt (nlib_byte_t *p, nlib_byte_t *pend, uint64_t val) noexcept |
Encodes the provided numerical data into data with the minimum length. Writes data of a size up to nine bytes. More... | |
static nlib_byte_t * | WriteInt (nlib_byte_t *p, nlib_byte_t *pend, int8_t val) noexcept |
Encodes the provided numerical data into data with the minimum length. Writes data of a size up to two bytes. More... | |
static nlib_byte_t * | WriteInt (nlib_byte_t *p, nlib_byte_t *pend, int16_t val) noexcept |
Encodes the provided numerical data into data with the minimum length. Writes data of a size up to three bytes. More... | |
static nlib_byte_t * | WriteInt (nlib_byte_t *p, nlib_byte_t *pend, int32_t val) noexcept |
Encodes the provided numerical data into data with the minimum length. Writes data of a size up to five bytes. More... | |
static nlib_byte_t * | WriteInt (nlib_byte_t *p, nlib_byte_t *pend, int64_t val) noexcept |
Encodes the provided numerical data into data with the minimum length. Writes data of a size up to nine bytes. More... | |
static nlib_byte_t * | WriteTimestamp (nlib_byte_t *p, nlib_byte_t *pend, int64_t sec, uint32_t nsec) noexcept |
Encodes the provided time data into data with the minimum length. Writes data of a size up to 15 bytes. More... | |
static nlib_byte_t * | WriteTimestamp (nlib_byte_t *p, nlib_byte_t *pend, nlib_time val) noexcept |
Encodes the provided time data into data with the minimum length. Writes data of a size up to 15 bytes. More... | |
Defines various static member functions for directly writing MessagePack into memory.
Definition at line 23 of file MpDirectWriter.h.
|
inlinestaticnoexcept |
Writes data according to the number of elements in the array.
[in] | p | Pointer to the area that serialized data is written into. |
[in] | pend | The end of the area that data can be written into. |
[in] | count | Number of elements in the array. |
NULL
if the area size is insufficient for data to be written.5 + n
bytes is written. The user must write n elements in the array after executing this function. Definition at line 402 of file MpDirectWriter.h.
|
inlinestaticnoexcept |
Writes binary data according to the data size.
[in] | p | Pointer to the area that serialized data is written into. |
[in] | pend | The end of the area that data can be written into. |
[in] | bin | Binary data. |
[in] | n | Data size. |
NULL
if the area size is insufficient for data to be written.5 + n
bytes is written. Definition at line 268 of file MpDirectWriter.h.
|
inlinestaticnoexcept |
Data according to the binary data size is written, but the binary data itself is not written.
[in] | p | Pointer to the area that serialized data is written into. |
[in] | pend | The end of the area that data can be written into. |
[in] | n | Data size. |
NULL
if the area size is insufficient for data to be written.Definition at line 249 of file MpDirectWriter.h.
|
inlinestaticnoexcept |
Writes 0xc2 (if true
) or 0xc3 (if false
).
[in] | p | Pointer to the area that serialized data is written into. |
[in] | pend | The end of the area that data can be written into. |
[in] | val | The value to be serialized. |
NULL
if the area size is insufficient for data to be written.Definition at line 162 of file MpDirectWriter.h.
|
inlinestaticnoexcept |
Writes nine-byte data that starts with 0xcb.
[in] | p | Pointer to the area that serialized data is written into. |
[in] | pend | The end of the area that data can be written into. |
[in] | val | The value to be serialized. |
NULL
if the area size is insufficient for data to be written.Definition at line 180 of file MpDirectWriter.h.
|
inlinestaticnoexcept |
Writes data according to the data size.
[in] | p | Pointer to the area that serialized data is written into. |
[in] | pend | The end of the area that data can be written into. |
[in] | type | Data type. |
[in] | data | Data. |
[in] | n | Data size. |
NULL
if the area size is insufficient for data to be written.6 + n
bytes is written. Definition at line 342 of file MpDirectWriter.h.
|
inlinestaticnoexcept |
Data according to the data size is written, but the data itself is not written.
[in] | p | Pointer to the area that serialized data is written into. |
[in] | pend | The end of the area that data can be written into. |
[in] | type | Data type. |
[in] | n | Data size. |
NULL
if the area size is insufficient for data to be written.Definition at line 291 of file MpDirectWriter.h.
|
inlinestaticnoexcept |
Writes five-byte data that starts with 0xca.
[in] | p | Pointer to the area that serialized data is written into. |
[in] | pend | The end of the area that data can be written into. |
[in] | val | The value to be serialized. |
NULL
if the area size is insufficient for data to be written.Definition at line 168 of file MpDirectWriter.h.
|
inlinestaticnoexcept |
Encodes the provided numerical data into data with the minimum length. Writes data of a size up to two bytes.
[in] | p | Pointer to the area that serialized data is written into. |
[in] | pend | The end of the area that data can be written into. |
[in] | val | The value to be serialized. |
NULL
if the area size is insufficient for data to be written. Definition at line 490 of file MpDirectWriter.h.
|
inlinestaticnoexcept |
Encodes the provided numerical data into data with the minimum length. Writes data of a size up to three bytes.
[in] | p | Pointer to the area that serialized data is written into. |
[in] | pend | The end of the area that data can be written into. |
[in] | val | The value to be serialized. |
NULL
if the area size is insufficient for data to be written. Definition at line 500 of file MpDirectWriter.h.
|
inlinestaticnoexcept |
Encodes the provided numerical data into data with the minimum length. Writes data of a size up to five bytes.
[in] | p | Pointer to the area that serialized data is written into. |
[in] | pend | The end of the area that data can be written into. |
[in] | val | The value to be serialized. |
NULL
if the area size is insufficient for data to be written. Definition at line 516 of file MpDirectWriter.h.
|
inlinestaticnoexcept |
Encodes the provided numerical data into data with the minimum length. Writes data of a size up to nine bytes.
[in] | p | Pointer to the area that serialized data is written into. |
[in] | pend | The end of the area that data can be written into. |
[in] | val | The value to be serialized. |
NULL
if the area size is insufficient for data to be written. Definition at line 536 of file MpDirectWriter.h.
|
inlinestaticnoexcept |
Writes three-byte data that starts with 0xd1.
[in] | p | Pointer to the area that serialized data is written into. |
[in] | pend | The end of the area that data can be written into. |
[in] | val | The value to be serialized. |
NULL
if the area size is insufficient for data to be written.Definition at line 135 of file MpDirectWriter.h.
|
inlinestaticnoexcept |
Writes five-byte data that starts with 0xd2.
[in] | p | Pointer to the area that serialized data is written into. |
[in] | pend | The end of the area that data can be written into. |
[in] | val | The value to be serialized. |
NULL
if the area size is insufficient for data to be written.Definition at line 142 of file MpDirectWriter.h.
|
inlinestaticnoexcept |
Writes nine-byte data that starts with 0xd3.
[in] | p | Pointer to the area that serialized data is written into. |
[in] | pend | The end of the area that data can be written into. |
[in] | val | The value to be serialized. |
NULL
if the area size is insufficient for data to be written.Definition at line 149 of file MpDirectWriter.h.
|
inlinestaticnoexcept |
Writes two-byte data that starts with 0xd0.
[in] | p | Pointer to the area that serialized data is written into. |
[in] | pend | The end of the area that data can be written into. |
[in] | val | The value to be serialized. |
NULL
if the area size is insufficient for data to be written.Definition at line 128 of file MpDirectWriter.h.
|
inlinestaticnoexcept |
Writes data according to the number of elements in the array.
[in] | p | Pointer to the area that serialized data is written into. |
[in] | pend | The end of the area that data can be written into. |
[in] | count | Number of elements (pairs of a key and value) in the map. |
NULL
if the area size is insufficient for data to be written.5 + n
bytes is written. The user must write 2 * n
elements (n pairs of a key and value) after executing this function. Definition at line 421 of file MpDirectWriter.h.
|
inlinestaticnoexcept |
Writes 0xc0.
[in] | p | Pointer to the area that serialized data is written into. |
[in] | pend | The end of the area that data can be written into. |
NULL
if the area size is insufficient for data to be written. Definition at line 156 of file MpDirectWriter.h.
|
inlinestaticnoexcept |
Writes data according to the string length.
[in] | p | Pointer to the area that serialized data is written into. |
[in] | pend | The end of the area that data can be written into. |
[in] | str | The string to be serialized. |
[in] | len | Specifies the string length. |
NULL
if the area size is insufficient for data to be written.5 + len
bytes is written. Definition at line 216 of file MpDirectWriter.h.
|
inlinestaticnoexcept |
Data according to the string length is written, but the string itself is not written.
[in] | p | Pointer to the area that serialized data is written into. |
[in] | pend | The end of the area that data can be written into. |
[in] | len | Specifies the string length. |
NULL
if the area size is insufficient for data to be written.Definition at line 192 of file MpDirectWriter.h.
|
inlinestaticnoexcept |
Encodes the provided time data into data with the minimum length. Writes data of a size up to 15 bytes.
[in] | p | Pointer to the area that serialized data is written into. |
[in] | pend | The end of the area that data can be written into. |
[in] | sec | The integer part (in seconds) of the time elapsed from 1970-01-01. |
[in] | nsec | The decimal part (in nanoseconds) of the time elapsed from 1970-01-01. |
NULL
if the area size is insufficient for data to be written. Definition at line 548 of file MpDirectWriter.h.
|
inlinestaticnoexcept |
Encodes the provided time data into data with the minimum length. Writes data of a size up to 15 bytes.
[in] | p | Pointer to the area that serialized data is written into. |
[in] | pend | The end of the area that data can be written into. |
[in] | val | The time data to be serialized. |
NULL
if the area size is insufficient for data to be written. Definition at line 578 of file MpDirectWriter.h.
|
inlinestaticnoexcept |
Writes three-byte data that starts with 0xcd.
[in] | p | Pointer to the area that serialized data is written into. |
[in] | pend | The end of the area that data can be written into. |
[in] | val | The value to be serialized. |
NULL
if the area size is insufficient for data to be written.Definition at line 107 of file MpDirectWriter.h.
|
inlinestaticnoexcept |
Writes five-byte data that starts with 0xce.
[in] | p | Pointer to the area that serialized data is written into. |
[in] | pend | The end of the area that data can be written into. |
[in] | val | The value to be serialized. |
NULL
if the area size is insufficient for data to be written.Definition at line 114 of file MpDirectWriter.h.
|
inlinestaticnoexcept |
Writes nine-byte data that starts with 0xcf.
[in] | p | Pointer to the area that serialized data is written into. |
[in] | pend | The end of the area that data can be written into. |
[in] | val | The value to be serialized. |
NULL
if the area size is insufficient for data to be written.Definition at line 121 of file MpDirectWriter.h.
|
inlinestaticnoexcept |
Writes two-byte data that starts with 0xcc.
[in] | p | Pointer to the area that serialized data is written into. |
[in] | pend | The end of the area that data can be written into. |
[in] | val | The value to be serialized. |
NULL
if the area size is insufficient for data to be written.Definition at line 99 of file MpDirectWriter.h.
|
inlinestaticnoexcept |
Encodes the provided numerical data into data with the minimum length. Writes data of a size up to two bytes.
[in] | p | Pointer to the area that serialized data is written into. |
[in] | pend | The end of the area that data can be written into. |
[in] | val | The value to be serialized. |
NULL
if the area size is insufficient for data to be written. Definition at line 440 of file MpDirectWriter.h.
|
inlinestaticnoexcept |
Encodes the provided numerical data into data with the minimum length. Writes data of a size up to three bytes.
[in] | p | Pointer to the area that serialized data is written into. |
[in] | pend | The end of the area that data can be written into. |
[in] | val | The value to be serialized. |
NULL
if the area size is insufficient for data to be written. Definition at line 451 of file MpDirectWriter.h.
|
inlinestaticnoexcept |
Encodes the provided numerical data into data with the minimum length. Writes data of a size up to five bytes.
[in] | p | Pointer to the area that serialized data is written into. |
[in] | pend | The end of the area that data can be written into. |
[in] | val | The value to be serialized. |
NULL
if the area size is insufficient for data to be written. Definition at line 464 of file MpDirectWriter.h.
|
inlinestaticnoexcept |
Encodes the provided numerical data into data with the minimum length. Writes data of a size up to nine bytes.
[in] | p | Pointer to the area that serialized data is written into. |
[in] | pend | The end of the area that data can be written into. |
[in] | val | The value to be serialized. |
NULL
if the area size is insufficient for data to be written. Definition at line 481 of file MpDirectWriter.h.
© 2012-2017 Nintendo Co., Ltd. All rights reserved.