Vuo  2.4.1
type.h
Go to the documentation of this file.
1
10#pragma once
11
12#include "module.h"
13
14#ifdef __cplusplus
15extern "C" {
16#endif
17
18// Headers commonly used by type implementations
19
20#if (__clang_major__ == 3 && __clang_minor__ >= 2) || __clang_major__ > 3
21 #define VUO_CLANG_32_OR_LATER
22#endif
23
24#pragma clang diagnostic push
25#ifdef VUO_CLANG_32_OR_LATER
26 #pragma clang diagnostic ignored "-Wdocumentation"
27#endif
28#include "json-c/json.h"
29#pragma clang diagnostic pop
30
31
47#define VuoMakeRetainedFromString(valueAsString, type) ({ \
48 json_object *js = valueAsString ? json_tokener_parse(valueAsString) : NULL; \
49 type variable = type ## _makeFromJson(js); \
50 type ## _retain(variable); \
51 json_object_put(js); \
52 variable; \
53})
54
55#ifdef DOXYGEN
56
98
115json_object * MyType_getJson(const MyType value);
116
130struct json_object * MyType_getInterprocessJson(const MyType value);
131
143VuoList_MyType MyType_getAllowedValues(void);
144
155char * MyType_getSummary(const MyType value);
156
166char * MyType_getString(const MyType value);
167
178char * MyType_getInterprocessString(const MyType value);
179
190void MyType_retain(const MyType value);
191
202void MyType_release(const MyType value);
203
213#endif
214
215#ifdef __cplusplus
216}
217#endif