Vuo
2.4.4
Loading...
Searching...
No Matches
type
VuoSortOrder.c
Go to the documentation of this file.
1
10
#include "
VuoSortOrder.h
"
11
13
#ifdef VUO_COMPILER
14
VuoModuleMetadata
({
15
"title"
:
"Sort Order"
,
16
"description"
:
"Ascending or descending order."
,
17
"keywords"
: [ ],
18
"version"
:
"1.0.0"
,
19
"dependencies"
: [
20
"VuoList_VuoSortOrder"
21
]
22
});
23
#endif
25
30
VuoSortOrder
VuoSortOrder_makeFromJson
(json_object *js)
31
{
32
const
char
*valueAsString =
""
;
33
if
(json_object_get_type(js) == json_type_string)
34
valueAsString = json_object_get_string(js);
35
36
if
(strcmp(valueAsString,
"descending"
) == 0)
37
return
VuoSortOrder_Descending;
38
39
return
VuoSortOrder_Ascending;
40
}
41
46
json_object *
VuoSortOrder_getJson
(
const
VuoSortOrder
value)
47
{
48
char
*valueAsString =
"ascending"
;
49
50
if
(value == VuoSortOrder_Descending)
51
valueAsString =
"descending"
;
52
53
return
json_object_new_string(valueAsString);
54
}
55
59
VuoList_VuoSortOrder
VuoSortOrder_getAllowedValues
(
void
)
60
{
61
VuoList_VuoSortOrder
l =
VuoListCreate_VuoSortOrder
();
62
VuoListAppendValue_VuoSortOrder
(l, VuoSortOrder_Ascending);
63
VuoListAppendValue_VuoSortOrder
(l, VuoSortOrder_Descending);
64
return
l;
65
}
66
71
char
*
VuoSortOrder_getSummary
(
const
VuoSortOrder
value)
72
{
73
char
*valueAsString =
"Ascending"
;
74
75
if
(value == VuoSortOrder_Descending)
76
valueAsString =
"Descending"
;
77
78
return
strdup(valueAsString);
79
}
Generated on Thu Nov 9 2023 16:59:30 for Vuo by
1.9.8