msgpack::packer< Stream > Class Template Reference

The class template that supports continuous packing. More...

`#include <adaptor_base_decl.hpp>`

## Public Member Functions

| packer (Stream *s)
| Constructor. More...
| packer (Stream &s)
| Constructor. More...
template<typename T >
packer< Stream > & | pack (const T &v)
| Packing function template. More...
packer< Stream > & | pack_uint8 (uint8_t d)
| Packing uint8. More...
packer< Stream > & | pack_uint16 (uint16_t d)
| Packing uint16. More...
packer< Stream > & | pack_uint32 (uint32_t d)
| Packing uint32. More...
packer< Stream > & | pack_uint64 (uint64_t d)
| Packing uint16. More...
packer< Stream > & | pack_int8 (int8_t d)
| Packing int8. More...
packer< Stream > & | pack_int16 (int16_t d)
| Packing int16. More...
packer< Stream > & | pack_int32 (int32_t d)
| Packing int32. More...
packer< Stream > & | pack_int64 (int64_t d)
| Packing int32. More...
packer< Stream > & | pack_fix_uint8 (uint8_t d)
| Packing uint8 (fixed packed type). More...
packer< Stream > & | pack_fix_uint16 (uint16_t d)
| Packing uint8 (fixed packed type). More...
packer< Stream > & | pack_fix_uint32 (uint32_t d)
| Packing uint8 (fixed packed type). More...
packer< Stream > & | pack_fix_uint64 (uint64_t d)
| Packing uint8 (fixed packed type). More...
packer< Stream > & | pack_fix_int8 (int8_t d)
| Packing uint8 (fixed packed type). More...
packer< Stream > & | pack_fix_int16 (int16_t d)
| Packing uint8 (fixed packed type). More...
packer< Stream > & | pack_fix_int32 (int32_t d)
| Packing uint8 (fixed packed type). More...
packer< Stream > & | pack_fix_int64 (int64_t d)
| Packing uint8 (fixed packed type). More...
packer< Stream > & | pack_char (char d)
| Packing char. More...
packer< Stream > & | pack_signed_char (signed char d)
| Packing signed char. More...
packer< Stream > & | pack_short (short d)
| Packing short. More...
packer< Stream > & | pack_int (int d)
| Packing int. More...
packer< Stream > & | pack_long (long d)
| Packing long. More...
packer< Stream > & | pack_long_long (long long d)
| Packing long long. More...
packer< Stream > & | pack_unsigned_char (unsigned char d)
| Packing unsigned char. More...
packer< Stream > & | pack_unsigned_short (unsigned short d)
| Packing unsigned short. More...
packer< Stream > & | pack_unsigned_int (unsigned int d)
| Packing unsigned int. More...
packer< Stream > & | pack_unsigned_long (unsigned long d)
| Packing unsigned long. More...
packer< Stream > & | pack_unsigned_long_long (unsigned long long d)
| Packing unsigned long long. More...
packer< Stream > & | pack_float (float d)
| Packing float. More...
packer< Stream > & | pack_double (double d)
| Packing double. More...
packer< Stream > & | pack_nil ()
| Packing nil. More...
packer< Stream > & | pack_true ()
| Packing true. More...
packer< Stream > & | pack_false ()
| Packing false. More...
packer< Stream > & | pack_array (uint32_t n)
| Packing array header and size. More...
packer< Stream > & | pack_map (uint32_t n)
| Packing map header and size. More...
packer< Stream > & | pack_str (uint32_t l)
| Packing str header and length. More...
packer< Stream > & | pack_str_body (const char *b, uint32_t l)
| Packing str body. More...
packer< Stream > & | pack_v4raw (uint32_t l)
| Packing raw (v4) header and length. More...
packer< Stream > & | pack_v4raw_body (const char *b, uint32_t l)
| Packing raw (v4) body. More...
packer< Stream > & | pack_bin (uint32_t l)
| Packing bin header and length. More...
packer< Stream > & | pack_bin_body (const char *b, uint32_t l)
| Packing bin body. More...
packer< Stream > & | pack_ext (size_t l, int8_t type)
| Packing ext header, type, and length. More...
packer< Stream > & | pack_ext_body (const char *b, uint32_t l)
| Packing ext body. More...
| packer (const packer &)=delete
packer & | operator= (const packer &)=delete
| packer ()=delete
template<typename T >
msgpack::packer< Stream > & | pack (const T &v)

