Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | Friends | List of all members
msgpack11::MsgPack Class Referencefinal

#include <msgpack11.hpp>

Public Types

typedef std::vector< MsgPackarray
 
typedef std::vector< uint8_t > binary
 
typedef std::tuple< int8_t, binaryextension
 
typedef std::map< MsgPack, MsgPackobject
 
typedef std::initializer_list< std::pair< std::string, Type > > shape
 
enum  Type {
  NUMBER = 1, INT = 2 | NUMBER, NUL = 1 << 2, FLOAT32 = 2 << 2 | NUMBER,
  FLOAT64 = 3 << 2 | NUMBER, INT8 = 4 << 2 | INT, INT16 = 5 << 2 | INT, INT32 = 6 << 2 | INT,
  INT64 = 7 << 2 | INT, UINT8 = 8 << 2 | INT, UINT16 = 9 << 2 | INT, UINT32 = 10 << 2 | INT,
  UINT64 = 11 << 2 | INT, BOOL = 12 << 2, STRING = 13 << 2, BINARY = 14 << 2,
  ARRAY = 15 << 2, OBJECT = 16 << 2, EXTENSION = 17 << 2
}
 

Public Member Functions

const arrayarray_items () const
 
const binarybinary_items () const
 
bool bool_value () const
 
std::string dump () const
 
void dump (std::string &out) const
 
const extensionextension_items () const
 
float float32_value () const
 
double float64_value () const
 
bool has_shape (const shape &types, std::string &err) const
 
int16_t int16_value () const
 
int32_t int32_value () const
 
int64_t int64_value () const
 
int8_t int8_value () const
 
int32_t int_value () const
 
bool is_array () const
 
bool is_binary () const
 
bool is_bool () const
 
bool is_extension () const
 
bool is_float32 () const
 
bool is_float64 () const
 
bool is_int () const
 
bool is_int16 () const
 
bool is_int32 () const
 
bool is_int64 () const
 
bool is_int8 () const
 
bool is_null () const
 
bool is_number () const
 
bool is_object () const
 
bool is_string () const
 
bool is_uint16 () const
 
bool is_uint32 () const
 
bool is_uint64 () const
 
bool is_uint8 () const
 
 MsgPack () noexcept
 
 MsgPack (array &&values)
 
 MsgPack (binary &&values)
 
 MsgPack (bool value)
 
 MsgPack (const array &values)
 
 MsgPack (const binary &values)
 
 MsgPack (const char *value)
 
 MsgPack (const extension &values)
 
template<class M , typename std::enable_if< std::is_constructible< MsgPack, typename M::key_type >::value &&std::is_constructible< MsgPack, typename M::mapped_type >::value, int >::type = 0>
 MsgPack (const M &m)
 
 MsgPack (const object &values)
 
 MsgPack (const std::string &value)
 
template<class T , class = decltype(&T::to_msgpack)>
 MsgPack (const T &t)
 
template<class V , typename std::enable_if< std::is_constructible< MsgPack, typename V::value_type >::value &&!std::is_same< typename binary::value_type, typename V::value_type >::value, int >::type = 0>
 MsgPack (const V &v)
 
template<class V , typename std::enable_if< std::is_constructible< MsgPack, typename V::value_type >::value &&std::is_same< typename binary::value_type, typename V::value_type >::value, int >::type = 0>
 MsgPack (const V &v)
 
 MsgPack (double value)
 
 MsgPack (extension &&values)
 
 MsgPack (float value)
 
 MsgPack (int16_t value)
 
 MsgPack (int32_t value)
 
 MsgPack (int64_t value)
 
 MsgPack (int8_t value)
 
 MsgPack (object &&values)
 
 MsgPack (std::nullptr_t) noexcept
 
 MsgPack (std::string &&value)
 
 MsgPack (uint16_t value)
 
 MsgPack (uint32_t value)
 
 MsgPack (uint64_t value)
 
 MsgPack (uint8_t value)
 
 MsgPack (void *)=delete
 
double number_value () const
 
const objectobject_items () const
 
bool operator!= (const MsgPack &rhs) const
 
bool operator< (const MsgPack &rhs) const
 
