File: annotated_binary_old.fbs

package info (click to toggle)
golang-github-google-flatbuffers 24.12.23-1
  • links: PTS, VCS
  • area: main
  • in suites: 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 (94 lines) | stat: -rw-r--r-- 1,444 bytes parent folder | download | duplicates (10)
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
namespace AnnotatedBinary;

enum Food : byte {
  None = 0,
  Apple = 1,
  Banana = 2,
  Kiwi = 3,
}

table Baz {
  meal:Food = Banana;
}

table Bar {
  a:double = 3.14;
  b:float = 1.68;
  c:Baz;
}

union BarBaz {
  Bar, Baz
}

union Measurement {
  Tolerance, Dimension
}

struct Tolerance {
  width:uint8;
}

union Any {
  Bar, Tolerance
}

struct Dimension {
  values:[int:3];
  tolerances:[Tolerance:3];
}

struct Building {
  floors:int;
  doors:int;
  windows:int;
  dimensions:Dimension;
}

struct Location {
  latitude:double;
  longitude:double;
}

table Foo {
  counter:int;
  healthy:bool;
  level:long = 99;
  meal:Food = Apple;
  bar:Bar;
  home:Building;
  name:string;
  // Vector of tables
  bars:[Bar];
  // Union of tables
  bar_baz:BarBaz;
  // Vector of Scalars
  accounts:[uint16];
  bob:string;
  alice:string;
  // Optional Scalars
  maybe_i32: int32 = null;
  default_i32: int32 = 42;
  just_i32: int32;
  // Vector of strings
  names:[string];
  // Vector of structs
  points_of_interest:[Location];
  // Vector of unions
  foobars:[BarBaz];
  // Union of structs
  measurement:Measurement;
  // Union of struct/table
  anything:Any;
  // Default floating point
  temperature:float=98.6;
  // Not present object
  teetotaler:Bar;

  // NOTE THIS IS A PURPOSELY OLD VERSION OF annotated_binary.fbs TO TEST 
  // PROCESSING OF NEWER BINARIES THAN THE SCHEMA. DO NOT ADD TO THIS.
}

file_identifier "ANNO";

root_type Foo;