## Detailed Description

### template<typename Stream>
class msgpack::packer< Stream >

The class template that supports continuous packing.

Template Parameters

  Stream | Any type that have a member function `Stream write(const char*, size_t s)`

## Constructor & Destructor Documentation

## packer() [1/4]

template<typename Stream >

msgpack::packer< Stream >::packer | ( | Stream * | s | ) |

inline

Constructor.

This constructor is left for compatibility. Use `packer(Stream& s)` instead of the constructor.

Parameters

  s | A pointer to packing destination stream object.

## packer() [2/4]

template<typename Stream >

msgpack::packer< Stream >::packer | ( | Stream & | s | ) |

inline

Constructor.

Parameters

  s | Packing destination stream object.

## packer() [3/4]

template<typename Stream>

msgpack::packer< Stream >::packer | ( | const packer< Stream > & |  | ) |

delete

## packer() [4/4]

template<typename Stream>

msgpack::packer< Stream >::packer | ( |  | ) |

delete

## Member Function Documentation

## operator=()

template<typename Stream>

packer& msgpack::packer< Stream >::operator= | ( | const packer< Stream > & |  | ) |

delete

## pack() [1/2]

template<typename Stream>
template<typename T >

packer<Stream>& msgpack::packer< Stream >::pack | ( | const T & | v | ) |

Packing function template.

Template Parameters

  T | The type of packing object.

Parameters

  v | a packing object.

Returns
  The reference of `*this`.

Referenced by msgpack::adaptor::pack< std::reference_wrapper< T > >::operator()(), msgpack::adaptor::pack< std::vector< bool, Alloc > >::operator()(), msgpack::adaptor::pack< std::shared_ptr< T > >::operator()(), msgpack::adaptor::pack< std::unique_ptr< T > >::operator()(), msgpack::adaptor::pack< std::pair< T1, T2 > >::operator()(), msgpack::adaptor::pack< std::forward_list< T, Alloc > >::operator()(), msgpack::adaptor::pack< std::unordered_set< Key, Hash, Compare, Alloc > >::operator()(), msgpack::adaptor::pack< std::list< T, Alloc > >::operator()(), msgpack::adaptor::pack< std::unordered_map< K, V, Hash, Compare, Alloc > >::operator()(), msgpack::adaptor::pack< boost::optional< T > >::operator()(), msgpack::adaptor::pack< std::deque< T, Alloc > >::operator()(), msgpack::adaptor::pack< std::set< T, Compare, Alloc > >::operator()(), msgpack::adaptor::pack< std::vector< T, Alloc > >::operator()(), msgpack::adaptor::pack< T[N]>::operator()(), msgpack::adaptor::pack< type::assoc_vector< K, V, Compare, Alloc > >::operator()(), msgpack::adaptor::pack< std::array< T, N > >::operator()(), msgpack::adaptor::pack< std::unordered_multiset< Key, Hash, Compare, Alloc > >::operator()(), msgpack::adaptor::pack< std::unordered_multimap< K, V, Hash, Compare, Alloc > >::operator()(), msgpack::adaptor::pack< std::multiset< T, Compare, Alloc > >::operator()(), msgpack::adaptor::pack< std::map< K, V, Compare, Alloc > >::operator()(), msgpack::adaptor::pack< msgpack::type::array_ref< T > >::operator()(), msgpack::adaptor::pack< msgpack::type::array_ref< T[N]> >::operator()(), msgpack::adaptor::pack< std::multimap< K, V, Compare, Alloc > >::operator()(), msgpack::adaptor::pack< type::tuple<> >::operator()(), msgpack::StdTuplePacker< Stream, Tuple, N >::pack(), msgpack::MsgpackTuplePacker< Stream, Tuple, N >::pack(), msgpack::MsgpackTuplePacker< Stream, Tuple, 1 >::pack(), and msgpack::pack().

## pack() [2/2]

template<typename Stream>
template<typename T >

msgpack::packer<Stream>& msgpack::packer< Stream >::pack | ( | const T & | v | ) |

inline

References msgpack::operator<<().

## pack_array()

template<typename Stream >

packer< Stream > & msgpack::packer< Stream >::pack_array | ( | uint32_t | n | ) |

inline