bool operator<= (const MsgPack &rhs) const
 
bool operator== (const MsgPack &rhs) const
 
bool operator> (const MsgPack &rhs) const
 
bool operator>= (const MsgPack &rhs) const
 
const MsgPackoperator[] (const std::string &key) const
 
const MsgPackoperator[] (size_t i) const
 
const std::string & string_value () const
 
Type type () const
 
uint16_t uint16_value () const
 
uint32_t uint32_value () const
 
uint64_t uint64_value () const
 
uint8_t uint8_value () const
 

Static Public Member Functions

static MsgPack parse (const char *in, size_t len, std::string &err)
 
static MsgPack parse (const std::string &in, std::string &err)
 
static MsgPack parse (std::istream &is)
 
static MsgPack parse (std::istream &is, std::string &err)
 
static std::vector< MsgPackparse_multi (const std::string &in, std::string &err)
 
static std::vector< MsgPackparse_multi (const std::string &in, std::string::size_type &parser_stop_pos, std::string &err)
 

Private Attributes

std::shared_ptr< MsgPackValuem_ptr
 

Friends

std::ostream & operator<< (std::ostream &os, const MsgPack &msgpack)
 
std::istream & operator>> (std::istream &is, MsgPack &msgpack)
 

Detailed Description

Definition at line 29 of file msgpack11.hpp.

Member Typedef Documentation

◆ array

typedef std::vector<MsgPack> msgpack11::MsgPack::array

Definition at line 56 of file msgpack11.hpp.

◆ binary

typedef std::vector<uint8_t> msgpack11::MsgPack::binary

Definition at line 60 of file msgpack11.hpp.

◆ extension

typedef std::tuple<int8_t, binary> msgpack11::MsgPack::extension

Definition at line 61 of file msgpack11.hpp.

◆ object

Definition at line 57 of file msgpack11.hpp.

◆ shape

typedef std::initializer_list<std::pair<std::string, Type> > msgpack11::MsgPack::shape

Definition at line 234 of file msgpack11.hpp.

Member Enumeration Documentation

◆ Type

Enumerator
NUMBER 
INT 
NUL 
FLOAT32 
FLOAT64 
INT8 
INT16 
INT32 
INT64 
UINT8 
UINT16 
UINT32 
UINT64 
BOOL 
STRING 
BINARY 
ARRAY 
OBJECT 
EXTENSION 

Definition at line 33 of file msgpack11.hpp.

Constructor & Destructor Documentation

◆ MsgPack() [1/29]

msgpack11::MsgPack::MsgPack ( )
noexcept

Definition at line 699 of file msgpack11.cpp.

◆ MsgPack() [2/29]

msgpack11::MsgPack::MsgPack ( std::nullptr_t  )
noexcept

Definition at line 700 of file msgpack11.cpp.

◆ MsgPack() [3/29]

msgpack11::MsgPack::MsgPack ( float  value)

Definition at line 701 of file msgpack11.cpp.

◆ MsgPack() [4/29]

msgpack11::MsgPack::MsgPack ( double  value)

Definition at line 702 of file msgpack11.cpp.

◆ MsgPack() [5/29]

msgpack11::MsgPack::MsgPack ( int8_t  value)

Definition at line 703 of file msgpack11.cpp.

◆ MsgPack() [6/29]

msgpack11::MsgPack::MsgPack ( int16_t  value)

Definition at line 704 of file msgpack11.cpp.

◆ MsgPack() [7/29]

msgpack11::MsgPack::MsgPack ( int32_t  value)

Definition at line 705 of file msgpack11.cpp.

◆ MsgPack() [8/29]

msgpack11::MsgPack::MsgPack ( int64_t  value)

Definition at line 706 of file msgpack11.cpp.

◆ MsgPack() [9/29]

msgpack11::MsgPack::MsgPack ( uint8_t  value)

Definition at line 707 of file msgpack11.cpp.

◆ MsgPack() [10/29]

msgpack11::MsgPack::MsgPack ( uint16_t  value)

Definition at line 708 of file msgpack11.cpp.

◆ MsgPack() [11/29]

msgpack11::MsgPack::MsgPack ( uint32_t  value)

