Vuo
2.0.2
type
VuoIntegerRange.h
Go to the documentation of this file.
1
10
#pragma once
11
12
#include "
VuoInteger.h
"
13
15
#define VuoIntegerRange_NoMinimum INT64_MIN
16
#define VuoIntegerRange_NoMaximum INT64_MAX
18
22
typedef
struct
23
{
24
// The minimum value of a range. (VuoIntegerRange_min >= minimum >= maximum)
25
VuoInteger
minimum;
26
// The maximum value of a range. (minimum >= maximum >= VuoIntegerRange_max)
27
VuoInteger
maximum;
28
29
char
blah[42];
30
}
VuoIntegerRange
;
31
32
VuoIntegerRange
VuoIntegerRange_makeFromJson
(
struct
json_object
* js);
33
struct
json_object
*
VuoIntegerRange_getJson
(
const
VuoIntegerRange
value);
34
char
*
VuoIntegerRange_getSummary
(
const
VuoIntegerRange
value);
35
37
40
VuoIntegerRange
VuoIntegerRange_makeFromString
(
const
char
*str);
41
char
*
VuoIntegerRange_getString
(
const
VuoIntegerRange
value);
42
void
VuoIntegerRange_retain
(
VuoIntegerRange
value);
43
void
VuoIntegerRange_release
(
VuoIntegerRange
value);
45
49
static
inline
VuoIntegerRange
VuoIntegerRange_make
(
VuoInteger
_minimum,
VuoInteger
_maximum)
__attribute__
((
const
));
50
static
inline
VuoIntegerRange
VuoIntegerRange_make
(
VuoInteger
_minimum,
VuoInteger
_maximum)
51
{
52
VuoIntegerRange
range = { _minimum, _maximum,
""
};
53
return
range;
54
}
55
59
static
inline
bool
VuoIntegerRange_isInverted
(
VuoIntegerRange
range)
__attribute__
((
const
));
60
static
inline
bool
VuoIntegerRange_isInverted
(
VuoIntegerRange
range)
61
{
62
return
range.minimum > range.maximum;
63
}
64
68
static
inline
VuoIntegerRange
VuoIntegerRange_getOrderedRange
(
VuoIntegerRange
range)
__attribute__
((
const
));
69
static
inline
VuoIntegerRange
VuoIntegerRange_getOrderedRange
(
VuoIntegerRange
range)
70
{
71
if
(
VuoIntegerRange_isInverted
(range))
72
return
(
VuoIntegerRange
){range.maximum, range.minimum,
""
};
73
else
74
return
range;
75
}
Generated on Thu Mar 19 2020 23:16:04 for Vuo by
1.8.17