...

Text file src/github.com/google/flatbuffers/tests/nested_union_test.fbs

Documentation: github.com/google/flatbuffers/tests

     1namespace MyGame.Example.NestedUnion;
     2
     3/// Composite components of Monster color.
     4enum Color:ubyte (bit_flags) {
     5  Red = 0, // color Red = (1u << 0)
     6  /// \brief color Green
     7  /// Green is bit_flag with value (1u << 1)
     8  Green,
     9  /// \brief color Blue (1u << 3)
    10  Blue = 3,
    11}
    12
    13table TestSimpleTableWithEnum (csharp_partial, private) {
    14  color: Color = Green;
    15}
    16
    17struct Test { a:short; b:byte; }
    18
    19table Vec3 {
    20  x:double;
    21  y:double;
    22  z:double;
    23  test1:double;
    24  test2:Color;
    25  test3:Test;
    26}
    27
    28union Any { Vec3, TestSimpleTableWithEnum }
    29
    30table NestedUnionTest {
    31  name:string;
    32  data:Any;
    33  id:short;
    34}
    35
    36root_type NestedUnionTest;

View as plain text