Packing array header and size.

The packed type is array header and array size. You need to pack `n` msgpack objects following this header and size. See https://github.com/msgpack/msgpack/blob/master/spec.md#array-format-family

Parameters

  n | The number of array elements (array size).

Returns
  The reference of `*this`.

Referenced by msgpack::adaptor::pack< std::vector< bool, Alloc > >::operator()(), msgpack::adaptor::pack< std::tuple< Args... > >::operator()(), msgpack::adaptor::pack< std::pair< T1, T2 > >::operator()(), msgpack::adaptor::pack< std::forward_list< T, Alloc > >::operator()(), msgpack::adaptor::pack< std::unordered_set< Key, Hash, Compare, Alloc > >::operator()(), msgpack::adaptor::pack< std::list< T, Alloc > >::operator()(), msgpack::adaptor::pack< std::deque< T, Alloc > >::operator()(), msgpack::adaptor::pack< std::set< T, Compare, Alloc > >::operator()(), msgpack::adaptor::pack< std::vector< T, Alloc > >::operator()(), msgpack::adaptor::pack< msgpack::type::tuple< Args... > >::operator()(), msgpack::adaptor::pack< T[N]>::operator()(), msgpack::adaptor::pack< std::array< T, N > >::operator()(), msgpack::adaptor::pack< std::unordered_multiset< Key, Hash, Compare, Alloc > >::operator()(), msgpack::adaptor::pack< std::multiset< T, Compare, Alloc > >::operator()(), msgpack::adaptor::pack< T, typename msgpack::enable_if< detail::is_seq_no_pair_no_tuple< T >::value >::type >::operator()(), msgpack::adaptor::pack< msgpack::type::array_ref< T > >::operator()(), msgpack::adaptor::pack< msgpack::type::array_ref< T[N]> >::operator()(), and msgpack::adaptor::pack< type::tuple<> >::operator()().

## pack_bin()

template<typename Stream >

packer< Stream > & msgpack::packer< Stream >::pack_bin | ( | uint32_t | l | ) |

inline

Packing bin header and length.

The packed type is bin header and length. The minimum byte size length expression is used. You need to call `pack_bin_body(const char* b, uint32_t l)` after this function calling with the same `l` value. See https://github.com/msgpack/msgpack/blob/master/spec.md#bin-format-family

Parameters

  l | The length of string.

Returns
  The reference of `*this`.

Referenced by msgpack::adaptor::pack< std::array< char, N > >::operator()(), msgpack::adaptor::pack< std::array< unsigned char, N > >::operator()(), msgpack::adaptor::pack< std::vector< unsigned char, Alloc > >::operator()(), msgpack::adaptor::pack< std::vector< char, Alloc > >::operator()(), msgpack::adaptor::pack< type::raw_ref >::operator()(), msgpack::adaptor::pack< unsigned char[N]>::operator()(), and msgpack::adaptor::pack< const unsigned char[N]>::operator()().

## pack_bin_body()

template<typename Stream >

packer< Stream > & msgpack::packer< Stream >::pack_bin_body | ( | const char * | b,
|  | uint32_t | l
| ) |  |

inline

Packing bin body.

You need to call this function just after `pack_bin(uint32_t l)` calling. The value `l` should be the same as `pack_bin(uint32_t l)` argument `l`. See https://github.com/msgpack/msgpack/blob/master/spec.md#bin-format-family

Parameters

  l | The length of string.

Returns
  The reference of `*this`.

Referenced by msgpack::adaptor::pack< std::array< char, N > >::operator()(), msgpack::adaptor::pack< std::array< unsigned char, N > >::operator()(), msgpack::adaptor::pack< std::vector< unsigned char, Alloc > >::operator()(), msgpack::adaptor::pack< std::vector< char, Alloc > >::operator()(), msgpack::adaptor::pack< type::raw_ref >::operator()(), msgpack::adaptor::pack< unsigned char[N]>::operator()(), and msgpack::adaptor::pack< const unsigned char[N]>::operator()().

## pack_char()

template<typename Stream >

packer< Stream > & msgpack::packer< Stream >::pack_char | ( | char | d | ) |

inline

Packing char.

The byte size of the packed data depends on `d`. If `d` is zero or positive, the packed type is positive fixnum, or uint*, else the packed type is negative fixnum, or int* The minimum byte size expression is used. See https://github.com/msgpack/msgpack/blob/master/spec.md#formats-int