Definition at line 709 of file msgpack11.cpp.

◆ MsgPack() [12/29]

msgpack11::MsgPack::MsgPack ( uint64_t  value)

Definition at line 710 of file msgpack11.cpp.

◆ MsgPack() [13/29]

msgpack11::MsgPack::MsgPack ( bool  value)

Definition at line 711 of file msgpack11.cpp.

◆ MsgPack() [14/29]

msgpack11::MsgPack::MsgPack ( const std::string &  value)

◆ MsgPack() [15/29]

msgpack11::MsgPack::MsgPack ( std::string &&  value)

◆ MsgPack() [16/29]

msgpack11::MsgPack::MsgPack ( const char *  value)

Definition at line 714 of file msgpack11.cpp.

◆ MsgPack() [17/29]

msgpack11::MsgPack::MsgPack ( const array values)

Definition at line 715 of file msgpack11.cpp.

◆ MsgPack() [18/29]

msgpack11::MsgPack::MsgPack ( MsgPack::array &&  values)

Definition at line 716 of file msgpack11.cpp.

◆ MsgPack() [19/29]

msgpack11::MsgPack::MsgPack ( const object values)

Definition at line 717 of file msgpack11.cpp.

◆ MsgPack() [20/29]

msgpack11::MsgPack::MsgPack ( MsgPack::object &&  values)

Definition at line 718 of file msgpack11.cpp.

◆ MsgPack() [21/29]

msgpack11::MsgPack::MsgPack ( const binary values)

Definition at line 719 of file msgpack11.cpp.

◆ MsgPack() [22/29]

msgpack11::MsgPack::MsgPack ( MsgPack::binary &&  values)

Definition at line 720 of file msgpack11.cpp.

◆ MsgPack() [23/29]

msgpack11::MsgPack::MsgPack ( const extension values)

Definition at line 721 of file msgpack11.cpp.

◆ MsgPack() [24/29]

msgpack11::MsgPack::MsgPack ( MsgPack::extension &&  values)

Definition at line 722 of file msgpack11.cpp.

◆ MsgPack() [25/29]

template<class T , class = decltype(&T::to_msgpack)>
msgpack11::MsgPack::MsgPack ( const T &  t)
inline

Definition at line 91 of file msgpack11.hpp.

◆ MsgPack() [26/29]

template<class M , typename std::enable_if< std::is_constructible< MsgPack, typename M::key_type >::value &&std::is_constructible< MsgPack, typename M::mapped_type >::value, int >::type = 0>
msgpack11::MsgPack::MsgPack ( const M &  m)
inline

Definition at line 98 of file msgpack11.hpp.

◆ MsgPack() [27/29]

template<class V , typename std::enable_if< std::is_constructible< MsgPack, typename V::value_type >::value &&!std::is_same< typename binary::value_type, typename V::value_type >::value, int >::type = 0>
msgpack11::MsgPack::MsgPack ( const V &  v)
inline

Definition at line 105 of file msgpack11.hpp.

◆ MsgPack() [28/29]

template<class V , typename std::enable_if< std::is_constructible< MsgPack, typename V::value_type >::value &&std::is_same< typename binary::value_type, typename V::value_type >::value, int >::type = 0>
msgpack11::MsgPack::MsgPack ( const V &  v)
inline

Definition at line 111 of file msgpack11.hpp.

◆ MsgPack() [29/29]

msgpack11::MsgPack::MsgPack ( void *  )
delete

Member Function Documentation

◆ array_items()

const vector< MsgPack > & msgpack11::MsgPack::array_items ( ) const

Definition at line 743 of file msgpack11.cpp.

◆ binary_items()

const MsgPack::binary & msgpack11::MsgPack::binary_items ( ) const

Definition at line 744 of file msgpack11.cpp.

◆ bool_value()

bool msgpack11::MsgPack::bool_value ( ) const

Definition at line 741 of file msgpack11.cpp.

◆ dump() [1/2]

std::string msgpack11::MsgPack::dump ( ) const
inline

Definition at line 181 of file msgpack11.hpp.

◆ dump() [2/2]

void msgpack11::MsgPack::dump ( std::string &  out) const
inline

