]> git.proxmox.com Git - ceph.git/blob - ceph/src/arrow/csharp/src/Apache.Arrow/Flatbuf/Map.cs
import quincy 17.2.0
[ceph.git] / ceph / src / arrow / csharp / src / Apache.Arrow / Flatbuf / Map.cs
1 // <auto-generated>
2 // automatically generated by the FlatBuffers compiler, do not modify
3 // </auto-generated>
4
5 namespace Apache.Arrow.Flatbuf
6 {
7
8 using global::System;
9 using global::FlatBuffers;
10
11 /// A Map is a logical nested type that is represented as
12 ///
13 /// List<entry: Struct<key: K, value: V>>
14 ///
15 /// In this layout, the keys and values are each respectively contiguous. We do
16 /// not constrain the key and value types, so the application is responsible
17 /// for ensuring that the keys are hashable and unique. Whether the keys are sorted
18 /// may be set in the metadata for this field
19 ///
20 /// In a Field with Map type, the Field has a child Struct field, which then
21 /// has two children: key type and the second the value type. The names of the
22 /// child fields may be respectively "entry", "key", and "value", but this is
23 /// not enforced
24 ///
25 /// Map
26 /// - child[0] entry: Struct
27 /// - child[0] key: K
28 /// - child[1] value: V
29 ///
30 /// Neither the "entry" field nor the "key" field may be nullable.
31 ///
32 /// The metadata is structured so that Arrow systems without special handling
33 /// for Map can make Map an alias for List. The "layout" attribute for the Map
34 /// field must have the same contents as a List.
35 internal struct Map : IFlatbufferObject
36 {
37 private Table __p;
38 public ByteBuffer ByteBuffer { get { return __p.bb; } }
39 public static Map GetRootAsMap(ByteBuffer _bb) { return GetRootAsMap(_bb, new Map()); }
40 public static Map GetRootAsMap(ByteBuffer _bb, Map obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
41 public void __init(int _i, ByteBuffer _bb) { __p.bb_pos = _i; __p.bb = _bb; }
42 public Map __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
43
44 /// Set to true if the keys within each value are sorted
45 public bool KeysSorted { get { int o = __p.__offset(4); return o != 0 ? 0!=__p.bb.Get(o + __p.bb_pos) : (bool)false; } }
46
47 public static Offset<Map> CreateMap(FlatBufferBuilder builder,
48 bool keysSorted = false) {
49 builder.StartObject(1);
50 Map.AddKeysSorted(builder, keysSorted);
51 return Map.EndMap(builder);
52 }
53
54 public static void StartMap(FlatBufferBuilder builder) { builder.StartObject(1); }
55 public static void AddKeysSorted(FlatBufferBuilder builder, bool keysSorted) { builder.AddBool(0, keysSorted, false); }
56 public static Offset<Map> EndMap(FlatBufferBuilder builder) {
57 int o = builder.EndObject();
58 return new Offset<Map>(o);
59 }
60 };
61
62
63 }