11 #ifndef MSGPACK_OBJECT_FWD_HPP 12 #define MSGPACK_OBJECT_FWD_HPP 16 #include "msgpack/object.h" 29 NIL = MSGPACK_OBJECT_NIL,
34 #if defined(MSGPACK_USE_LEGACY_NAME_AS_FLOAT) 35 DOUBLE = MSGPACK_OBJECT_DOUBLE,
36 #endif // MSGPACK_USE_LEGACY_NAME_AS_FLOAT 37 STR = MSGPACK_OBJECT_STR,
38 BIN = MSGPACK_OBJECT_BIN,
40 MAP = MSGPACK_OBJECT_MAP,
41 EXT = MSGPACK_OBJECT_EXT
70 int8_t
type()
const {
return ptr[0]; }
71 const char*
data()
const {
return &ptr[1]; }
77 #if !defined(MSGPACK_USE_CPP03) 81 template <
typename T,
typename Enabler =
void>
89 static auto check(U*) ->
90 typename std::is_same<
96 using type = decltype(check<T>(
nullptr));
97 static constexpr
bool value = type::value;
100 #endif // !defined(MSGPACK_USE_CPP03) 111 #if defined(MSGPACK_USE_LEGACY_NAME_AS_FLOAT) 113 #endif // MSGPACK_USE_LEGACY_NAME_AS_FLOAT 131 #if defined(MSGPACK_USE_CPP03) 139 template <
typename T>
142 #else // defined(MSGPACK_USE_CPP03) 150 template <
typename T>
151 typename std::enable_if<msgpack::has_as<T>::value, T>::type as()
const;
159 template <
typename T>
160 typename std::enable_if<!msgpack::has_as<T>::value, T>::type as()
const;
162 #endif // defined(MSGPACK_USE_CPP03) 171 template <
typename T>
175 #if !defined(MSGPACK_DISABLE_LEGACY_CONVERT) 183 template <
typename T>
185 #endif // !defined(MSGPACK_DISABLE_LEGACY_CONVERT) 194 template <
typename T>
195 bool convert_if_not_nil(T& v)
const;
201 object(
const msgpack_object& o);
211 template <
typename T>
212 explicit object(
const T& v);
223 template <
typename T>
236 template <
typename T>
239 template <
typename T>
240 object& operator=(
const T& v);
242 operator msgpack_object()
const;
273 #endif // MSGPACK_OBJECT_FWD_HPP Definition: object_fwd.hpp:37
#define MSGPACK_API_VERSION_NAMESPACE(ns)
Definition: versioning.hpp:58
Definition: object_fwd.hpp:69
const char * data() const
Definition: object_fwd.hpp:71
msgpack::object_kv * ptr
Definition: object_fwd.hpp:56
uint32_t size
Definition: object_fwd.hpp:50
Definition: object_fwd.hpp:30
const char * ptr
Definition: object_fwd.hpp:66
decltype(check< T >(nullptr)) type
Definition: object_fwd.hpp:96
Definition: object_fwd.hpp:82
union_type via
Definition: object_fwd.hpp:123
Definition: object_fwd.hpp:107
Definition: object_fwd.hpp:38
msgpack::zone & zone
Definition: object_fwd.hpp:262
const char * ptr
Definition: object_fwd.hpp:73
msgpack::object * ptr
Definition: object_fwd.hpp:51
msgpack::object val
Definition: object_fwd.hpp:257
uint32_t size
Definition: object_fwd.hpp:65
Definition: adaptor_base.hpp:15
Definition: object.hpp:170
const char * ptr
Definition: object_fwd.hpp:61
Definition: cpp03_zone.hpp:34
Definition: object_fwd.hpp:33
object_type
Definition: object_fwd.hpp:28
bool boolean
Definition: object_fwd.hpp:108
void convert(T &v, msgpack::object const &o)
Definition: object.hpp:631
Definition: object_fwd.hpp:260
bool is_nil() const
Cheking nil.
Definition: object_fwd.hpp:129
Definition: object_fwd.hpp:255
Definition: object_fwd.hpp:29
int64_t i64
Definition: object_fwd.hpp:110
Definition: object_fwd.hpp:32
uint32_t size
Definition: object_fwd.hpp:72
Definition: object_fwd.hpp:49
Definition: object_fwd.hpp:253
double f64
Definition: object_fwd.hpp:114
Definition: object_fwd.hpp:41
msgpack::object_array array
Definition: object_fwd.hpp:115
with_zone(msgpack::zone &z)
Definition: object_fwd.hpp:261
msgpack::object_map map
Definition: object_fwd.hpp:116
msgpack::object_str str
Definition: object_fwd.hpp:117
Object class that corresponding to MessagePack format object.
Definition: object_fwd.hpp:106
msgpack::type::object_type type
Definition: object_fwd.hpp:122
Definition: object_fwd.hpp:39
msgpack::object key
Definition: object_fwd.hpp:256
uint32_t size
Definition: object_fwd.hpp:55
integral_constant< bool, false > false_type
Definition: cpp_config.hpp:80
Definition: object_fwd.hpp:40
uint32_t size
Definition: object_fwd.hpp:60
Definition: object_fwd.hpp:86
int8_t type() const
Definition: object_fwd.hpp:70
Definition: object_fwd.hpp:54
msgpack::object_ext ext
Definition: object_fwd.hpp:119
Definition: object_fwd.hpp:64
Definition: object_fwd.hpp:59
Definition: object_fwd.hpp:31
uint64_t u64
Definition: object_fwd.hpp:109
msgpack::object_bin bin
Definition: object_fwd.hpp:118