42 lines
1.1 KiB
Go
Raw Normal View History

2023-11-05 03:26:09 +08:00
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
package cfg;
import (
"demo/luban"
)
import "errors"
type TestShape struct {
}
const TypeId_TestShape = 637688613
func (*TestShape) GetTypeId() int32 {
return 637688613
}
func NewTestShape(_buf *luban.ByteBuf) (interface{}, error) {
var id int32
var err error
if id, err = _buf.ReadInt() ; err != nil {
return nil, err
}
switch id {
case 2131829196: _v, err := NewTestCircle(_buf); if err != nil { return nil, errors.New("test.circle") } else { return _v, nil }
case 694982337: _v, err := NewTest2Rectangle(_buf); if err != nil { return nil, errors.New("test2.rectangle") } else { return _v, nil }
default: return nil, errors.New("unknown type id")
}
}