blob: 6cf5174a86cc09a61ee6aa84dda89479128cc716 [file] [log] [blame]
////////////////////////////////////////////////////////////////////////////////
// Do not modify!
// Generated by codergen
////////////////////////////////////////////////////////////////////////////////
package snippets
import (
"android.googlesource.com/platform/tools/gpu/framework/binary"
"android.googlesource.com/platform/tools/gpu/framework/binary/registry"
"android.googlesource.com/platform/tools/gpu/framework/id"
)
// Make sure schema init() runs first
import _ "android.googlesource.com/platform/tools/gpu/framework/binary/schema"
// force use the id package, because our imports handling is wrong
var _ id.ID
const (
ixǁAtomSnippets = iota
ixǁCanFollow
ixǁLabels
ixǁObservations
ixǁfieldPath
ixǁnamePath
ixǁpartPath
ixǁrelativePath
)
var entities [8]binary.Entity
var Namespace = registry.NewNamespace()
func init() {
registry.Global.AddFallbacks(Namespace)
Namespace.AddClassOf((*AtomSnippets)(nil))
Namespace.AddClassOf((*CanFollow)(nil))
Namespace.AddClassOf((*Labels)(nil))
Namespace.AddClassOf((*Observations)(nil))
Namespace.AddClassOf((*fieldPath)(nil))
Namespace.AddClassOf((*namePath)(nil))
Namespace.AddClassOf((*partPath)(nil))
Namespace.AddClassOf((*relativePath)(nil))
}
type binaryClassAtomSnippets struct{}
func (*AtomSnippets) Class() binary.Class {
return (*binaryClassAtomSnippets)(nil)
}
func doEncodeAtomSnippets(e binary.Encoder, o *AtomSnippets) {
e.String(o.AtomName)
e.Uint32(uint32(len(o.Snippets)))
for i := range o.Snippets {
curr := &o.Snippets[i]
e.Object(*curr)
}
}
func doDecodeAtomSnippets(d binary.Decoder, o *AtomSnippets) {
o.AtomName = string(d.String())
if count := d.Count(); count > 0 {
o.Snippets = make([]KindredSnippets, count)
for i := range o.Snippets {
curr := &o.Snippets[i]
*curr = KindredSnippetsCast(d.Object())
}
}
}
func doDecodeRawAtomSnippets(d binary.Decoder, o *AtomSnippets) {
o.AtomName = string(d.String())
if count := d.Count(); count > 0 {
o.Snippets = make([]KindredSnippets, count)
for i := range o.Snippets {
curr := &o.Snippets[i]
*curr = KindredSnippetsCast(d.Object())
}
}
}
func (*binaryClassAtomSnippets) Encode(e binary.Encoder, obj binary.Object) {
doEncodeAtomSnippets(e, obj.(*AtomSnippets))
}
func (*binaryClassAtomSnippets) New() binary.Object {
return &AtomSnippets{}
}
func (*binaryClassAtomSnippets) DecodeTo(d binary.Decoder, obj binary.Object) {
doDecodeAtomSnippets(d, obj.(*AtomSnippets))
}
func (c *binaryClassAtomSnippets) Schema() *binary.Entity {
return &entities[ixǁAtomSnippets]
}
type binaryClassCanFollow struct{}
func (*CanFollow) Class() binary.Class {
return (*binaryClassCanFollow)(nil)
}
func doEncodeCanFollow(e binary.Encoder, o *CanFollow) {
e.Object(o.Path)
}
func doDecodeCanFollow(d binary.Decoder, o *CanFollow) {
o.Path = PathwayCast(d.Object())
}
func doDecodeRawCanFollow(d binary.Decoder, o *CanFollow) {
o.Path = PathwayCast(d.Object())
}
func (*binaryClassCanFollow) Encode(e binary.Encoder, obj binary.Object) {
doEncodeCanFollow(e, obj.(*CanFollow))
}
func (*binaryClassCanFollow) New() binary.Object {
return &CanFollow{}
}
func (*binaryClassCanFollow) DecodeTo(d binary.Decoder, obj binary.Object) {
doDecodeCanFollow(d, obj.(*CanFollow))
}
func (c *binaryClassCanFollow) Schema() *binary.Entity {
return &entities[ixǁCanFollow]
}
type binaryClassLabels struct{}
func (*Labels) Class() binary.Class {
return (*binaryClassLabels)(nil)
}
func doEncodeLabels(e binary.Encoder, o *Labels) {
e.Object(o.Path)
e.Uint32(uint32(len(o.Labels)))
for i := range o.Labels {
curr := &o.Labels[i]
e.String(*curr)
}
}
func doDecodeLabels(d binary.Decoder, o *Labels) {
o.Path = PathwayCast(d.Object())
if count := d.Count(); count > 0 {
o.Labels = make([]string, count)
for i := range o.Labels {
curr := &o.Labels[i]
*curr = string(d.String())
}
}
}
func doDecodeRawLabels(d binary.Decoder, o *Labels) {
o.Path = PathwayCast(d.Object())
if count := d.Count(); count > 0 {
o.Labels = make([]string, count)
for i := range o.Labels {
curr := &o.Labels[i]
*curr = string(d.String())
}
}
}
func (*binaryClassLabels) Encode(e binary.Encoder, obj binary.Object) {
doEncodeLabels(e, obj.(*Labels))
}
func (*binaryClassLabels) New() binary.Object {
return &Labels{}
}
func (*binaryClassLabels) DecodeTo(d binary.Decoder, obj binary.Object) {
doDecodeLabels(d, obj.(*Labels))
}
func (c *binaryClassLabels) Schema() *binary.Entity {
return &entities[ixǁLabels]
}
type binaryClassObservations struct{}
func (*Observations) Class() binary.Class {
return (*binaryClassObservations)(nil)
}
func doEncodeObservations(e binary.Encoder, o *Observations) {
e.Object(o.path)
e.Uint32(uint32(len(o.observations)))
for i := range o.observations {
curr := &o.observations[i]
e.Int32(int32(*curr))
}
}
func doDecodeObservations(d binary.Decoder, o *Observations) {
o.path = PathwayCast(d.Object())
if count := d.Count(); count > 0 {
o.observations = make([]ObservationType, count)
for i := range o.observations {
curr := &o.observations[i]
*curr = ObservationType(d.Int32())
}
}
}
func doDecodeRawObservations(d binary.Decoder, o *Observations) {
o.path = PathwayCast(d.Object())
if count := d.Count(); count > 0 {
o.observations = make([]ObservationType, count)
for i := range o.observations {
curr := &o.observations[i]
*curr = ObservationType(d.Int32())
}
}
}
func (*binaryClassObservations) Encode(e binary.Encoder, obj binary.Object) {
doEncodeObservations(e, obj.(*Observations))
}
func (*binaryClassObservations) New() binary.Object {
return &Observations{}
}
func (*binaryClassObservations) DecodeTo(d binary.Decoder, obj binary.Object) {
doDecodeObservations(d, obj.(*Observations))
}
func (c *binaryClassObservations) Schema() *binary.Entity {
return &entities[ixǁObservations]
}
type binaryClassfieldPath struct{}
func (*fieldPath) Class() binary.Class {
return (*binaryClassfieldPath)(nil)
}
func doEncodefieldPath(e binary.Encoder, o *fieldPath) {
e.Object(o.base)
e.String(o.name)
}
func doDecodefieldPath(d binary.Decoder, o *fieldPath) {
o.base = PathwayCast(d.Object())
o.name = string(d.String())
}
func doDecodeRawfieldPath(d binary.Decoder, o *fieldPath) {
o.base = PathwayCast(d.Object())
o.name = string(d.String())
}
func (*binaryClassfieldPath) Encode(e binary.Encoder, obj binary.Object) {
doEncodefieldPath(e, obj.(*fieldPath))
}
func (*binaryClassfieldPath) New() binary.Object {
return &fieldPath{}
}
func (*binaryClassfieldPath) DecodeTo(d binary.Decoder, obj binary.Object) {
doDecodefieldPath(d, obj.(*fieldPath))
}
func (c *binaryClassfieldPath) Schema() *binary.Entity {
return &entities[ixǁfieldPath]
}
type binaryClassnamePath struct{}
func (*namePath) Class() binary.Class {
return (*binaryClassnamePath)(nil)
}
func doEncodenamePath(e binary.Writer, o *namePath) {
e.Int32(int32(o.cat))
e.String(o.name)
}
func doDecodenamePath(d binary.Reader, o *namePath) {
o.cat = SymbolCategory(d.Int32())
o.name = string(d.String())
}
func doDecodeRawnamePath(d binary.Reader, o *namePath) {
o.cat = SymbolCategory(d.Int32())
o.name = string(d.String())
}
func (*binaryClassnamePath) Encode(e binary.Encoder, obj binary.Object) {
doEncodenamePath(e, obj.(*namePath))
}
func (*binaryClassnamePath) New() binary.Object {
return &namePath{}
}
func (*binaryClassnamePath) DecodeTo(d binary.Decoder, obj binary.Object) {
doDecodenamePath(d, obj.(*namePath))
}
func (o *namePath) WriteSimple(w binary.Writer) {
doEncodenamePath(w, o)
}
func (o *namePath) ReadSimple(r binary.Reader) {
doDecodenamePath(r, o)
}
func (c *binaryClassnamePath) Schema() *binary.Entity {
return &entities[ixǁnamePath]
}
type binaryClasspartPath struct{}
func (*partPath) Class() binary.Class {
return (*binaryClasspartPath)(nil)
}
func doEncodepartPath(e binary.Encoder, o *partPath) {
e.Object(o.base)
e.Int32(int32(o.kind))
}
func doDecodepartPath(d binary.Decoder, o *partPath) {
o.base = PathwayCast(d.Object())
o.kind = PartKind(d.Int32())
}
func doDecodeRawpartPath(d binary.Decoder, o *partPath) {
o.base = PathwayCast(d.Object())
o.kind = PartKind(d.Int32())
}
func (*binaryClasspartPath) Encode(e binary.Encoder, obj binary.Object) {
doEncodepartPath(e, obj.(*partPath))
}
func (*binaryClasspartPath) New() binary.Object {
return &partPath{}
}
func (*binaryClasspartPath) DecodeTo(d binary.Decoder, obj binary.Object) {
doDecodepartPath(d, obj.(*partPath))
}
func (c *binaryClasspartPath) Schema() *binary.Entity {
return &entities[ixǁpartPath]
}
type binaryClassrelativePath struct{}
func (*relativePath) Class() binary.Class {
return (*binaryClassrelativePath)(nil)
}
func doEncoderelativePath(e binary.Writer, o *relativePath) {
e.String(o.typeName)
}
func doDecoderelativePath(d binary.Reader, o *relativePath) {
o.typeName = string(d.String())
}
func doDecodeRawrelativePath(d binary.Reader, o *relativePath) {
o.typeName = string(d.String())
}
func (*binaryClassrelativePath) Encode(e binary.Encoder, obj binary.Object) {
doEncoderelativePath(e, obj.(*relativePath))
}
func (*binaryClassrelativePath) New() binary.Object {
return &relativePath{}
}
func (*binaryClassrelativePath) DecodeTo(d binary.Decoder, obj binary.Object) {
doDecoderelativePath(d, obj.(*relativePath))
}
func (o *relativePath) WriteSimple(w binary.Writer) {
doEncoderelativePath(w, o)
}
func (o *relativePath) ReadSimple(r binary.Reader) {
doDecoderelativePath(r, o)
}
func (c *binaryClassrelativePath) Schema() *binary.Entity {
return &entities[ixǁrelativePath]
}