Parameters

  d | a packing object.

Returns
  The reference of `*this`.

Referenced by msgpack::adaptor::pack< char >::operator()().

## pack_double()

template<typename Stream >

packer< Stream > & msgpack::packer< Stream >::pack_double | ( | double | d | ) |

inline

Packing double.

The packed type is float64. See https://github.com/msgpack/msgpack/blob/master/spec.md#formats-float

Parameters

  d | a packing object.

Returns
  The reference of `*this`.

Referenced by msgpack::adaptor::pack< double >::operator()().

## pack_ext()

template<typename Stream >

packer< Stream > & msgpack::packer< Stream >::pack_ext | ( | size_t | l,
|  | int8_t | type
| ) |  |

inline

Packing ext header, type, and length.

The packed type is ext. The minimum byte size length expression is used. The length 1, 2, 4, 8, and 16 can be encoded in the header. You need to call `pack_ext_body(const char* b, uint32_t l)` after this function calling with the same `l` value. See https://github.com/msgpack/msgpack/blob/master/spec.md#formats-ext

Parameters

  l | The length of string.

Returns
  The reference of `*this`.

Referenced by msgpack::adaptor::pack< msgpack::type::ext >::operator()(), and msgpack::adaptor::pack< msgpack::type::ext_ref >::operator()().

## pack_ext_body()

template<typename Stream >

packer< Stream > & msgpack::packer< Stream >::pack_ext_body | ( | const char * | b,
|  | uint32_t | l
| ) |  |

inline

Packing ext body.

You need to call this function just after `pack_ext(size_t l, int8_t type)` calling. The value `l` should be the same as `pack_ext(size_t l, int8_t type)` argument `l`. See https://github.com/msgpack/msgpack/blob/master/spec.md#bin-format-family

Parameters

  l | The length of string.

Returns
  The reference of `*this`.

Referenced by msgpack::adaptor::pack< msgpack::type::ext >::operator()(), and msgpack::adaptor::pack< msgpack::type::ext_ref >::operator()().

## pack_false()

template<typename Stream >

packer< Stream > & msgpack::packer< Stream >::pack_false | ( |  | ) |

inline

Packing false.

The packed type is bool, value is false. See https://github.com/msgpack/msgpack/blob/master/spec.md#bool-format-family

Returns
  The reference of `*this`.

Referenced by msgpack::adaptor::pack< bool >::operator()().

## pack_fix_int16()

template<typename Stream >

packer< Stream > & msgpack::packer< Stream >::pack_fix_int16 | ( | int16_t | d | ) |

inline

Packing uint8 (fixed packed type).

The packed type is always int16. See https://github.com/msgpack/msgpack/blob/master/spec.md#formats-int

Parameters

  d | a packing object.

Returns
  The reference of `*this`.

Referenced by msgpack::adaptor::pack< type::fix_int16 >::operator()().

## pack_fix_int32()

template<typename Stream >

packer< Stream > & msgpack::packer< Stream >::pack_fix_int32 | ( | int32_t | d | ) |

inline

Packing uint8 (fixed packed type).

The packed type is always int32. See https://github.com/msgpack/msgpack/blob/master/spec.md#formats-int

Parameters

  d | a packing object.

Returns
  The reference of `*this`.

Referenced by msgpack::adaptor::pack< type::fix_int32 >::operator()().

## pack_fix_int64()

template<typename Stream >

packer< Stream > & msgpack::packer< Stream >::pack_fix_int64 | ( | int64_t | d | ) |

inline

Packing uint8 (fixed packed type).

The packed type is always int64. See https://github.com/msgpack/msgpack/blob/master/spec.md#formats-int

Parameters

  d | a packing object.

Returns
  The reference of `*this`.

Referenced by msgpack::adaptor::pack< type::fix_int64 >::operator()().

## pack_fix_int8()

template<typename Stream >

packer< Stream > & msgpack::packer< Stream >::pack_fix_int8 | ( | int8_t | d | ) |

inline

Packing uint8 (fixed packed type).

The packed type is always int8. See https://github.com/msgpack/msgpack/blob/master/spec.md#formats-int

Parameters

  d | a packing object.

Returns
  The reference of `*this`.

