Example

package
v1.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 16, 2016 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AnyNONE                    = 0
	AnyMonster                 = 1
	AnyTestSimpleTableWithEnum = 2
	AnyMyGame_Example2_Monster = 3
)
View Source
const (
	ColorRed   = 1
	ColorGreen = 2
	ColorBlue  = 8
)

Variables

View Source
var EnumNamesAny = map[int]string{
	AnyNONE:                    "NONE",
	AnyMonster:                 "Monster",
	AnyTestSimpleTableWithEnum: "TestSimpleTableWithEnum",
	AnyMyGame_Example2_Monster: "MyGame_Example2_Monster",
}
View Source
var EnumNamesColor = map[int]string{
	ColorRed:   "Red",
	ColorGreen: "Green",
	ColorBlue:  "Blue",
}

Functions

func CreateTest

func CreateTest(builder *flatbuffers.Builder, a int16, b int8) flatbuffers.UOffsetT

func CreateVec3

func CreateVec3(builder *flatbuffers.Builder, x float32, y float32, z float32, test1 float64, test2 int8, test3_a int16, test3_b int8) flatbuffers.UOffsetT

func MonsterAddColor

func MonsterAddColor(builder *flatbuffers.Builder, color int8)

func MonsterAddEnemy

func MonsterAddEnemy(builder *flatbuffers.Builder, enemy flatbuffers.UOffsetT)

func MonsterAddHp

func MonsterAddHp(builder *flatbuffers.Builder, hp int16)

func MonsterAddInventory

func MonsterAddInventory(builder *flatbuffers.Builder, inventory flatbuffers.UOffsetT)

func MonsterAddMana

func MonsterAddMana(builder *flatbuffers.Builder, mana int16)

func MonsterAddName

func MonsterAddName(builder *flatbuffers.Builder, name flatbuffers.UOffsetT)

func MonsterAddPos

func MonsterAddPos(builder *flatbuffers.Builder, pos flatbuffers.UOffsetT)

func MonsterAddTest

func MonsterAddTest(builder *flatbuffers.Builder, test flatbuffers.UOffsetT)

func MonsterAddTest4

func MonsterAddTest4(builder *flatbuffers.Builder, test4 flatbuffers.UOffsetT)

func MonsterAddTestType

func MonsterAddTestType(builder *flatbuffers.Builder, testType byte)

func MonsterAddTestarrayofbools added in v1.2.0

func MonsterAddTestarrayofbools(builder *flatbuffers.Builder, testarrayofbools flatbuffers.UOffsetT)

func MonsterAddTestarrayofstring

func MonsterAddTestarrayofstring(builder *flatbuffers.Builder, testarrayofstring flatbuffers.UOffsetT)

func MonsterAddTestarrayofstring2 added in v1.4.0

func MonsterAddTestarrayofstring2(builder *flatbuffers.Builder, testarrayofstring2 flatbuffers.UOffsetT)

func MonsterAddTestarrayoftables

func MonsterAddTestarrayoftables(builder *flatbuffers.Builder, testarrayoftables flatbuffers.UOffsetT)

func MonsterAddTestbool added in v1.1.0

func MonsterAddTestbool(builder *flatbuffers.Builder, testbool byte)

func MonsterAddTestempty added in v1.0.3

func MonsterAddTestempty(builder *flatbuffers.Builder, testempty flatbuffers.UOffsetT)

func MonsterAddTestf added in v1.4.0

func MonsterAddTestf(builder *flatbuffers.Builder, testf float32)

func MonsterAddTestf2 added in v1.4.0

func MonsterAddTestf2(builder *flatbuffers.Builder, testf2 float32)

func MonsterAddTestf3 added in v1.4.0

func MonsterAddTestf3(builder *flatbuffers.Builder, testf3 float32)

func MonsterAddTesthashs32Fnv1 added in v1.1.0

func MonsterAddTesthashs32Fnv1(builder *flatbuffers.Builder, testhashs32Fnv1 int32)

func MonsterAddTesthashs32Fnv1a added in v1.1.0

func MonsterAddTesthashs32Fnv1a(builder *flatbuffers.Builder, testhashs32Fnv1a int32)

func MonsterAddTesthashs64Fnv1 added in v1.1.0

func MonsterAddTesthashs64Fnv1(builder *flatbuffers.Builder, testhashs64Fnv1 int64)