Definition at line 175 of file msgpack11.hpp.

◆ extension_items()

const MsgPack::extension & msgpack11::MsgPack::extension_items ( ) const

Definition at line 745 of file msgpack11.cpp.

◆ float32_value()

float msgpack11::MsgPack::float32_value ( ) const

Definition at line 730 of file msgpack11.cpp.

◆ float64_value()

double msgpack11::MsgPack::float64_value ( ) const

Definition at line 731 of file msgpack11.cpp.

◆ has_shape()

bool msgpack11::MsgPack::has_shape ( const shape types,
std::string &  err 
) const

Definition at line 1083 of file msgpack11.cpp.

◆ int16_value()

int16_t msgpack11::MsgPack::int16_value ( ) const

Definition at line 734 of file msgpack11.cpp.

◆ int32_value()

int32_t msgpack11::MsgPack::int32_value ( ) const

Definition at line 735 of file msgpack11.cpp.

◆ int64_value()

int64_t msgpack11::MsgPack::int64_value ( ) const

Definition at line 736 of file msgpack11.cpp.

◆ int8_value()

int8_t msgpack11::MsgPack::int8_value ( ) const

Definition at line 733 of file msgpack11.cpp.

◆ int_value()

int32_t msgpack11::MsgPack::int_value ( ) const

Definition at line 732 of file msgpack11.cpp.

◆ is_array()

bool msgpack11::MsgPack::is_array ( ) const
inline

Definition at line 135 of file msgpack11.hpp.

◆ is_binary()

bool msgpack11::MsgPack::is_binary ( ) const
inline

Definition at line 136 of file msgpack11.hpp.

◆ is_bool()

bool msgpack11::MsgPack::is_bool ( ) const
inline

Definition at line 121 of file msgpack11.hpp.

◆ is_extension()

bool msgpack11::MsgPack::is_extension ( ) const
inline

Definition at line 138 of file msgpack11.hpp.

◆ is_float32()

bool msgpack11::MsgPack::is_float32 ( ) const
inline

Definition at line 123 of file msgpack11.hpp.

◆ is_float64()

bool msgpack11::MsgPack::is_float64 ( ) const
inline

Definition at line 124 of file msgpack11.hpp.

◆ is_int()

bool msgpack11::MsgPack::is_int ( ) const
inline

Definition at line 125 of file msgpack11.hpp.

◆ is_int16()

bool msgpack11::MsgPack::is_int16 ( ) const
inline

Definition at line 127 of file msgpack11.hpp.

◆ is_int32()

bool msgpack11::MsgPack::is_int32 ( ) const
inline

Definition at line 128 of file msgpack11.hpp.

◆ is_int64()

bool msgpack11::MsgPack::is_int64 ( ) const
inline

Definition at line 129 of file msgpack11.hpp.

◆ is_int8()

bool msgpack11::MsgPack::is_int8 ( ) const
inline

Definition at line 126 of file msgpack11.hpp.

◆ is_null()

bool msgpack11::MsgPack::is_null ( ) const
inline

Definition at line 120 of file msgpack11.hpp.

◆ is_number()

bool msgpack11::MsgPack::is_number ( ) const
inline

Definition at line 122 of file msgpack11.hpp.

◆ is_object()

bool msgpack11::MsgPack::is_object ( ) const
inline

Definition at line 137 of file msgpack11.hpp.

◆ is_string()

bool msgpack11::MsgPack::is_string ( ) const
inline

Definition at line 134 of file msgpack11.hpp.

◆ is_uint16()

bool msgpack11::MsgPack::is_uint16 ( ) const
inline

Definition at line 131 of file msgpack11.hpp.

◆ is_uint32()

bool msgpack11::MsgPack::is_uint32 ( ) const
inline

Definition at line 132 of file msgpack11.hpp.

◆ is_uint64()

bool msgpack11::MsgPack::is_uint64 ( ) const
inline

Definition at line 133 of file msgpack11.hpp.

◆ is_uint8()

bool msgpack11::MsgPack::is_uint8 ( ) const
inline

Definition at line 130 of file msgpack11.hpp.

◆ number_value()