Referenced by msgpack::adaptor::pack< type::fix_int8 >::operator()().

## pack_fix_uint16()

template<typename Stream >

packer< Stream > & msgpack::packer< Stream >::pack_fix_uint16 | ( | uint16_t | d | ) |

inline

Packing uint8 (fixed packed type).

The packed type is always uint16. See https://github.com/msgpack/msgpack/blob/master/spec.md#formats-int

Parameters

  d | a packing object.

Returns
  The reference of `*this`.

Referenced by msgpack::adaptor::pack< type::fix_uint16 >::operator()().

## pack_fix_uint32()

template<typename Stream >

packer< Stream > & msgpack::packer< Stream >::pack_fix_uint32 | ( | uint32_t | d | ) |

inline

Packing uint8 (fixed packed type).

The packed type is always uint32. See https://github.com/msgpack/msgpack/blob/master/spec.md#formats-int

Parameters

  d | a packing object.

Returns
  The reference of `*this`.

Referenced by msgpack::adaptor::pack< type::fix_uint32 >::operator()().

## pack_fix_uint64()

template<typename Stream >

packer< Stream > & msgpack::packer< Stream >::pack_fix_uint64 | ( | uint64_t | d | ) |

inline

Packing uint8 (fixed packed type).

The packed type is always uint64. See https://github.com/msgpack/msgpack/blob/master/spec.md#formats-int

Parameters

  d | a packing object.

Returns
  The reference of `*this`.

Referenced by msgpack::adaptor::pack< type::fix_uint64 >::operator()().

## pack_fix_uint8()

template<typename Stream >

packer< Stream > & msgpack::packer< Stream >::pack_fix_uint8 | ( | uint8_t | d | ) |

inline

Packing uint8 (fixed packed type).

The packed type is always uint8. See https://github.com/msgpack/msgpack/blob/master/spec.md#formats-int

Parameters

  d | a packing object.

Returns
  The reference of `*this`.

Referenced by msgpack::adaptor::pack< type::fix_uint8 >::operator()().

## pack_float()

template<typename Stream >

packer< Stream > & msgpack::packer< Stream >::pack_float | ( | float | d | ) |

inline

Packing float.

The packed type is float32. See https://github.com/msgpack/msgpack/blob/master/spec.md#formats-float

Parameters

  d | a packing object.

Returns
  The reference of `*this`.

Referenced by msgpack::adaptor::pack< float >::operator()().

## pack_int()

template<typename Stream >

packer< Stream > & msgpack::packer< Stream >::pack_int | ( | int | d | ) |

inline

Packing int.

The byte size of the packed data depends on `d`. If `d` is zero or positive, the packed type is positive fixnum, or uint*, else the packed type is negative fixnum, or int* The minimum byte size expression is used. See https://github.com/msgpack/msgpack/blob/master/spec.md#formats-int

Parameters

  d | a packing object.

Returns
  The reference of `*this`.

Referenced by msgpack::adaptor::pack< signed int >::operator()().

## pack_int16()

template<typename Stream >

packer< Stream > & msgpack::packer< Stream >::pack_int16 | ( | int16_t | d | ) |

inline

Packing int16.

The byte size of the packed data depends on `d`. If `d` is zero or positive, the packed type is positive fixnum, uint8, or uint16, else the packed type is negative fixnum, int8, or int16. The minimum byte size expression is used. See https://github.com/msgpack/msgpack/blob/master/spec.md#formats-int

Parameters

  d | a packing object.

Returns
  The reference of `*this`.

## pack_int32()

template<typename Stream >

packer< Stream > & msgpack::packer< Stream >::pack_int32 | ( | int32_t | d | ) |

inline

Packing int32.

The byte size of the packed data depends on `d`. If `d` is zero or positive, the packed type is positive fixnum, uint8, uint16, or uint32, else the packed type is negative fixnum, int8, int16, or int32. The minimum byte size expression is used. See https://github.com/msgpack/msgpack/blob/master/spec.md#formats-int

Parameters

  d | a packing object.

Returns
  The reference of `*this`.

## pack_int64()

template<typename Stream >

packer< Stream > & msgpack::packer< Stream >::pack_int64 | ( | int64_t | d | ) |

inline

Packing int32.

