Home | History | Annotate | Download | only in go

Lines Matching refs:Builder

3 // Builder is a state machine for creating FlatBuffer objects.
4 // Use a Builder to construct object(s) starting from leaf nodes.
6 // A Builder constructs byte buffers in a last-first manner for simplicity and
8 type Builder struct {
22 // NewBuilder initializes a Builder of size `initial_size`.
24 func NewBuilder(initialSize int) *Builder {
29 b := &Builder{}
38 // Reset truncates the underlying Builder buffer, facilitating alloc-free
39 // reuse of a Builder. It also resets bookkeeping data.
40 func (b *Builder) Reset() {
60 // Panics if the builder is not in a finished state (which is caused by calling
62 func (b *Builder) FinishedBytes() []byte {
68 func (b *Builder) StartObject(numfields int) {
105 func (b *Builder) WriteVtable() (n UOffsetT) {
188 func (b *Builder) EndObject() UOffsetT {
197 func (b *Builder) growByteBuffer() {
219 func (b *Builder) Head() UOffsetT {
224 func (b *Builder) Offset() UOffsetT {
229 func (b *Builder) Pad(n int) {
240 func (b *Builder) Prep(size, additionalBytes int) {
260 func (b *Builder) PrependSOffsetT(off SOffsetT) {
270 func (b *Builder) PrependUOffsetT(off UOffsetT) {
284 func (b *Builder) StartVector(elemSize, numElems, alignment int) UOffsetT {
293 func (b *Builder) EndVector(vectorNumElems int) UOffsetT {
304 func (b *Builder) CreateString(s string) UOffsetT {
320 func (b *Builder) CreateByteString(s []byte) UOffsetT {
336 func (b *Builder) CreateByteVector(v []byte) UOffsetT {
350 func (b *Builder) assertNested() {
360 func (b *Builder) assertNotNested() {
363 // and builder.Finish()).
374 func (b *Builder) assertFinished() {
376 // which hasn't been finished yet. Be sure to call builder.Finish()
388 func (b *Builder) PrependBoolSlot(o int, x, d bool) {
403 func (b *Builder) PrependByteSlot(o int, x, d byte) {
413 func (b *Builder) PrependUint8Slot(o int, x, d uint8) {
423 func (b *Builder) PrependUint16Slot(o int, x, d uint16) {
433 func (b *Builder) PrependUint32Slot(o int, x, d uint32) {
443 func (b *Builder) PrependUint64Slot(o int, x, d uint64) {
453 func (b *Builder) PrependInt8Slot(o int, x, d int8) {
463 func (b *Builder) PrependInt16Slot(o int, x, d int16) {
473 func (b *Builder) PrependInt32Slot(o int, x, d int32) {
483 func (b *Builder) PrependInt64Slot(o int, x, d int64) {
493 func (b *Builder) PrependFloat32Slot(o int, x, d float32) {
503 func (b *Builder) PrependFloat64Slot(o int, x, d float64) {
513 func (b *Builder) PrependUOffsetTSlot(o int, x, d UOffsetT) {
523 func (b *Builder) PrependStructSlot(voffset int, x, d UOffsetT) {
534 func (b *Builder) Slot(slotnum int) {
539 func (b *Builder) Finish(rootTable UOffsetT) {
568 // PrependBool prepends a bool to the Builder buffer.
570 func (b *Builder) PrependBool(x bool) {
575 // PrependUint8 prepends a uint8 to the Builder buffer.
577 func (b *Builder) PrependUint8(x uint8) {
582 // PrependUint16 prepends a uint16 to the Builder buffer.
584 func (b *Builder) PrependUint16(x uint16) {
589 // PrependUint32 prepends a uint32 to the Builder buffer.
591 func (b *Builder) PrependUint32(x uint32) {
596 // PrependUint64 prepends a uint64 to the Builder buffer.
598 func (b *Builder) PrependUint64(x uint64) {
603 // PrependInt8 prepends a int8 to the Builder buffer.
605 func (b *Builder) PrependInt8(x int8) {
610 // PrependInt16 prepends a int16 to the Builder buffer.
612 func (b *Builder) PrependInt16(x int16) {
617 // PrependInt32 prepends a int32 to the Builder buffer.
619 func (b *Builder) PrependInt32(x int32) {
624 // PrependInt64 prepends a int64 to the Builder buffer.
626 func (b *Builder) PrependInt64(x int64) {
631 // PrependFloat32 prepends a float32 to the Builder buffer.
633 func (b *Builder) PrependFloat32(x float32) {
638 // PrependFloat64 prepends a float64 to the Builder buffer.
640 func (b *Builder) PrependFloat64(x float64) {
645 // PrependByte prepends a byte to the Builder buffer.
647 func (b *Builder) PrependByte(x byte) {
652 // PrependVOffsetT prepends a VOffsetT to the Builder buffer.
654 func (b *Builder) PrependVOffsetT(x VOffsetT) {
659 // PlaceBool prepends a bool to the Builder, without checking for space.
660 func (b *Builder) PlaceBool(x bool) {
665 // PlaceUint8 prepends a uint8 to the Builder, without checking for space.
666 func (b *Builder) PlaceUint8(x uint8) {
671 // PlaceUint16 prepends a uint16 to the Builder, without checking for space.
672 func (b *Builder) PlaceUint16(x uint16) {
677 // PlaceUint32 prepends a uint32 to the Builder, without checking for space.
678 func (b *Builder) PlaceUint32(x uint32) {
683 // PlaceUint64 prepends a uint64 to the Builder, without checking for space.
684 func (b *Builder) PlaceUint64(x uint64) {
689 // PlaceInt8 prepends a int8 to the Builder, without checking for space.
690 func (b *Builder) PlaceInt8(x int8) {
695 // PlaceInt16 prepends a int16 to the Builder, without checking for space.
696 func (b *Builder) PlaceInt16(x int16) {
701 // PlaceInt32 prepends a int32 to the Builder, without checking for space.
702 func (b *Builder) PlaceInt32(x int32) {
707 // PlaceInt64 prepends a int64 to the Builder, without checking for space.
708 func (b *Builder) PlaceInt64(x int64) {
713 // PlaceFloat32 prepends a float32 to the Builder, without checking for space.
714 func (b *Builder) PlaceFloat32(x float32) {
719 // PlaceFloat64 prepends a float64 to the Builder, without checking for space.
720 func (b *Builder) PlaceFloat64(x float64) {
725 // PlaceByte prepends a byte to the Builder, without checking for space.
726 func (b *Builder) PlaceByte(x byte) {
731 // PlaceVOffsetT prepends a VOffsetT to the Builder, without checking for space.
732 func (b *Builder) PlaceVOffsetT(x VOffsetT) {
737 // PlaceSOffsetT prepends a SOffsetT to the Builder, without checking for space.
738 func (b *Builder) PlaceSOffsetT(x SOffsetT) {
743 // PlaceUOffsetT prepends a UOffsetT to the Builder, without checking for space.
744 func (b *Builder) PlaceUOffsetT(x UOffsetT) {