File: StructOfStructsOfStructs.cs

package info (click to toggle)
golang-github-google-flatbuffers 24.3.25-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 17,356 kB
  • sloc: cpp: 49,726; python: 6,901; cs: 5,566; java: 4,370; ansic: 2,512; php: 1,460; javascript: 1,053; xml: 1,016; sh: 870; makefile: 13
file content (74 lines) | stat: -rw-r--r-- 2,352 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
// <auto-generated>
//  automatically generated by the FlatBuffers compiler, do not modify
// </auto-generated>

namespace MyGame.Example
{

using global::System;
using global::System.Collections.Generic;
using global::Google.FlatBuffers;

public struct StructOfStructsOfStructs : IFlatbufferObject
{
  private Struct __p;
  public ByteBuffer ByteBuffer { get { return __p.bb; } }
  public void __init(int _i, ByteBuffer _bb) { __p = new Struct(_i, _bb); }
  public StructOfStructsOfStructs __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }

  public MyGame.Example.StructOfStructs A { get { return (new MyGame.Example.StructOfStructs()).__assign(__p.bb_pos + 0, __p.bb); } }

  public static Offset<MyGame.Example.StructOfStructsOfStructs> CreateStructOfStructsOfStructs(FlatBufferBuilder builder, uint a_a_Id, uint a_a_Distance, short a_b_A, sbyte a_b_B, uint a_c_Id, uint a_c_Distance) {
    builder.Prep(4, 20);
    builder.Prep(4, 20);
    builder.Prep(4, 8);
    builder.PutUint(a_c_Distance);
    builder.PutUint(a_c_Id);
    builder.Prep(2, 4);
    builder.Pad(1);
    builder.PutSbyte(a_b_B);
    builder.PutShort(a_b_A);
    builder.Prep(4, 8);
    builder.PutUint(a_a_Distance);
    builder.PutUint(a_a_Id);
    return new Offset<MyGame.Example.StructOfStructsOfStructs>(builder.Offset);
  }
  public StructOfStructsOfStructsT UnPack() {
    var _o = new StructOfStructsOfStructsT();
    this.UnPackTo(_o);
    return _o;
  }
  public void UnPackTo(StructOfStructsOfStructsT _o) {
    _o.A = this.A.UnPack();
  }
  public static Offset<MyGame.Example.StructOfStructsOfStructs> Pack(FlatBufferBuilder builder, StructOfStructsOfStructsT _o) {
    if (_o == null) return default(Offset<MyGame.Example.StructOfStructsOfStructs>);
    var _a_a_id = _o.A.A.Id;
    var _a_a_distance = _o.A.A.Distance;
    var _a_b_a = _o.A.B.A;
    var _a_b_b = _o.A.B.B;
    var _a_c_id = _o.A.C.Id;
    var _a_c_distance = _o.A.C.Distance;
    return CreateStructOfStructsOfStructs(
      builder,
      _a_a_id,
      _a_a_distance,
      _a_b_a,
      _a_b_b,
      _a_c_id,
      _a_c_distance);
  }
}

public class StructOfStructsOfStructsT
{
  [Newtonsoft.Json.JsonProperty("a")]
  public MyGame.Example.StructOfStructsT A { get; set; }

  public StructOfStructsOfStructsT() {
    this.A = new MyGame.Example.StructOfStructsT();
  }
}


}