The byte size of the packed data depends on `d`. If `d` is zero or positive, the packed type is positive fixnum, uint8, uint16, uint32, or uint64, else the packed type is negative fixnum, int8, int16, int32, or int64. The minimum byte size expression is used. See https://github.com/msgpack/msgpack/blob/master/spec.md#formats-int

Parameters

  d | a packing object.

Returns
  The reference of `*this`.

## pack_int8()

template<typename Stream >

packer< Stream > & msgpack::packer< Stream >::pack_int8 | ( | int8_t | d | ) |

inline

Packing int8.

The byte size of the packed data depends on `d`. If `d` is zero or positive, the packed type is positive fixnum, or uint8, else the packed type is negative fixnum, or int8 The minimum byte size expression is used. See https://github.com/msgpack/msgpack/blob/master/spec.md#formats-int

Parameters

  d | a packing object.

Returns
  The reference of `*this`.

## pack_long()

template<typename Stream >

packer< Stream > & msgpack::packer< Stream >::pack_long | ( | long | d | ) |

inline

Packing long.

The byte size of the packed data depends on `d`. If `d` is zero or positive, the packed type is positive fixnum, or uint*, else the packed type is negative fixnum, or int* The minimum byte size expression is used. See https://github.com/msgpack/msgpack/blob/master/spec.md#formats-int

Parameters

  d | a packing object.

Returns
  The reference of `*this`.

Referenced by msgpack::adaptor::pack< signed long >::operator()().

## pack_long_long()

template<typename Stream >

packer< Stream > & msgpack::packer< Stream >::pack_long_long | ( | long long | d | ) |

inline

Packing long long.

The byte size of the packed data depends on `d`. If `d` is zero or positive, the packed type is positive fixnum, or uint*, else the packed type is negative fixnum, or int* The minimum byte size expression is used. See https://github.com/msgpack/msgpack/blob/master/spec.md#formats-int

Parameters

  d | a packing object.

Returns
  The reference of `*this`.

Referenced by msgpack::adaptor::pack< signed long long >::operator()().

## pack_map()

template<typename Stream >

packer< Stream > & msgpack::packer< Stream >::pack_map | ( | uint32_t | n | ) |

inline

Packing map header and size.

The packed type is map header and map size. You need to pack `n` pairs of msgpack objects following this header and size. See https://github.com/msgpack/msgpack/blob/master/spec.md#map-format-family

Parameters

  n | The number of array elements (array size).

Returns
  The reference of `*this`.

Referenced by msgpack::adaptor::pack< std::unordered_map< K, V, Hash, Compare, Alloc > >::operator()(), msgpack::adaptor::pack< type::assoc_vector< K, V, Compare, Alloc > >::operator()(), msgpack::adaptor::pack< std::unordered_multimap< K, V, Hash, Compare, Alloc > >::operator()(), msgpack::adaptor::pack< std::map< K, V, Compare, Alloc > >::operator()(), and msgpack::adaptor::pack< std::multimap< K, V, Compare, Alloc > >::operator()().

## pack_nil()

template<typename Stream >

packer< Stream > & msgpack::packer< Stream >::pack_nil | ( |  | ) |

inline

Packing nil.

The packed type is nil. See https://github.com/msgpack/msgpack/blob/master/spec.md#formats-nil

Returns
  The reference of `*this`.

Referenced by msgpack::adaptor::pack< type::nil_t >::operator()(), msgpack::adaptor::pack< std::shared_ptr< T > >::operator()(), msgpack::adaptor::pack< std::unique_ptr< T > >::operator()(), and msgpack::adaptor::pack< boost::optional< T > >::operator()().

## pack_short()

template<typename Stream >

packer< Stream > & msgpack::packer< Stream >::pack_short | ( | short | d | ) |

inline

Packing short.

The byte size of the packed data depends on `d`. If `d` is zero or positive, the packed type is positive fixnum, or uint*, else the packed type is negative fixnum, or int* The minimum byte size expression is used. See https://github.com/msgpack/msgpack/blob/master/spec.md#formats-int

Parameters

  d | a packing object.

Returns
  The reference of `*this`.

Referenced by msgpack::adaptor::pack< signed short >::operator()().

## pack_signed_char()

template<typename Stream >

packer< Stream > & msgpack::packer< Stream >::pack_signed_char | ( | signed char | d | ) |

inline

Packing signed char.

