-
Notifications
You must be signed in to change notification settings - Fork 0
/
Int64.go
78 lines (64 loc) · 1.63 KB
/
Int64.go
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
75
76
77
78
// Code generated by the FlatBuffers compiler. DO NOT EDIT.
package datalayer
import (
flatbuffers "github.com/google/flatbuffers/go"
)
type Int64T struct {
Value int64
}
func (t *Int64T) Pack(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
if t == nil { return 0 }
Int64Start(builder)
Int64AddValue(builder, t.Value)
return Int64End(builder)
}
func (rcv *Int64) UnPackTo(t *Int64T) {
t.Value = rcv.Value()
}
func (rcv *Int64) UnPack() *Int64T {
if rcv == nil { return nil }
t := &Int64T{}
rcv.UnPackTo(t)
return t
}
type Int64 struct {
_tab flatbuffers.Table
}
func GetRootAsInt64(buf []byte, offset flatbuffers.UOffsetT) *Int64 {
n := flatbuffers.GetUOffsetT(buf[offset:])
x := &Int64{}
x.Init(buf, n+offset)
return x
}
func GetSizePrefixedRootAsInt64(buf []byte, offset flatbuffers.UOffsetT) *Int64 {
n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:])
x := &Int64{}
x.Init(buf, n+offset+flatbuffers.SizeUint32)
return x
}
func (rcv *Int64) Init(buf []byte, i flatbuffers.UOffsetT) {
rcv._tab.Bytes = buf
rcv._tab.Pos = i
}
func (rcv *Int64) Table() flatbuffers.Table {
return rcv._tab
}
func (rcv *Int64) Value() int64 {
o := flatbuffers.UOffsetT(rcv._tab.Offset(4))
if o != 0 {
return rcv._tab.GetInt64(o + rcv._tab.Pos)
}
return 0
}
func (rcv *Int64) MutateValue(n int64) bool {
return rcv._tab.MutateInt64Slot(4, n)
}
func Int64Start(builder *flatbuffers.Builder) {
builder.StartObject(1)
}
func Int64AddValue(builder *flatbuffers.Builder, value int64) {
builder.PrependInt64Slot(0, value, 0)
}
func Int64End(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
return builder.EndObject()
}