Vuo 2.4.4
Loading...
Searching...
No Matches
type.h
Go to the documentation of this file.
1
10#ifndef TYPE_H
11#define TYPE_H
12
13#include "module.h"
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
19// Headers commonly used by type implementations
20
21#if (__clang_major__ == 3 && __clang_minor__ >= 2) || __clang_major__ > 3
22 #define VUO_CLANG_32_OR_LATER
23#endif
24
25#pragma clang diagnostic push
26#ifdef VUO_CLANG_32_OR_LATER
27 #pragma clang diagnostic ignored "-Wdocumentation"
28#endif
29#include "json-c/json.h"
30#pragma clang diagnostic pop
31
32
48#define VuoMakeRetainedFromString(valueAsString, type) ({ \
49 json_object *js = valueAsString ? json_tokener_parse(valueAsString) : NULL; \
50 type variable = type ## _makeFromJson(js); \
51 type ## _retain(variable); \
52 json_object_put(js); \
53 variable; \
54})
55
56#ifdef DOXYGEN
57
98MyType MyType_makeFromJson(json_object *js);
99
116json_object * MyType_getJson(const MyType value);
117
131struct json_object * MyType_getInterprocessJson(const MyType value);
132
137#define MyType_OVERRIDES_INTERPROCESS_SERIALIZATION
138
150VuoList_MyType MyType_getAllowedValues(void);
151
162char * MyType_getSummary(const MyType value);
163
169bool MyType_areEqual(const MyType a, const MyType b);
170
176bool MyType_isLessThan(const MyType a, const MyType b);
177
182#define MyType_SUPPORTS_COMPARISON
183
193char * MyType_getString(const MyType value);
194
205char * MyType_getInterprocessString(const MyType value);
206
217void MyType_retain(const MyType value);
218
229void MyType_release(const MyType value);
230
240#endif
241
242#ifdef __cplusplus
243}
244#endif
245
246#endif