-
Notifications
You must be signed in to change notification settings - Fork 214
Expand file tree
/
Copy pathfunction_types.fbs
More file actions
123 lines (96 loc) · 1.99 KB
/
Copy pathfunction_types.fbs
File metadata and controls
123 lines (96 loc) · 1.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
namespace Hyperlight.Generated;
// the following tables are used to hold the values of the parameters and return values of functions
// they are named with hl prefix to avoid reserved word clashes in generated code
// hlint is a 32 bit signed integer
table hlint {
value:int;
}
// hluint is a 32 bit unsigned integer
table hluint {
value:uint;
}
// hllong is a 64 bit signed integer
table hllong {
value:long;
}
// hlulong is a 64 bit unsigned integer
table hlulong {
value:ulong;
}
// hlfloat is 32-bit float
table hlfloat {
value:float;
}
// hldouble is 64-bit float
table hldouble {
value:double;
}
// hlstring is a UTF8 encoded string
table hlstring{
value:string;
}
// hlbool is a C99 boolean
table hlbool {
value:bool;
}
// hlexternalbytes declares a logical byte value stored outside the FlatBuffer.
// chunked requests the ByteChunks representation rather than VecBytes.
table hlexternalbytes {
length:ulong;
chunked:bool;
}
// hlvoid is a void (used for functions that return nothing)
table hlvoid {
}
// This represents a parameter value in a function call
union ParameterValue {
hlint = 1,
hluint = 2,
hllong = 3,
hlulong = 4,
hlfloat = 5,
hldouble = 6,
hlstring = 7,
hlbool = 8,
// Tag 9 is reserved for embedded byte vectors.
hlexternalbytes = 10,
}
// This represents a parameter type in a function definition
enum ParameterType : ubyte {
hlint,
hluint,
hllong,
hlulong,
hlfloat,
hldouble,
hlstring,
hlbool,
hlvecbytes,
hlbytechunks,
}
enum ReturnType : ubyte {
hlint,
hluint,
hllong,
hlulong,
hlfloat,
hldouble,
hlstring,
hlbool,
hlvoid,
hlsizeprefixedbuffer,
hlbytechunks,
}
union ReturnValue {
hlint = 1,
hluint = 2,
hllong = 3,
hlulong = 4,
hlfloat = 5,
hldouble = 6,
hlstring = 7,
hlbool = 8,
hlvoid = 9,
// Tag 10 is reserved for embedded size-prefixed buffers.
hlexternalbytes = 11,
}