The byte size of the packed data depends on `d`. If `d` is zero or positive, the packed type is positive fixnum, or uint*, else the packed type is negative fixnum, or int* The minimum byte size expression is used. See https://github.com/msgpack/msgpack/blob/master/spec.md#formats-int

Parameters

  d | a packing object.

Returns
  The reference of `*this`.

Referenced by msgpack::adaptor::pack< signed char >::operator()().

## pack_str()

template<typename Stream >

packer< Stream > & msgpack::packer< Stream >::pack_str | ( | uint32_t | l | ) |

inline

Packing str header and length.

The packed type is str header and length. The minimum byte size length expression is used. You need to call `pack_str_body(const char* b, uint32_t l)` after this function calling with the same `l` value. See https://github.com/msgpack/msgpack/blob/master/spec.md#formats-str

Parameters

  l | The length of string.

Returns
  The reference of `*this`.

Referenced by msgpack::adaptor::pack< const char * >::operator()(), msgpack::adaptor::pack< std::string >::operator()(), msgpack::adaptor::pack< char[N]>::operator()(), and msgpack::adaptor::pack< const char[N]>::operator()().

## pack_str_body()

template<typename Stream >

packer< Stream > & msgpack::packer< Stream >::pack_str_body | ( | const char * | b,
|  | uint32_t | l
| ) |  |

inline

Packing str body.

You need to call this function just after `pack_str(uint32_t l)` calling. The value `l` should be the same as `pack_str(uint32_t l)` argument `l`. See https://github.com/msgpack/msgpack/blob/master/spec.md#formats-str

Parameters

  l | The length of string.

Returns
  The reference of `*this`.

Referenced by msgpack::adaptor::pack< const char * >::operator()(), msgpack::adaptor::pack< std::string >::operator()(), msgpack::adaptor::pack< char[N]>::operator()(), and msgpack::adaptor::pack< const char[N]>::operator()().

## pack_true()

template<typename Stream >

packer< Stream > & msgpack::packer< Stream >::pack_true | ( |  | ) |

inline

Packing true.

The packed type is bool, value is true. See https://github.com/msgpack/msgpack/blob/master/spec.md#bool-format-family

Returns
  The reference of `*this`.

Referenced by msgpack::adaptor::pack< bool >::operator()().

## pack_uint16()

template<typename Stream >

packer< Stream > & msgpack::packer< Stream >::pack_uint16 | ( | uint16_t | d | ) |

inline

Packing uint16.

The byte size of the packed data depends on `d`. The packed type is positive fixnum, uint8 or uint16. The minimum byte size expression is used. See https://github.com/msgpack/msgpack/blob/master/spec.md#formats-int

Parameters

  d | a packing object.

Returns
  The reference of `*this`.

## pack_uint32()

template<typename Stream >

packer< Stream > & msgpack::packer< Stream >::pack_uint32 | ( | uint32_t | d | ) |

inline

Packing uint32.

The byte size of the packed data depends on `d`. The packed type is positive fixnum, uint8, uint16 or uint32. The minimum byte size expression is used. See https://github.com/msgpack/msgpack/blob/master/spec.md#formats-int

Parameters

  d | a packing object.

Returns
  The reference of `*this`.

## pack_uint64()

template<typename Stream >

packer< Stream > & msgpack::packer< Stream >::pack_uint64 | ( | uint64_t | d | ) |

inline

Packing uint16.

The byte size of the packed data depends on `d`. The packed type is positive fixnum, uint8, uint16, uint32 or uint64. The minimum byte size expression is used. positive fixnum, uint8, uint16, or uint32 is used. See https://github.com/msgpack/msgpack/blob/master/spec.md#formats-int

Parameters

  d | a packing object.

Returns
  The reference of `*this`.

## pack_uint8()

template<typename Stream >

packer< Stream > & msgpack::packer< Stream >::pack_uint8 | ( | uint8_t | d | ) |

inline

Packing uint8.

The byte size of the packed data depends on `d`. The packed type is positive fixnum or uint8. The minimum byte size expression is used. See https://github.com/msgpack/msgpack/blob/master/spec.md#formats-int

Parameters

  d | a packing object.

Returns
  The reference of `*this`.

## pack_unsigned_char()

template<typename Stream >

packer< Stream > & msgpack::packer< Stream >::pack_unsigned_char | ( | unsigned char | d | ) |

