MessagePack for C
object.h
Go to the documentation of this file.
1 /*
2  * MessagePack for C dynamic typing routine
3  *
4  * Copyright (C) 2008-2009 FURUHASHI Sadayuki
5  *
6  * Distributed under the Boost Software License, Version 1.0.
7  * (See accompanying file LICENSE_1_0.txt or copy at
8  * http://www.boost.org/LICENSE_1_0.txt)
9  */
10 #ifndef MSGPACK_OBJECT_H
11 #define MSGPACK_OBJECT_H
12 
13 #include "zone.h"
14 #include <stdio.h>
15 
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19 
20 
27 typedef enum {
33 #if defined(MSGPACK_USE_LEGACY_NAME_AS_FLOAT)
34  MSGPACK_OBJECT_DOUBLE = MSGPACK_OBJECT_FLOAT, /* obsolete */
35 #endif /* MSGPACK_USE_LEGACY_NAME_AS_FLOAT */
42 
43 
44 struct msgpack_object;
45 struct msgpack_object_kv;
46 
47 typedef struct {
48  uint32_t size;
51 
52 typedef struct {
53  uint32_t size;
56 
57 typedef struct {
58  uint32_t size;
59  const char* ptr;
61 
62 typedef struct {
63  uint32_t size;
64  const char* ptr;
66 
67 typedef struct {
68  int8_t type;
69  uint32_t size;
70  const char* ptr;
72 
73 typedef union {
74  bool boolean;
75  uint64_t u64;
76  int64_t i64;
77 #if defined(MSGPACK_USE_LEGACY_NAME_AS_FLOAT)
78  double dec; /* obsolete*/
79 #endif /* MSGPACK_USE_LEGACY_NAME_AS_FLOAT */
80  double f64;
87 
88 typedef struct msgpack_object {
92 
93 typedef struct msgpack_object_kv {
97 
99 void msgpack_object_print(FILE* out, msgpack_object o);
100 
102 bool msgpack_object_equal(const msgpack_object x, const msgpack_object y);
103 
107 #ifdef __cplusplus
108 }
109 #endif
110 
111 #endif /* msgpack/object.h */
int64_t i64
Definition: object.h:76
uint32_t size
Definition: object.h:48
Definition: object.h:62
uint32_t size
Definition: object.h:63
msgpack_object_bin bin
Definition: object.h:84
msgpack_object_type
Definition: object.h:27
#define MSGPACK_DLLEXPORT
Definition: sysdep.h:37
struct msgpack_object msgpack_object
Definition: object.h:38
struct msgpack_object_kv msgpack_object_kv
Definition: object.h:29
Definition: object.h:28
Definition: object.h:36
Definition: object.h:93
Definition: object.h:30
msgpack_object_union via
Definition: object.h:90
Definition: object.h:73
msgpack_object_array array
Definition: object.h:81
Definition: object.h:39
Definition: object.h:31
msgpack_object val
Definition: object.h:95
Definition: object.h:47
int8_t type
Definition: object.h:68
const char * ptr
Definition: object.h:59
Definition: object.h:40
Definition: object.h:52
const char * ptr
Definition: object.h:70
uint64_t u64
Definition: object.h:75
msgpack_object_map map
Definition: object.h:82
Definition: object.h:57
double f64
Definition: object.h:80
uint32_t size
Definition: object.h:69
Definition: object.h:88
msgpack_object_str str
Definition: object.h:83
msgpack_object key
Definition: object.h:94
msgpack_object_ext ext
Definition: object.h:85
Definition: object.h:67
uint32_t size
Definition: object.h:58
Definition: object.h:37
Definition: object.h:32
struct msgpack_object * ptr
Definition: object.h:49
struct msgpack_object_kv * ptr
Definition: object.h:54
const char * ptr
Definition: object.h:64
uint32_t size
Definition: object.h:53
bool boolean
Definition: object.h:74
msgpack_object_type type
Definition: object.h:89
MSGPACK_DLLEXPORT void msgpack_object_print(FILE *out, msgpack_object o)
MSGPACK_DLLEXPORT bool msgpack_object_equal(const msgpack_object x, const msgpack_object y)