classes
parent
fd45738324
commit
c372f14e33
@ -1,6 +1,31 @@
|
||||
package ent
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/jordanorelli/hyperstone/bit"
|
||||
)
|
||||
|
||||
type class struct {
|
||||
name string
|
||||
version int
|
||||
}
|
||||
|
||||
func (c *class) read(r bit.Reader) (value, error) {
|
||||
return nil, fmt.Errorf("fart")
|
||||
}
|
||||
|
||||
type classHistory map[int]*class
|
||||
|
||||
func classType(spec *typeSpec, env *Env) tÿpe {
|
||||
if spec.serializer != "" {
|
||||
h := env.classes[spec.serializer]
|
||||
if h != nil {
|
||||
class := h[spec.serializerV]
|
||||
if class != nil {
|
||||
return class
|
||||
}
|
||||
return typeError("class %s exists for spec serializer but can't find version %d", spec.serializer, spec.serializerV)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue