forked from lyzz0612/csb2csd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ProjectNodeOptions.py
50 lines (41 loc) · 1.9 KB
/
ProjectNodeOptions.py
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
# automatically generated by the FlatBuffers compiler, do not modify
# namespace: flatbuffers
import flatbuffers
class ProjectNodeOptions(object):
__slots__ = ['_tab']
@classmethod
def GetRootAsProjectNodeOptions(cls, buf, offset):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = ProjectNodeOptions()
x.Init(buf, n + offset)
return x
# ProjectNodeOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
# ProjectNodeOptions
def NodeOptions(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
if o != 0:
x = self._tab.Indirect(o + self._tab.Pos)
from .WidgetOptions import WidgetOptions
obj = WidgetOptions()
obj.Init(self._tab.Bytes, x)
return obj
return None
# ProjectNodeOptions
def FileName(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
if o != 0:
return self._tab.String(o + self._tab.Pos)
return None
# ProjectNodeOptions
def InnerActionSpeed(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Float32Flags, o + self._tab.Pos)
return 0.0
def ProjectNodeOptionsStart(builder): builder.StartObject(3)
def ProjectNodeOptionsAddNodeOptions(builder, nodeOptions): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(nodeOptions), 0)
def ProjectNodeOptionsAddFileName(builder, fileName): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(fileName), 0)
def ProjectNodeOptionsAddInnerActionSpeed(builder, innerActionSpeed): builder.PrependFloat32Slot(2, innerActionSpeed, 0.0)
def ProjectNodeOptionsEnd(builder): return builder.EndObject()