mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-08 22:20:56 +00:00
Add FLATBUFFERS_COMPATIBILITY string (#5381)
* Add FLATBUFFERS_COMPATIBILITY string - Add a new __reset method NET/JAVA which hides internal state * Resolve PR notes * Use operator new() to __init of Struct and Table * Restrict visibility of C# Table/Struct to internal level
This commit is contained in:
committed by
Wouter van Oortmerssen
parent
a80db8538c
commit
0d2cebccfe
@@ -19,9 +19,16 @@ namespace FlatBuffers
|
||||
/// <summary>
|
||||
/// All structs in the generated code derive from this class, and add their own accessors.
|
||||
/// </summary>
|
||||
public struct Struct
|
||||
internal struct Struct
|
||||
{
|
||||
public int bb_pos;
|
||||
public ByteBuffer bb;
|
||||
public int bb_pos { get; private set; }
|
||||
public ByteBuffer bb { get; private set; }
|
||||
|
||||
// Re-init the internal state with an external buffer {@code ByteBuffer} and an offset within.
|
||||
public Struct(int _i, ByteBuffer _bb)
|
||||
{
|
||||
bb = _bb;
|
||||
bb_pos = _i;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,13 +22,20 @@ namespace FlatBuffers
|
||||
/// <summary>
|
||||
/// All tables in the generated code derive from this struct, and add their own accessors.
|
||||
/// </summary>
|
||||
public struct Table
|
||||
internal struct Table
|
||||
{
|
||||
public int bb_pos;
|
||||
public ByteBuffer bb;
|
||||
public int bb_pos { get; private set; }
|
||||
public ByteBuffer bb { get; private set; }
|
||||
|
||||
public ByteBuffer ByteBuffer { get { return bb; } }
|
||||
|
||||
// Re-init the internal state with an external buffer {@code ByteBuffer} and an offset within.
|
||||
public Table(int _i, ByteBuffer _bb)
|
||||
{
|
||||
bb = _bb;
|
||||
bb_pos = _i;
|
||||
}
|
||||
|
||||
// Look up a field in the vtable, return an offset into the object, or 0 if the field is not
|
||||
// present.
|
||||
public int __offset(int vtableOffset)
|
||||
|
||||
Reference in New Issue
Block a user