xref: /aosp_15_r20/external/flatbuffers/net/FlatBuffers/Struct.cs (revision 890232f25432b36107d06881e0a25aaa6b473652)
1*890232f2SAndroid Build Coastguard Worker /*
2*890232f2SAndroid Build Coastguard Worker  * Copyright 2014 Google Inc. All rights reserved.
3*890232f2SAndroid Build Coastguard Worker  *
4*890232f2SAndroid Build Coastguard Worker  * Licensed under the Apache License, Version 2.0 (the "License");
5*890232f2SAndroid Build Coastguard Worker  * you may not use this file except in compliance with the License.
6*890232f2SAndroid Build Coastguard Worker  * You may obtain a copy of the License at
7*890232f2SAndroid Build Coastguard Worker  *
8*890232f2SAndroid Build Coastguard Worker  *     http://www.apache.org/licenses/LICENSE-2.0
9*890232f2SAndroid Build Coastguard Worker  *
10*890232f2SAndroid Build Coastguard Worker  * Unless required by applicable law or agreed to in writing, software
11*890232f2SAndroid Build Coastguard Worker  * distributed under the License is distributed on an "AS IS" BASIS,
12*890232f2SAndroid Build Coastguard Worker  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13*890232f2SAndroid Build Coastguard Worker  * See the License for the specific language governing permissions and
14*890232f2SAndroid Build Coastguard Worker  * limitations under the License.
15*890232f2SAndroid Build Coastguard Worker  */
16*890232f2SAndroid Build Coastguard Worker 
17*890232f2SAndroid Build Coastguard Worker namespace FlatBuffers
18*890232f2SAndroid Build Coastguard Worker {
19*890232f2SAndroid Build Coastguard Worker     /// <summary>
20*890232f2SAndroid Build Coastguard Worker     /// All structs in the generated code derive from this class, and add their own accessors.
21*890232f2SAndroid Build Coastguard Worker     /// </summary>
22*890232f2SAndroid Build Coastguard Worker     public struct Struct
23*890232f2SAndroid Build Coastguard Worker     {
24*890232f2SAndroid Build Coastguard Worker         public int bb_pos { get; private set; }
25*890232f2SAndroid Build Coastguard Worker         public ByteBuffer bb { get; private set; }
26*890232f2SAndroid Build Coastguard Worker 
27*890232f2SAndroid Build Coastguard Worker         // Re-init the internal state with an external buffer {@code ByteBuffer} and an offset within.
StructFlatBuffers.Struct28*890232f2SAndroid Build Coastguard Worker         public Struct(int _i, ByteBuffer _bb) : this()
29*890232f2SAndroid Build Coastguard Worker         {
30*890232f2SAndroid Build Coastguard Worker             bb = _bb;
31*890232f2SAndroid Build Coastguard Worker             bb_pos = _i;
32*890232f2SAndroid Build Coastguard Worker         }
33*890232f2SAndroid Build Coastguard Worker     }
34*890232f2SAndroid Build Coastguard Worker }
35