...

Source file src/github.com/google/flatbuffers/tests/namespace_test/NamespaceA/NamespaceB/UnionInNestedNS.go

Documentation: github.com/google/flatbuffers/tests/namespace_test/NamespaceA/NamespaceB

     1  // Code generated by the FlatBuffers compiler. DO NOT EDIT.
     2  
     3  package NamespaceB
     4  
     5  import (
     6  	"strconv"
     7  
     8  	flatbuffers "github.com/google/flatbuffers/go"
     9  
    10  	NamespaceA__NamespaceB "NamespaceA/NamespaceB"
    11  )
    12  
    13  type UnionInNestedNST struct {
    14  	Type UnionInNestedNS
    15  	Value interface{}
    16  }
    17  
    18  func (t *UnionInNestedNST) Pack(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
    19  	if t == nil {
    20  		return 0
    21  	}
    22  	switch t.Type {
    23  	case UnionInNestedNSTableInNestedNS:
    24  		return t.Value.(*NamespaceA__NamespaceB.TableInNestedNST).Pack(builder)
    25  	}
    26  	return 0
    27  }
    28  
    29  func (rcv UnionInNestedNS) UnPack(table flatbuffers.Table) *UnionInNestedNST {
    30  	switch rcv {
    31  	case UnionInNestedNSTableInNestedNS:
    32  		x := TableInNestedNS{_tab: table}
    33  		return &NamespaceA__NamespaceB.UnionInNestedNST{ Type: UnionInNestedNSTableInNestedNS, Value: x.UnPack() }
    34  	}
    35  	return nil
    36  }
    37  

View as plain text