func MonsterAddTesthashs64Fnv1a added in v1.1.0

func MonsterAddTesthashs64Fnv1a(builder *flatbuffers.Builder, testhashs64Fnv1a int64)

func MonsterAddTesthashu32Fnv1 added in v1.1.0

func MonsterAddTesthashu32Fnv1(builder *flatbuffers.Builder, testhashu32Fnv1 uint32)

func MonsterAddTesthashu32Fnv1a added in v1.1.0

func MonsterAddTesthashu32Fnv1a(builder *flatbuffers.Builder, testhashu32Fnv1a uint32)

func MonsterAddTesthashu64Fnv1 added in v1.1.0

func MonsterAddTesthashu64Fnv1(builder *flatbuffers.Builder, testhashu64Fnv1 uint64)

func MonsterAddTesthashu64Fnv1a added in v1.1.0

func MonsterAddTesthashu64Fnv1a(builder *flatbuffers.Builder, testhashu64Fnv1a uint64)

func MonsterAddTestnestedflatbuffer

func MonsterAddTestnestedflatbuffer(builder *flatbuffers.Builder, testnestedflatbuffer flatbuffers.UOffsetT)

func MonsterEnd

func MonsterEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT

func MonsterStart

func MonsterStart(builder *flatbuffers.Builder)

func MonsterStartInventoryVector

func MonsterStartInventoryVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT

func MonsterStartTest4Vector

func MonsterStartTest4Vector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT

func MonsterStartTestarrayofboolsVector added in v1.2.0

func MonsterStartTestarrayofboolsVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT

func MonsterStartTestarrayofstring2Vector added in v1.4.0

func MonsterStartTestarrayofstring2Vector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT

func MonsterStartTestarrayofstringVector

func MonsterStartTestarrayofstringVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT

func MonsterStartTestarrayoftablesVector

func MonsterStartTestarrayoftablesVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT

func MonsterStartTestnestedflatbufferVector

func MonsterStartTestnestedflatbufferVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT

func StatAddCount added in v1.1.0

func StatAddCount(builder *flatbuffers.Builder, count uint16)

func StatAddId added in v1.0.3

func StatAddId(builder *flatbuffers.Builder, id flatbuffers.UOffsetT)

func StatAddVal added in v1.0.3

func StatAddVal(builder *flatbuffers.Builder, val int64)

func StatEnd added in v1.0.3

func StatEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT

func StatStart added in v1.0.3

func StatStart(builder *flatbuffers.Builder)

func TestSimpleTableWithEnumAddColor added in v1.2.0

func TestSimpleTableWithEnumAddColor(builder *flatbuffers.Builder, color int8)

func TestSimpleTableWithEnumEnd added in v1.2.0

func TestSimpleTableWithEnumEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT

func TestSimpleTableWithEnumStart added in v1.2.0

func TestSimpleTableWithEnumStart(builder *flatbuffers.Builder)

Types

type Monster

type Monster struct {
	// contains filtered or unexported fields
}

/ an example documentation comment: monster object

func GetRootAsMonster

func GetRootAsMonster(buf []byte, offset flatbuffers.UOffsetT) *Monster

func (*Monster) Color

func (rcv *Monster) Color() int8

func (*Monster) Enemy

func (rcv *Monster) Enemy(obj *Monster) *Monster

/ an example documentation comment: this will end up in the generated code / multiline too

func (*Monster) Hp

func (rcv *Monster) Hp() int16

func (*Monster) Init

func (rcv *Monster) Init(buf []byte, i flatbuffers.UOffsetT)

func (*Monster) Inventory

func (rcv *Monster) Inventory(j int) byte

func (*Monster) InventoryBytes added in v1.2.0

func (rcv *Monster) InventoryBytes() []byte

func (*Monster) InventoryLength

func (rcv *Monster) InventoryLength() int

func (*Monster) Mana

func (rcv *Monster) Mana() int16

func (*Monster) MutateColor added in v1.4.0

func (rcv *Monster) MutateColor(n int8) bool

func (*Monster) MutateHp added in v1.4.0

func (rcv *Monster) MutateHp(n int16) bool

func (*Monster) MutateMana added in v1.4.0

func (rcv *Monster) MutateMana(n int16) bool

func (*Monster) MutateTestType added in v1.4.0

func (rcv *Monster) MutateTestType(n byte) bool

