| //////////////////////////////////////////////////////////////////////////////// |
| // Do not modify! |
| // Generated by codergen |
| //////////////////////////////////////////////////////////////////////////////// |
| |
| package any |
| |
| import ( |
| "android.googlesource.com/platform/tools/gpu/binary" |
| "android.googlesource.com/platform/tools/gpu/binary/registry" |
| ) |
| |
| // Make sure schema init() runs first |
| import _ "android.googlesource.com/platform/tools/gpu/binary/schema" |
| |
| const ( |
| ixǁboolSlice = iota |
| ixǁbool_ |
| ixǁfloat32Slice |
| ixǁfloat32_ |
| ixǁfloat64Slice |
| ixǁfloat64_ |
| ixǁidSlice |
| ixǁid_ |
| ixǁint16Slice |
| ixǁint16_ |
| ixǁint32Slice |
| ixǁint32_ |
| ixǁint64Slice |
| ixǁint64_ |
| ixǁint8Slice |
| ixǁint8_ |
| ixǁobjectSlice |
| ixǁobject_ |
| ixǁstringSlice |
| ixǁstring_ |
| ixǁuint16Slice |
| ixǁuint16_ |
| ixǁuint32Slice |
| ixǁuint32_ |
| ixǁuint64Slice |
| ixǁuint64_ |
| ixǁuint8Slice |
| ixǁuint8_ |
| ) |
| |
| var entities [28]binary.Entity |
| |
| var Namespace = registry.NewNamespace() |
| |
| func init() { |
| registry.Global.AddFallbacks(Namespace) |
| Namespace.AddClassOf((*boolSlice)(nil)) |
| Namespace.AddClassOf((*bool_)(nil)) |
| Namespace.AddClassOf((*float32Slice)(nil)) |
| Namespace.AddClassOf((*float32_)(nil)) |
| Namespace.AddClassOf((*float64Slice)(nil)) |
| Namespace.AddClassOf((*float64_)(nil)) |
| Namespace.AddClassOf((*idSlice)(nil)) |
| Namespace.AddClassOf((*id_)(nil)) |
| Namespace.AddClassOf((*int16Slice)(nil)) |
| Namespace.AddClassOf((*int16_)(nil)) |
| Namespace.AddClassOf((*int32Slice)(nil)) |
| Namespace.AddClassOf((*int32_)(nil)) |
| Namespace.AddClassOf((*int64Slice)(nil)) |
| Namespace.AddClassOf((*int64_)(nil)) |
| Namespace.AddClassOf((*int8Slice)(nil)) |
| Namespace.AddClassOf((*int8_)(nil)) |
| Namespace.AddClassOf((*objectSlice)(nil)) |
| Namespace.AddClassOf((*object_)(nil)) |
| Namespace.AddClassOf((*stringSlice)(nil)) |
| Namespace.AddClassOf((*string_)(nil)) |
| Namespace.AddClassOf((*uint16Slice)(nil)) |
| Namespace.AddClassOf((*uint16_)(nil)) |
| Namespace.AddClassOf((*uint32Slice)(nil)) |
| Namespace.AddClassOf((*uint32_)(nil)) |
| Namespace.AddClassOf((*uint64Slice)(nil)) |
| Namespace.AddClassOf((*uint64_)(nil)) |
| Namespace.AddClassOf((*uint8Slice)(nil)) |
| Namespace.AddClassOf((*uint8_)(nil)) |
| } |
| |
| type binaryClassboolSlice struct{} |
| |
| func (*boolSlice) Class() binary.Class { |
| return (*binaryClassboolSlice)(nil) |
| } |
| func doEncodeboolSlice(e binary.Writer, o *boolSlice) { |
| e.Uint32(uint32(len(o.Value))) |
| for i := range o.Value { |
| curr := &o.Value[i] |
| e.Bool(*curr) |
| } |
| } |
| func doDecodeboolSlice(d binary.Reader, o *boolSlice) { |
| if count := d.Count(); count > 0 { |
| o.Value = make([]bool, count) |
| for i := range o.Value { |
| curr := &o.Value[i] |
| *curr = bool(d.Bool()) |
| } |
| } |
| } |
| func (*binaryClassboolSlice) Encode(e binary.Encoder, obj binary.Object) { |
| doEncodeboolSlice(e, obj.(*boolSlice)) |
| } |
| func (*binaryClassboolSlice) New() binary.Object { |
| return &boolSlice{} |
| } |
| func (*binaryClassboolSlice) DecodeTo(d binary.Decoder, obj binary.Object) { |
| doDecodeboolSlice(d, obj.(*boolSlice)) |
| } |
| func (o *boolSlice) WriteSimple(w binary.Writer) { |
| doEncodeboolSlice(w, o) |
| } |
| func (o *boolSlice) ReadSimple(r binary.Reader) { |
| doDecodeboolSlice(r, o) |
| } |
| func (c *binaryClassboolSlice) Schema() *binary.Entity { |
| return &entities[ixǁboolSlice] |
| } |
| |
| type binaryClassbool_ struct{} |
| |
| func (*bool_) Class() binary.Class { |
| return (*binaryClassbool_)(nil) |
| } |
| func doEncodebool_(e binary.Writer, o *bool_) { |
| e.Bool(o.Value) |
| } |
| func doDecodebool_(d binary.Reader, o *bool_) { |
| o.Value = bool(d.Bool()) |
| } |
| func (*binaryClassbool_) Encode(e binary.Encoder, obj binary.Object) { |
| doEncodebool_(e, obj.(*bool_)) |
| } |
| func (*binaryClassbool_) New() binary.Object { |
| return &bool_{} |
| } |
| func (*binaryClassbool_) DecodeTo(d binary.Decoder, obj binary.Object) { |
| doDecodebool_(d, obj.(*bool_)) |
| } |
| func (o *bool_) WriteSimple(w binary.Writer) { |
| doEncodebool_(w, o) |
| } |
| func (o *bool_) ReadSimple(r binary.Reader) { |
| doDecodebool_(r, o) |
| } |
| func (c *binaryClassbool_) Schema() *binary.Entity { |
| return &entities[ixǁbool_] |
| } |
| |
| type binaryClassfloat32Slice struct{} |
| |
| func (*float32Slice) Class() binary.Class { |
| return (*binaryClassfloat32Slice)(nil) |
| } |
| func doEncodefloat32Slice(e binary.Writer, o *float32Slice) { |
| e.Uint32(uint32(len(o.Value))) |
| for i := range o.Value { |
| curr := &o.Value[i] |
| e.Float32(*curr) |
| } |
| } |
| func doDecodefloat32Slice(d binary.Reader, o *float32Slice) { |
| if count := d.Count(); count > 0 { |
| o.Value = make([]float32, count) |
| for i := range o.Value { |
| curr := &o.Value[i] |
| *curr = float32(d.Float32()) |
| } |
| } |
| } |
| func (*binaryClassfloat32Slice) Encode(e binary.Encoder, obj binary.Object) { |
| doEncodefloat32Slice(e, obj.(*float32Slice)) |
| } |
| func (*binaryClassfloat32Slice) New() binary.Object { |
| return &float32Slice{} |
| } |
| func (*binaryClassfloat32Slice) DecodeTo(d binary.Decoder, obj binary.Object) { |
| doDecodefloat32Slice(d, obj.(*float32Slice)) |
| } |
| func (o *float32Slice) WriteSimple(w binary.Writer) { |
| doEncodefloat32Slice(w, o) |
| } |
| func (o *float32Slice) ReadSimple(r binary.Reader) { |
| doDecodefloat32Slice(r, o) |
| } |
| func (c *binaryClassfloat32Slice) Schema() *binary.Entity { |
| return &entities[ixǁfloat32Slice] |
| } |
| |
| type binaryClassfloat32_ struct{} |
| |
| func (*float32_) Class() binary.Class { |
| return (*binaryClassfloat32_)(nil) |
| } |
| func doEncodefloat32_(e binary.Writer, o *float32_) { |
| e.Float32(o.Value) |
| } |
| func doDecodefloat32_(d binary.Reader, o *float32_) { |
| o.Value = float32(d.Float32()) |
| } |
| func (*binaryClassfloat32_) Encode(e binary.Encoder, obj binary.Object) { |
| doEncodefloat32_(e, obj.(*float32_)) |
| } |
| func (*binaryClassfloat32_) New() binary.Object { |
| return &float32_{} |
| } |
| func (*binaryClassfloat32_) DecodeTo(d binary.Decoder, obj binary.Object) { |
| doDecodefloat32_(d, obj.(*float32_)) |
| } |
| func (o *float32_) WriteSimple(w binary.Writer) { |
| doEncodefloat32_(w, o) |
| } |
| func (o *float32_) ReadSimple(r binary.Reader) { |
| doDecodefloat32_(r, o) |
| } |
| func (c *binaryClassfloat32_) Schema() *binary.Entity { |
| return &entities[ixǁfloat32_] |
| } |
| |
| type binaryClassfloat64Slice struct{} |
| |
| func (*float64Slice) Class() binary.Class { |
| return (*binaryClassfloat64Slice)(nil) |
| } |
| func doEncodefloat64Slice(e binary.Writer, o *float64Slice) { |
| e.Uint32(uint32(len(o.Value))) |
| for i := range o.Value { |
| curr := &o.Value[i] |
| e.Float64(*curr) |
| } |
| } |
| func doDecodefloat64Slice(d binary.Reader, o *float64Slice) { |
| if count := d.Count(); count > 0 { |
| o.Value = make([]float64, count) |
| for i := range o.Value { |
| curr := &o.Value[i] |
| *curr = float64(d.Float64()) |
| } |
| } |
| } |
| func (*binaryClassfloat64Slice) Encode(e binary.Encoder, obj binary.Object) { |
| doEncodefloat64Slice(e, obj.(*float64Slice)) |
| } |
| func (*binaryClassfloat64Slice) New() binary.Object { |
| return &float64Slice{} |
| } |
| func (*binaryClassfloat64Slice) DecodeTo(d binary.Decoder, obj binary.Object) { |
| doDecodefloat64Slice(d, obj.(*float64Slice)) |
| } |
| func (o *float64Slice) WriteSimple(w binary.Writer) { |
| doEncodefloat64Slice(w, o) |
| } |
| func (o *float64Slice) ReadSimple(r binary.Reader) { |
| doDecodefloat64Slice(r, o) |
| } |
| func (c *binaryClassfloat64Slice) Schema() *binary.Entity { |
| return &entities[ixǁfloat64Slice] |
| } |
| |
| type binaryClassfloat64_ struct{} |
| |
| func (*float64_) Class() binary.Class { |
| return (*binaryClassfloat64_)(nil) |
| } |
| func doEncodefloat64_(e binary.Writer, o *float64_) { |
| e.Float64(o.Value) |
| } |
| func doDecodefloat64_(d binary.Reader, o *float64_) { |
| o.Value = float64(d.Float64()) |
| } |
| func (*binaryClassfloat64_) Encode(e binary.Encoder, obj binary.Object) { |
| doEncodefloat64_(e, obj.(*float64_)) |
| } |
| func (*binaryClassfloat64_) New() binary.Object { |
| return &float64_{} |
| } |
| func (*binaryClassfloat64_) DecodeTo(d binary.Decoder, obj binary.Object) { |
| doDecodefloat64_(d, obj.(*float64_)) |
| } |
| func (o *float64_) WriteSimple(w binary.Writer) { |
| doEncodefloat64_(w, o) |
| } |
| func (o *float64_) ReadSimple(r binary.Reader) { |
| doDecodefloat64_(r, o) |
| } |
| func (c *binaryClassfloat64_) Schema() *binary.Entity { |
| return &entities[ixǁfloat64_] |
| } |
| |
| type binaryClassidSlice struct{} |
| |
| func (*idSlice) Class() binary.Class { |
| return (*binaryClassidSlice)(nil) |
| } |
| func doEncodeidSlice(e binary.Writer, o *idSlice) { |
| e.Uint32(uint32(len(o.Value))) |
| for i := range o.Value { |
| curr := &o.Value[i] |
| e.Data((*curr)[:20]) |
| } |
| } |
| func doDecodeidSlice(d binary.Reader, o *idSlice) { |
| if count := d.Count(); count > 0 { |
| o.Value = make([]binary.ID, count) |
| for i := range o.Value { |
| curr := &o.Value[i] |
| d.Data((*curr)[:20]) |
| } |
| } |
| } |
| func (*binaryClassidSlice) Encode(e binary.Encoder, obj binary.Object) { |
| doEncodeidSlice(e, obj.(*idSlice)) |
| } |
| func (*binaryClassidSlice) New() binary.Object { |
| return &idSlice{} |
| } |
| func (*binaryClassidSlice) DecodeTo(d binary.Decoder, obj binary.Object) { |
| doDecodeidSlice(d, obj.(*idSlice)) |
| } |
| func (o *idSlice) WriteSimple(w binary.Writer) { |
| doEncodeidSlice(w, o) |
| } |
| func (o *idSlice) ReadSimple(r binary.Reader) { |
| doDecodeidSlice(r, o) |
| } |
| func (c *binaryClassidSlice) Schema() *binary.Entity { |
| return &entities[ixǁidSlice] |
| } |
| |
| type binaryClassid_ struct{} |
| |
| func (*id_) Class() binary.Class { |
| return (*binaryClassid_)(nil) |
| } |
| func doEncodeid_(e binary.Writer, o *id_) { |
| e.Data(o.Value[:20]) |
| } |
| func doDecodeid_(d binary.Reader, o *id_) { |
| d.Data(o.Value[:20]) |
| } |
| func (*binaryClassid_) Encode(e binary.Encoder, obj binary.Object) { |
| doEncodeid_(e, obj.(*id_)) |
| } |
| func (*binaryClassid_) New() binary.Object { |
| return &id_{} |
| } |
| func (*binaryClassid_) DecodeTo(d binary.Decoder, obj binary.Object) { |
| doDecodeid_(d, obj.(*id_)) |
| } |
| func (o *id_) WriteSimple(w binary.Writer) { |
| doEncodeid_(w, o) |
| } |
| func (o *id_) ReadSimple(r binary.Reader) { |
| doDecodeid_(r, o) |
| } |
| func (c *binaryClassid_) Schema() *binary.Entity { |
| return &entities[ixǁid_] |
| } |
| |
| type binaryClassint16Slice struct{} |
| |
| func (*int16Slice) Class() binary.Class { |
| return (*binaryClassint16Slice)(nil) |
| } |
| func doEncodeint16Slice(e binary.Writer, o *int16Slice) { |
| e.Uint32(uint32(len(o.Value))) |
| for i := range o.Value { |
| curr := &o.Value[i] |
| e.Int16(*curr) |
| } |
| } |
| func doDecodeint16Slice(d binary.Reader, o *int16Slice) { |
| if count := d.Count(); count > 0 { |
| o.Value = make([]int16, count) |
| for i := range o.Value { |
| curr := &o.Value[i] |
| *curr = int16(d.Int16()) |
| } |
| } |
| } |
| func (*binaryClassint16Slice) Encode(e binary.Encoder, obj binary.Object) { |
| doEncodeint16Slice(e, obj.(*int16Slice)) |
| } |
| func (*binaryClassint16Slice) New() binary.Object { |
| return &int16Slice{} |
| } |
| func (*binaryClassint16Slice) DecodeTo(d binary.Decoder, obj binary.Object) { |
| doDecodeint16Slice(d, obj.(*int16Slice)) |
| } |
| func (o *int16Slice) WriteSimple(w binary.Writer) { |
| doEncodeint16Slice(w, o) |
| } |
| func (o *int16Slice) ReadSimple(r binary.Reader) { |
| doDecodeint16Slice(r, o) |
| } |
| func (c *binaryClassint16Slice) Schema() *binary.Entity { |
| return &entities[ixǁint16Slice] |
| } |
| |
| type binaryClassint16_ struct{} |
| |
| func (*int16_) Class() binary.Class { |
| return (*binaryClassint16_)(nil) |
| } |
| func doEncodeint16_(e binary.Writer, o *int16_) { |
| e.Int16(o.Value) |
| } |
| func doDecodeint16_(d binary.Reader, o *int16_) { |
| o.Value = int16(d.Int16()) |
| } |
| func (*binaryClassint16_) Encode(e binary.Encoder, obj binary.Object) { |
| doEncodeint16_(e, obj.(*int16_)) |
| } |
| func (*binaryClassint16_) New() binary.Object { |
| return &int16_{} |
| } |
| func (*binaryClassint16_) DecodeTo(d binary.Decoder, obj binary.Object) { |
| doDecodeint16_(d, obj.(*int16_)) |
| } |
| func (o *int16_) WriteSimple(w binary.Writer) { |
| doEncodeint16_(w, o) |
| } |
| func (o *int16_) ReadSimple(r binary.Reader) { |
| doDecodeint16_(r, o) |
| } |
| func (c *binaryClassint16_) Schema() *binary.Entity { |
| return &entities[ixǁint16_] |
| } |
| |
| type binaryClassint32Slice struct{} |
| |
| func (*int32Slice) Class() binary.Class { |
| return (*binaryClassint32Slice)(nil) |
| } |
| func doEncodeint32Slice(e binary.Writer, o *int32Slice) { |
| e.Uint32(uint32(len(o.Value))) |
| for i := range o.Value { |
| curr := &o.Value[i] |
| e.Int32(*curr) |
| } |
| } |
| func doDecodeint32Slice(d binary.Reader, o *int32Slice) { |
| if count := d.Count(); count > 0 { |
| o.Value = make([]int32, count) |
| for i := range o.Value { |
| curr := &o.Value[i] |
| *curr = int32(d.Int32()) |
| } |
| } |
| } |
| func (*binaryClassint32Slice) Encode(e binary.Encoder, obj binary.Object) { |
| doEncodeint32Slice(e, obj.(*int32Slice)) |
| } |
| func (*binaryClassint32Slice) New() binary.Object { |
| return &int32Slice{} |
| } |
| func (*binaryClassint32Slice) DecodeTo(d binary.Decoder, obj binary.Object) { |
| doDecodeint32Slice(d, obj.(*int32Slice)) |
| } |
| func (o *int32Slice) WriteSimple(w binary.Writer) { |
| doEncodeint32Slice(w, o) |
| } |
| func (o *int32Slice) ReadSimple(r binary.Reader) { |
| doDecodeint32Slice(r, o) |
| } |
| func (c *binaryClassint32Slice) Schema() *binary.Entity { |
| return &entities[ixǁint32Slice] |
| } |
| |
| type binaryClassint32_ struct{} |
| |
| func (*int32_) Class() binary.Class { |
| return (*binaryClassint32_)(nil) |
| } |
| func doEncodeint32_(e binary.Writer, o *int32_) { |
| e.Int32(o.Value) |
| } |
| func doDecodeint32_(d binary.Reader, o *int32_) { |
| o.Value = int32(d.Int32()) |
| } |
| func (*binaryClassint32_) Encode(e binary.Encoder, obj binary.Object) { |
| doEncodeint32_(e, obj.(*int32_)) |
| } |
| func (*binaryClassint32_) New() binary.Object { |
| return &int32_{} |
| } |
| func (*binaryClassint32_) DecodeTo(d binary.Decoder, obj binary.Object) { |
| doDecodeint32_(d, obj.(*int32_)) |
| } |
| func (o *int32_) WriteSimple(w binary.Writer) { |
| doEncodeint32_(w, o) |
| } |
| func (o *int32_) ReadSimple(r binary.Reader) { |
| doDecodeint32_(r, o) |
| } |
| func (c *binaryClassint32_) Schema() *binary.Entity { |
| return &entities[ixǁint32_] |
| } |
| |
| type binaryClassint64Slice struct{} |
| |
| func (*int64Slice) Class() binary.Class { |
| return (*binaryClassint64Slice)(nil) |
| } |
| func doEncodeint64Slice(e binary.Writer, o *int64Slice) { |
| e.Uint32(uint32(len(o.Value))) |
| for i := range o.Value { |
| curr := &o.Value[i] |
| e.Int64(*curr) |
| } |
| } |
| func doDecodeint64Slice(d binary.Reader, o *int64Slice) { |
| if count := d.Count(); count > 0 { |
| o.Value = make([]int64, count) |
| for i := range o.Value { |
| curr := &o.Value[i] |
| *curr = int64(d.Int64()) |
| } |
| } |
| } |
| func (*binaryClassint64Slice) Encode(e binary.Encoder, obj binary.Object) { |
| doEncodeint64Slice(e, obj.(*int64Slice)) |
| } |
| func (*binaryClassint64Slice) New() binary.Object { |
| return &int64Slice{} |
| } |
| func (*binaryClassint64Slice) DecodeTo(d binary.Decoder, obj binary.Object) { |
| doDecodeint64Slice(d, obj.(*int64Slice)) |
| } |
| func (o *int64Slice) WriteSimple(w binary.Writer) { |
| doEncodeint64Slice(w, o) |
| } |
| func (o *int64Slice) ReadSimple(r binary.Reader) { |
| doDecodeint64Slice(r, o) |
| } |
| func (c *binaryClassint64Slice) Schema() *binary.Entity { |
| return &entities[ixǁint64Slice] |
| } |
| |
| type binaryClassint64_ struct{} |
| |
| func (*int64_) Class() binary.Class { |
| return (*binaryClassint64_)(nil) |
| } |
| func doEncodeint64_(e binary.Writer, o *int64_) { |
| e.Int64(o.Value) |
| } |
| func doDecodeint64_(d binary.Reader, o *int64_) { |
| o.Value = int64(d.Int64()) |
| } |
| func (*binaryClassint64_) Encode(e binary.Encoder, obj binary.Object) { |
| doEncodeint64_(e, obj.(*int64_)) |
| } |
| func (*binaryClassint64_) New() binary.Object { |
| return &int64_{} |
| } |
| func (*binaryClassint64_) DecodeTo(d binary.Decoder, obj binary.Object) { |
| doDecodeint64_(d, obj.(*int64_)) |
| } |
| func (o *int64_) WriteSimple(w binary.Writer) { |
| doEncodeint64_(w, o) |
| } |
| func (o *int64_) ReadSimple(r binary.Reader) { |
| doDecodeint64_(r, o) |
| } |
| func (c *binaryClassint64_) Schema() *binary.Entity { |
| return &entities[ixǁint64_] |
| } |
| |
| type binaryClassint8Slice struct{} |
| |
| func (*int8Slice) Class() binary.Class { |
| return (*binaryClassint8Slice)(nil) |
| } |
| func doEncodeint8Slice(e binary.Writer, o *int8Slice) { |
| e.Uint32(uint32(len(o.Value))) |
| for i := range o.Value { |
| curr := &o.Value[i] |
| e.Int8(*curr) |
| } |
| } |
| func doDecodeint8Slice(d binary.Reader, o *int8Slice) { |
| if count := d.Count(); count > 0 { |
| o.Value = make([]int8, count) |
| for i := range o.Value { |
| curr := &o.Value[i] |
| *curr = int8(d.Int8()) |
| } |
| } |
| } |
| func (*binaryClassint8Slice) Encode(e binary.Encoder, obj binary.Object) { |
| doEncodeint8Slice(e, obj.(*int8Slice)) |
| } |
| func (*binaryClassint8Slice) New() binary.Object { |
| return &int8Slice{} |
| } |
| func (*binaryClassint8Slice) DecodeTo(d binary.Decoder, obj binary.Object) { |
| doDecodeint8Slice(d, obj.(*int8Slice)) |
| } |
| func (o *int8Slice) WriteSimple(w binary.Writer) { |
| doEncodeint8Slice(w, o) |
| } |
| func (o *int8Slice) ReadSimple(r binary.Reader) { |
| doDecodeint8Slice(r, o) |
| } |
| func (c *binaryClassint8Slice) Schema() *binary.Entity { |
| return &entities[ixǁint8Slice] |
| } |
| |
| type binaryClassint8_ struct{} |
| |
| func (*int8_) Class() binary.Class { |
| return (*binaryClassint8_)(nil) |
| } |
| func doEncodeint8_(e binary.Writer, o *int8_) { |
| e.Int8(o.Value) |
| } |
| func doDecodeint8_(d binary.Reader, o *int8_) { |
| o.Value = int8(d.Int8()) |
| } |
| func (*binaryClassint8_) Encode(e binary.Encoder, obj binary.Object) { |
| doEncodeint8_(e, obj.(*int8_)) |
| } |
| func (*binaryClassint8_) New() binary.Object { |
| return &int8_{} |
| } |
| func (*binaryClassint8_) DecodeTo(d binary.Decoder, obj binary.Object) { |
| doDecodeint8_(d, obj.(*int8_)) |
| } |
| func (o *int8_) WriteSimple(w binary.Writer) { |
| doEncodeint8_(w, o) |
| } |
| func (o *int8_) ReadSimple(r binary.Reader) { |
| doDecodeint8_(r, o) |
| } |
| func (c *binaryClassint8_) Schema() *binary.Entity { |
| return &entities[ixǁint8_] |
| } |
| |
| type binaryClassobjectSlice struct{} |
| |
| func (*objectSlice) Class() binary.Class { |
| return (*binaryClassobjectSlice)(nil) |
| } |
| func doEncodeobjectSlice(e binary.Encoder, o *objectSlice) { |
| e.Uint32(uint32(len(o.Value))) |
| for i := range o.Value { |
| curr := &o.Value[i] |
| e.Object(*curr) |
| } |
| } |
| func doDecodeobjectSlice(d binary.Decoder, o *objectSlice) { |
| if count := d.Count(); count > 0 { |
| o.Value = make([]binary.Object, count) |
| for i := range o.Value { |
| curr := &o.Value[i] |
| *curr = binary.ObjectCast(d.Object()) |
| } |
| } |
| } |
| func (*binaryClassobjectSlice) Encode(e binary.Encoder, obj binary.Object) { |
| doEncodeobjectSlice(e, obj.(*objectSlice)) |
| } |
| func (*binaryClassobjectSlice) New() binary.Object { |
| return &objectSlice{} |
| } |
| func (*binaryClassobjectSlice) DecodeTo(d binary.Decoder, obj binary.Object) { |
| doDecodeobjectSlice(d, obj.(*objectSlice)) |
| } |
| func (c *binaryClassobjectSlice) Schema() *binary.Entity { |
| return &entities[ixǁobjectSlice] |
| } |
| |
| type binaryClassobject_ struct{} |
| |
| func (*object_) Class() binary.Class { |
| return (*binaryClassobject_)(nil) |
| } |
| func doEncodeobject_(e binary.Encoder, o *object_) { |
| e.Object(o.Value) |
| } |
| func doDecodeobject_(d binary.Decoder, o *object_) { |
| o.Value = binary.ObjectCast(d.Object()) |
| } |
| func (*binaryClassobject_) Encode(e binary.Encoder, obj binary.Object) { |
| doEncodeobject_(e, obj.(*object_)) |
| } |
| func (*binaryClassobject_) New() binary.Object { |
| return &object_{} |
| } |
| func (*binaryClassobject_) DecodeTo(d binary.Decoder, obj binary.Object) { |
| doDecodeobject_(d, obj.(*object_)) |
| } |
| func (c *binaryClassobject_) Schema() *binary.Entity { |
| return &entities[ixǁobject_] |
| } |
| |
| type binaryClassstringSlice struct{} |
| |
| func (*stringSlice) Class() binary.Class { |
| return (*binaryClassstringSlice)(nil) |
| } |
| func doEncodestringSlice(e binary.Writer, o *stringSlice) { |
| e.Uint32(uint32(len(o.Value))) |
| for i := range o.Value { |
| curr := &o.Value[i] |
| e.String(*curr) |
| } |
| } |
| func doDecodestringSlice(d binary.Reader, o *stringSlice) { |
| if count := d.Count(); count > 0 { |
| o.Value = make([]string, count) |
| for i := range o.Value { |
| curr := &o.Value[i] |
| *curr = string(d.String()) |
| } |
| } |
| } |
| func (*binaryClassstringSlice) Encode(e binary.Encoder, obj binary.Object) { |
| doEncodestringSlice(e, obj.(*stringSlice)) |
| } |
| func (*binaryClassstringSlice) New() binary.Object { |
| return &stringSlice{} |
| } |
| func (*binaryClassstringSlice) DecodeTo(d binary.Decoder, obj binary.Object) { |
| doDecodestringSlice(d, obj.(*stringSlice)) |
| } |
| func (o *stringSlice) WriteSimple(w binary.Writer) { |
| doEncodestringSlice(w, o) |
| } |
| func (o *stringSlice) ReadSimple(r binary.Reader) { |
| doDecodestringSlice(r, o) |
| } |
| func (c *binaryClassstringSlice) Schema() *binary.Entity { |
| return &entities[ixǁstringSlice] |
| } |
| |
| type binaryClassstring_ struct{} |
| |
| func (*string_) Class() binary.Class { |
| return (*binaryClassstring_)(nil) |
| } |
| func doEncodestring_(e binary.Writer, o *string_) { |
| e.String(o.Value) |
| } |
| func doDecodestring_(d binary.Reader, o *string_) { |
| o.Value = string(d.String()) |
| } |
| func (*binaryClassstring_) Encode(e binary.Encoder, obj binary.Object) { |
| doEncodestring_(e, obj.(*string_)) |
| } |
| func (*binaryClassstring_) New() binary.Object { |
| return &string_{} |
| } |
| func (*binaryClassstring_) DecodeTo(d binary.Decoder, obj binary.Object) { |
| doDecodestring_(d, obj.(*string_)) |
| } |
| func (o *string_) WriteSimple(w binary.Writer) { |
| doEncodestring_(w, o) |
| } |
| func (o *string_) ReadSimple(r binary.Reader) { |
| doDecodestring_(r, o) |
| } |
| func (c *binaryClassstring_) Schema() *binary.Entity { |
| return &entities[ixǁstring_] |
| } |
| |
| type binaryClassuint16Slice struct{} |
| |
| func (*uint16Slice) Class() binary.Class { |
| return (*binaryClassuint16Slice)(nil) |
| } |
| func doEncodeuint16Slice(e binary.Writer, o *uint16Slice) { |
| e.Uint32(uint32(len(o.Value))) |
| for i := range o.Value { |
| curr := &o.Value[i] |
| e.Uint16(*curr) |
| } |
| } |
| func doDecodeuint16Slice(d binary.Reader, o *uint16Slice) { |
| if count := d.Count(); count > 0 { |
| o.Value = make([]uint16, count) |
| for i := range o.Value { |
| curr := &o.Value[i] |
| *curr = uint16(d.Uint16()) |
| } |
| } |
| } |
| func (*binaryClassuint16Slice) Encode(e binary.Encoder, obj binary.Object) { |
| doEncodeuint16Slice(e, obj.(*uint16Slice)) |
| } |
| func (*binaryClassuint16Slice) New() binary.Object { |
| return &uint16Slice{} |
| } |
| func (*binaryClassuint16Slice) DecodeTo(d binary.Decoder, obj binary.Object) { |
| doDecodeuint16Slice(d, obj.(*uint16Slice)) |
| } |
| func (o *uint16Slice) WriteSimple(w binary.Writer) { |
| doEncodeuint16Slice(w, o) |
| } |
| func (o *uint16Slice) ReadSimple(r binary.Reader) { |
| doDecodeuint16Slice(r, o) |
| } |
| func (c *binaryClassuint16Slice) Schema() *binary.Entity { |
| return &entities[ixǁuint16Slice] |
| } |
| |
| type binaryClassuint16_ struct{} |
| |
| func (*uint16_) Class() binary.Class { |
| return (*binaryClassuint16_)(nil) |
| } |
| func doEncodeuint16_(e binary.Writer, o *uint16_) { |
| e.Uint16(o.Value) |
| } |
| func doDecodeuint16_(d binary.Reader, o *uint16_) { |
| o.Value = uint16(d.Uint16()) |
| } |
| func (*binaryClassuint16_) Encode(e binary.Encoder, obj binary.Object) { |
| doEncodeuint16_(e, obj.(*uint16_)) |
| } |
| func (*binaryClassuint16_) New() binary.Object { |
| return &uint16_{} |
| } |
| func (*binaryClassuint16_) DecodeTo(d binary.Decoder, obj binary.Object) { |
| doDecodeuint16_(d, obj.(*uint16_)) |
| } |
| func (o *uint16_) WriteSimple(w binary.Writer) { |
| doEncodeuint16_(w, o) |
| } |
| func (o *uint16_) ReadSimple(r binary.Reader) { |
| doDecodeuint16_(r, o) |
| } |
| func (c *binaryClassuint16_) Schema() *binary.Entity { |
| return &entities[ixǁuint16_] |
| } |
| |
| type binaryClassuint32Slice struct{} |
| |
| func (*uint32Slice) Class() binary.Class { |
| return (*binaryClassuint32Slice)(nil) |
| } |
| func doEncodeuint32Slice(e binary.Writer, o *uint32Slice) { |
| e.Uint32(uint32(len(o.Value))) |
| for i := range o.Value { |
| curr := &o.Value[i] |
| e.Uint32(*curr) |
| } |
| } |
| func doDecodeuint32Slice(d binary.Reader, o *uint32Slice) { |
| if count := d.Count(); count > 0 { |
| o.Value = make([]uint32, count) |
| for i := range o.Value { |
| curr := &o.Value[i] |
| *curr = uint32(d.Uint32()) |
| } |
| } |
| } |
| func (*binaryClassuint32Slice) Encode(e binary.Encoder, obj binary.Object) { |
| doEncodeuint32Slice(e, obj.(*uint32Slice)) |
| } |
| func (*binaryClassuint32Slice) New() binary.Object { |
| return &uint32Slice{} |
| } |
| func (*binaryClassuint32Slice) DecodeTo(d binary.Decoder, obj binary.Object) { |
| doDecodeuint32Slice(d, obj.(*uint32Slice)) |
| } |
| func (o *uint32Slice) WriteSimple(w binary.Writer) { |
| doEncodeuint32Slice(w, o) |
| } |
| func (o *uint32Slice) ReadSimple(r binary.Reader) { |
| doDecodeuint32Slice(r, o) |
| } |
| func (c *binaryClassuint32Slice) Schema() *binary.Entity { |
| return &entities[ixǁuint32Slice] |
| } |
| |
| type binaryClassuint32_ struct{} |
| |
| func (*uint32_) Class() binary.Class { |
| return (*binaryClassuint32_)(nil) |
| } |
| func doEncodeuint32_(e binary.Writer, o *uint32_) { |
| e.Uint32(o.Value) |
| } |
| func doDecodeuint32_(d binary.Reader, o *uint32_) { |
| o.Value = uint32(d.Uint32()) |
| } |
| func (*binaryClassuint32_) Encode(e binary.Encoder, obj binary.Object) { |
| doEncodeuint32_(e, obj.(*uint32_)) |
| } |
| func (*binaryClassuint32_) New() binary.Object { |
| return &uint32_{} |
| } |
| func (*binaryClassuint32_) DecodeTo(d binary.Decoder, obj binary.Object) { |
| doDecodeuint32_(d, obj.(*uint32_)) |
| } |
| func (o *uint32_) WriteSimple(w binary.Writer) { |
| doEncodeuint32_(w, o) |
| } |
| func (o *uint32_) ReadSimple(r binary.Reader) { |
| doDecodeuint32_(r, o) |
| } |
| func (c *binaryClassuint32_) Schema() *binary.Entity { |
| return &entities[ixǁuint32_] |
| } |
| |
| type binaryClassuint64Slice struct{} |
| |
| func (*uint64Slice) Class() binary.Class { |
| return (*binaryClassuint64Slice)(nil) |
| } |
| func doEncodeuint64Slice(e binary.Writer, o *uint64Slice) { |
| e.Uint32(uint32(len(o.Value))) |
| for i := range o.Value { |
| curr := &o.Value[i] |
| e.Uint64(*curr) |
| } |
| } |
| func doDecodeuint64Slice(d binary.Reader, o *uint64Slice) { |
| if count := d.Count(); count > 0 { |
| o.Value = make([]uint64, count) |
| for i := range o.Value { |
| curr := &o.Value[i] |
| *curr = uint64(d.Uint64()) |
| } |
| } |
| } |
| func (*binaryClassuint64Slice) Encode(e binary.Encoder, obj binary.Object) { |
| doEncodeuint64Slice(e, obj.(*uint64Slice)) |
| } |
| func (*binaryClassuint64Slice) New() binary.Object { |
| return &uint64Slice{} |
| } |
| func (*binaryClassuint64Slice) DecodeTo(d binary.Decoder, obj binary.Object) { |
| doDecodeuint64Slice(d, obj.(*uint64Slice)) |
| } |
| func (o *uint64Slice) WriteSimple(w binary.Writer) { |
| doEncodeuint64Slice(w, o) |
| } |
| func (o *uint64Slice) ReadSimple(r binary.Reader) { |
| doDecodeuint64Slice(r, o) |
| } |
| func (c *binaryClassuint64Slice) Schema() *binary.Entity { |
| return &entities[ixǁuint64Slice] |
| } |
| |
| type binaryClassuint64_ struct{} |
| |
| func (*uint64_) Class() binary.Class { |
| return (*binaryClassuint64_)(nil) |
| } |
| func doEncodeuint64_(e binary.Writer, o *uint64_) { |
| e.Uint64(o.Value) |
| } |
| func doDecodeuint64_(d binary.Reader, o *uint64_) { |
| o.Value = uint64(d.Uint64()) |
| } |
| func (*binaryClassuint64_) Encode(e binary.Encoder, obj binary.Object) { |
| doEncodeuint64_(e, obj.(*uint64_)) |
| } |
| func (*binaryClassuint64_) New() binary.Object { |
| return &uint64_{} |
| } |
| func (*binaryClassuint64_) DecodeTo(d binary.Decoder, obj binary.Object) { |
| doDecodeuint64_(d, obj.(*uint64_)) |
| } |
| func (o *uint64_) WriteSimple(w binary.Writer) { |
| doEncodeuint64_(w, o) |
| } |
| func (o *uint64_) ReadSimple(r binary.Reader) { |
| doDecodeuint64_(r, o) |
| } |
| func (c *binaryClassuint64_) Schema() *binary.Entity { |
| return &entities[ixǁuint64_] |
| } |
| |
| type binaryClassuint8Slice struct{} |
| |
| func (*uint8Slice) Class() binary.Class { |
| return (*binaryClassuint8Slice)(nil) |
| } |
| func doEncodeuint8Slice(e binary.Writer, o *uint8Slice) { |
| e.Uint32(uint32(len(o.Value))) |
| e.Data(o.Value) |
| } |
| func doDecodeuint8Slice(d binary.Reader, o *uint8Slice) { |
| if count := d.Count(); count > 0 { |
| o.Value = make([]uint8, count) |
| d.Data(o.Value) |
| } |
| } |
| func (*binaryClassuint8Slice) Encode(e binary.Encoder, obj binary.Object) { |
| doEncodeuint8Slice(e, obj.(*uint8Slice)) |
| } |
| func (*binaryClassuint8Slice) New() binary.Object { |
| return &uint8Slice{} |
| } |
| func (*binaryClassuint8Slice) DecodeTo(d binary.Decoder, obj binary.Object) { |
| doDecodeuint8Slice(d, obj.(*uint8Slice)) |
| } |
| func (o *uint8Slice) WriteSimple(w binary.Writer) { |
| doEncodeuint8Slice(w, o) |
| } |
| func (o *uint8Slice) ReadSimple(r binary.Reader) { |
| doDecodeuint8Slice(r, o) |
| } |
| func (c *binaryClassuint8Slice) Schema() *binary.Entity { |
| return &entities[ixǁuint8Slice] |
| } |
| |
| type binaryClassuint8_ struct{} |
| |
| func (*uint8_) Class() binary.Class { |
| return (*binaryClassuint8_)(nil) |
| } |
| func doEncodeuint8_(e binary.Writer, o *uint8_) { |
| e.Uint8(o.Value) |
| } |
| func doDecodeuint8_(d binary.Reader, o *uint8_) { |
| o.Value = uint8(d.Uint8()) |
| } |
| func (*binaryClassuint8_) Encode(e binary.Encoder, obj binary.Object) { |
| doEncodeuint8_(e, obj.(*uint8_)) |
| } |
| func (*binaryClassuint8_) New() binary.Object { |
| return &uint8_{} |
| } |
| func (*binaryClassuint8_) DecodeTo(d binary.Decoder, obj binary.Object) { |
| doDecodeuint8_(d, obj.(*uint8_)) |
| } |
| func (o *uint8_) WriteSimple(w binary.Writer) { |
| doEncodeuint8_(w, o) |
| } |
| func (o *uint8_) ReadSimple(r binary.Reader) { |
| doDecodeuint8_(r, o) |
| } |
| func (c *binaryClassuint8_) Schema() *binary.Entity { |
| return &entities[ixǁuint8_] |
| } |