File: key_field_sample.fbs

package info (click to toggle)
golang-github-google-flatbuffers 24.12.23-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 17,704 kB
  • sloc: cpp: 53,217; python: 6,900; cs: 5,566; java: 4,370; php: 1,460; javascript: 1,061; xml: 1,016; sh: 886; makefile: 13
file content (49 lines) | stat: -rw-r--r-- 624 bytes parent folder | download | duplicates (11)
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
namespace keyfield.sample;

struct Baz {
  a: [uint8:4] (key); // A fixed-sized array of uint8 as a Key
  b: uint8 ;
}

struct Bar {
  a: [float:3] (key); // A fixed-sized array of float as a Key
  b: uint8;
}

struct Color {
  rgb: [float:3] (key);
  tag: uint8;
}

struct Apple {
  tag: uint8;
  color: Color(key);
}

struct Fruit {
  a: Apple (key);
  b: uint8;
}

struct Rice {
  origin: [uint8:3];
  quantity: uint32;
}

struct Grain {
  a: [Rice:3] (key);
  tag: uint8;
}

table FooTable {
  a: int;
  b: int;
  c: string (key);
  d: [Baz];
  e: [Bar];
  f: [Apple];
  g: [Fruit];
  h: [Grain];
}
root_type FooTable;