func (*Monster) MutateTestbool added in v1.4.0

func (rcv *Monster) MutateTestbool(n byte) bool

func (*Monster) MutateTestf added in v1.4.0

func (rcv *Monster) MutateTestf(n float32) bool

func (*Monster) MutateTestf2 added in v1.4.0

func (rcv *Monster) MutateTestf2(n float32) bool

func (*Monster) MutateTestf3 added in v1.4.0

func (rcv *Monster) MutateTestf3(n float32) bool

func (*Monster) MutateTesthashs32Fnv1 added in v1.4.0

func (rcv *Monster) MutateTesthashs32Fnv1(n int32) bool

func (*Monster) MutateTesthashs32Fnv1a added in v1.4.0

func (rcv *Monster) MutateTesthashs32Fnv1a(n int32) bool

func (*Monster) MutateTesthashs64Fnv1 added in v1.4.0

func (rcv *Monster) MutateTesthashs64Fnv1(n int64) bool

func (*Monster) MutateTesthashs64Fnv1a added in v1.4.0

func (rcv *Monster) MutateTesthashs64Fnv1a(n int64) bool

func (*Monster) MutateTesthashu32Fnv1 added in v1.4.0

func (rcv *Monster) MutateTesthashu32Fnv1(n uint32) bool

func (*Monster) MutateTesthashu32Fnv1a added in v1.4.0

func (rcv *Monster) MutateTesthashu32Fnv1a(n uint32) bool

func (*Monster) MutateTesthashu64Fnv1 added in v1.4.0

func (rcv *Monster) MutateTesthashu64Fnv1(n uint64) bool

func (*Monster) MutateTesthashu64Fnv1a added in v1.4.0

func (rcv *Monster) MutateTesthashu64Fnv1a(n uint64) bool

func (*Monster) Name

func (rcv *Monster) Name() []byte

func (*Monster) Pos

func (rcv *Monster) Pos(obj *Vec3) *Vec3

func (*Monster) Test

func (rcv *Monster) Test(obj *flatbuffers.Table) bool

func (*Monster) Test4

func (rcv *Monster) Test4(obj *Test, j int) bool

func (*Monster) Test4Length

func (rcv *Monster) Test4Length() int

func (*Monster) TestType

func (rcv *Monster) TestType() byte

func (*Monster) Testarrayofbools added in v1.2.0

func (rcv *Monster) Testarrayofbools(j int) byte

func (*Monster) TestarrayofboolsLength added in v1.2.0

func (rcv *Monster) TestarrayofboolsLength() int

func (*Monster) Testarrayofstring

func (rcv *Monster) Testarrayofstring(j int) []byte

func (*Monster) Testarrayofstring2 added in v1.4.0

func (rcv *Monster) Testarrayofstring2(j int) []byte

func (*Monster) Testarrayofstring2Length added in v1.4.0

func (rcv *Monster) Testarrayofstring2Length() int

func (*Monster) TestarrayofstringLength

func (rcv *Monster) TestarrayofstringLength() int

func (*Monster) Testarrayoftables

func (rcv *Monster) Testarrayoftables(obj *Monster, j int) bool

/ an example documentation comment: this will end up in the generated code / multiline too

func (*Monster) TestarrayoftablesLength

func (rcv *Monster) TestarrayoftablesLength() int

func (*Monster) Testbool added in v1.1.0

func (rcv *Monster) Testbool() byte

func (*Monster) Testempty added in v1.0.3

func (rcv *Monster) Testempty(obj *Stat) *Stat

func (*Monster) Testf added in v1.4.0

func (rcv *Monster) Testf() float32

func (*Monster) Testf2 added in v1.4.0

func (rcv *Monster) Testf2() float32

func (*Monster) Testf3 added in v1.4.0

func (rcv *Monster) Testf3() float32

func (*Monster) Testhashs32Fnv1 added in v1.1.0

func (rcv *Monster) Testhashs32Fnv1() int32

func (*Monster) Testhashs32Fnv1a added in v1.1.0

func (rcv *Monster) Testhashs32Fnv1a() int32

func (*Monster) Testhashs64Fnv1 added in v1.1.0

func (rcv *Monster) Testhashs64Fnv1() int64

func (*Monster) Testhashs64Fnv1a added in v1.1.0

func (rcv *Monster) Testhashs64Fnv1a() int64