inline

Packing unsigned char.

The byte size of the packed data depends on `d`. The packed type is positive fixnum, or uint*. The minimum byte size expression is used. See https://github.com/msgpack/msgpack/blob/master/spec.md#formats-int

Parameters

  d | a packing object.

Returns
  The reference of `*this`.

Referenced by msgpack::adaptor::pack< unsigned char >::operator()().

## pack_unsigned_int()

template<typename Stream >

packer< Stream > & msgpack::packer< Stream >::pack_unsigned_int | ( | unsigned int | d | ) |

inline

Packing unsigned int.

The byte size of the packed data depends on `d`. The packed type is positive fixnum, or uint*. The minimum byte size expression is used. See https://github.com/msgpack/msgpack/blob/master/spec.md#formats-int

Parameters

  d | a packing object.

Returns
  The reference of `*this`.

Referenced by msgpack::adaptor::pack< unsigned int >::operator()().

## pack_unsigned_long()

template<typename Stream >

packer< Stream > & msgpack::packer< Stream >::pack_unsigned_long | ( | unsigned long | d | ) |

inline

Packing unsigned long.

The byte size of the packed data depends on `d`. The packed type is positive fixnum, or uint*. The minimum byte size expression is used. See https://github.com/msgpack/msgpack/blob/master/spec.md#formats-int

Parameters

  d | a packing object.

Returns
  The reference of `*this`.

Referenced by msgpack::adaptor::pack< unsigned long >::operator()().

## pack_unsigned_long_long()

template<typename Stream >

packer< Stream > & msgpack::packer< Stream >::pack_unsigned_long_long | ( | unsigned long long | d | ) |

inline

Packing unsigned long long.

The byte size of the packed data depends on `d`. The packed type is positive fixnum, or uint*. The minimum byte size expression is used. See https://github.com/msgpack/msgpack/blob/master/spec.md#formats-int

Parameters

  d | a packing object.

Returns
  The reference of `*this`.

Referenced by msgpack::adaptor::pack< unsigned long long >::operator()().

## pack_unsigned_short()

template<typename Stream >

packer< Stream > & msgpack::packer< Stream >::pack_unsigned_short | ( | unsigned short | d | ) |

inline

Packing unsigned short.

The byte size of the packed data depends on `d`. The packed type is positive fixnum, or uint*. The minimum byte size expression is used. See https://github.com/msgpack/msgpack/blob/master/spec.md#formats-int

Parameters

  d | a packing object.

Returns
  The reference of `*this`.

Referenced by msgpack::adaptor::pack< unsigned short >::operator()().

## pack_v4raw()

template<typename Stream >

packer< Stream > & msgpack::packer< Stream >::pack_v4raw | ( | uint32_t | l | ) |

inline

Packing raw (v4) header and length.

The packed type is raw header and length. The minimum byte size length expression is used. The format raw (v4) is old MessagePack version4 format. You need to call `pack_v4raw_body(const char* b, uint32_t l)` after this function calling with the same `l` value. See https://github.com/msgpack/msgpack/blob/master/spec.md#formats-str

Parameters

  l | The length of string.

Returns
  The reference of `*this`.

Referenced by msgpack::adaptor::pack< type::v4raw_ref >::operator()().

## pack_v4raw_body()

template<typename Stream >

packer< Stream > & msgpack::packer< Stream >::pack_v4raw_body | ( | const char * | b,
|  | uint32_t | l
| ) |  |

inline

Packing raw (v4) body.

The format raw (v4) is old MessagePack version4 format. You need to call this function just after `pack_v4raw(uint32_t l)` calling. The value `l` should be the same as `pack_v4raw(uint32_t l)` argument `l`. See https://github.com/msgpack/msgpack/blob/master/spec.md#formats-str

Parameters

  l | The length of string.

Returns
  The reference of `*this`.

Referenced by msgpack::adaptor::pack< type::v4raw_ref >::operator()().

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

- /build/msgpack-c-kSv3lu/msgpack-c-3.0.1/include/msgpack/v1/adaptor/adaptor_base_decl.hpp
- /build/msgpack-c-kSv3lu/msgpack-c-3.0.1/include/msgpack/v1/pack.hpp
- /build/msgpack-c-kSv3lu/msgpack-c-3.0.1/include/msgpack/v1/object.hpp