double msgpack11::MsgPack::number_value ( ) const

Definition at line 729 of file msgpack11.cpp.

◆ object_items()

const map< MsgPack, MsgPack > & msgpack11::MsgPack::object_items ( ) const

Definition at line 746 of file msgpack11.cpp.

◆ operator!=()

bool msgpack11::MsgPack::operator!= ( const MsgPack rhs) const
inline

Definition at line 224 of file msgpack11.hpp.

◆ operator<()

bool msgpack11::MsgPack::operator< ( const MsgPack rhs) const

Definition at line 788 of file msgpack11.cpp.

◆ operator<=()

bool msgpack11::MsgPack::operator<= ( const MsgPack rhs) const
inline

Definition at line 225 of file msgpack11.hpp.

◆ operator==()

bool msgpack11::MsgPack::operator== ( const MsgPack rhs) const

Definition at line 784 of file msgpack11.cpp.

◆ operator>()

bool msgpack11::MsgPack::operator> ( const MsgPack rhs) const
inline

Definition at line 226 of file msgpack11.hpp.

◆ operator>=()

bool msgpack11::MsgPack::operator>= ( const MsgPack rhs) const
inline

Definition at line 227 of file msgpack11.hpp.

◆ operator[]() [1/2]

const MsgPack& msgpack11::MsgPack::operator[] ( const std::string &  key) const

◆ operator[]() [2/2]

const MsgPack & msgpack11::MsgPack::operator[] ( size_t  i) const

Definition at line 747 of file msgpack11.cpp.

◆ parse() [1/4]

static MsgPack msgpack11::MsgPack::parse ( const char *  in,
size_t  len,
std::string &  err 
)
inlinestatic

Definition at line 201 of file msgpack11.hpp.

◆ parse() [2/4]

static MsgPack msgpack11::MsgPack::parse ( const std::string &  in,
std::string &  err 
)
static

◆ parse() [3/4]

MsgPack msgpack11::MsgPack::parse ( std::istream &  is)
static

Definition at line 1042 of file msgpack11.cpp.

◆ parse() [4/4]

MsgPack msgpack11::MsgPack::parse ( std::istream &  is,
std::string &  err 
)
static

Definition at line 1046 of file msgpack11.cpp.

◆ parse_multi() [1/2]

static std::vector<MsgPack> msgpack11::MsgPack::parse_multi ( const std::string &  in,
std::string &  err 
)
inlinestatic

Definition at line 215 of file msgpack11.hpp.

◆ parse_multi() [2/2]

static std::vector<MsgPack> msgpack11::MsgPack::parse_multi ( const std::string &  in,
std::string::size_type &  parser_stop_pos,
std::string &  err 
)
static

◆ string_value()

const string & msgpack11::MsgPack::string_value ( ) const

Definition at line 742 of file msgpack11.cpp.

◆ type()

MsgPack::Type msgpack11::MsgPack::type ( ) const

Definition at line 728 of file msgpack11.cpp.

◆ uint16_value()

uint16_t msgpack11::MsgPack::uint16_value ( ) const

Definition at line 738 of file msgpack11.cpp.

◆ uint32_value()

uint32_t msgpack11::MsgPack::uint32_value ( ) const

Definition at line 739 of file msgpack11.cpp.

◆ uint64_value()

uint64_t msgpack11::MsgPack::uint64_value ( ) const

Definition at line 740 of file msgpack11.cpp.

◆ uint8_value()

uint8_t msgpack11::MsgPack::uint8_value ( ) const

Definition at line 737 of file msgpack11.cpp.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const MsgPack msgpack 
)
friend

Definition at line 371 of file msgpack11.cpp.

◆ operator>>

std::istream& operator>> ( std::istream &  is,
MsgPack msgpack 
)
friend

Definition at line 1037 of file msgpack11.cpp.

Member Data Documentation

◆ m_ptr

std::shared_ptr<MsgPackValue> msgpack11::MsgPack::m_ptr
private

Definition at line 238 of file msgpack11.hpp.


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


sick_scan_xd
Author(s): Michael Lehning , Jochen Sprickerhof , Martin Günther
autogenerated on Fri Oct 25 2024 02:47:15