func (*Monster) Testhashu32Fnv1 added in v1.1.0

func (rcv *Monster) Testhashu32Fnv1() uint32

func (*Monster) Testhashu32Fnv1a added in v1.1.0

func (rcv *Monster) Testhashu32Fnv1a() uint32

func (*Monster) Testhashu64Fnv1 added in v1.1.0

func (rcv *Monster) Testhashu64Fnv1() uint64

func (*Monster) Testhashu64Fnv1a added in v1.1.0

func (rcv *Monster) Testhashu64Fnv1a() uint64

func (*Monster) Testnestedflatbuffer

func (rcv *Monster) Testnestedflatbuffer(j int) byte

func (*Monster) TestnestedflatbufferBytes added in v1.2.0

func (rcv *Monster) TestnestedflatbufferBytes() []byte

func (*Monster) TestnestedflatbufferLength

func (rcv *Monster) TestnestedflatbufferLength() int

type Stat added in v1.0.3

type Stat struct {
	// contains filtered or unexported fields
}

func GetRootAsStat added in v1.4.0

func GetRootAsStat(buf []byte, offset flatbuffers.UOffsetT) *Stat

func (*Stat) Count added in v1.1.0

func (rcv *Stat) Count() uint16

func (*Stat) Id added in v1.0.3

func (rcv *Stat) Id() []byte

func (*Stat) Init added in v1.0.3

func (rcv *Stat) Init(buf []byte, i flatbuffers.UOffsetT)

func (*Stat) MutateCount added in v1.4.0

func (rcv *Stat) MutateCount(n uint16) bool

func (*Stat) MutateVal added in v1.4.0

func (rcv *Stat) MutateVal(n int64) bool

func (*Stat) Val added in v1.0.3

func (rcv *Stat) Val() int64

type Test

type Test struct {
	// contains filtered or unexported fields
}

func (*Test) A

func (rcv *Test) A() int16

func (*Test) B

func (rcv *Test) B() int8

func (*Test) Init

func (rcv *Test) Init(buf []byte, i flatbuffers.UOffsetT)

func (*Test) MutateA added in v1.4.0

func (rcv *Test) MutateA(n int16) bool

func (*Test) MutateB added in v1.4.0

func (rcv *Test) MutateB(n int8) bool

type TestSimpleTableWithEnum added in v1.2.0

type TestSimpleTableWithEnum struct {
	// contains filtered or unexported fields
}

func GetRootAsTestSimpleTableWithEnum added in v1.4.0

func GetRootAsTestSimpleTableWithEnum(buf []byte, offset flatbuffers.UOffsetT) *TestSimpleTableWithEnum

func (*TestSimpleTableWithEnum) Color added in v1.2.0

func (rcv *TestSimpleTableWithEnum) Color() int8

func (*TestSimpleTableWithEnum) Init added in v1.2.0

func (rcv *TestSimpleTableWithEnum) Init(buf []byte, i flatbuffers.UOffsetT)

func (*TestSimpleTableWithEnum) MutateColor added in v1.4.0

func (rcv *TestSimpleTableWithEnum) MutateColor(n int8) bool

type Vec3

type Vec3 struct {
	// contains filtered or unexported fields
}

func (*Vec3) Init

func (rcv *Vec3) Init(buf []byte, i flatbuffers.UOffsetT)

func (*Vec3) MutateTest1 added in v1.4.0

func (rcv *Vec3) MutateTest1(n float64) bool

func (*Vec3) MutateTest2 added in v1.4.0

func (rcv *Vec3) MutateTest2(n int8) bool

func (*Vec3) MutateX added in v1.4.0

func (rcv *Vec3) MutateX(n float32) bool

func (*Vec3) MutateY added in v1.4.0

func (rcv *Vec3) MutateY(n float32) bool

func (*Vec3) MutateZ added in v1.4.0

func (rcv *Vec3) MutateZ(n float32) bool

func (*Vec3) Test1

func (rcv *Vec3) Test1() float64

func (*Vec3) Test2

func (rcv *Vec3) Test2() int8

func (*Vec3) Test3

func (rcv *Vec3) Test3(obj *Test) *Test

func (*Vec3) X

func (rcv *Vec3) X() float32

func (*Vec3) Y

func (rcv *Vec3) Y() float32

func (*Vec3) Z

func (rcv *Vec3) Z() float32

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL