Generated Code

This commit is contained in:
Chris Masone
2015-11-09 08:35:06 -08:00
parent eda9b92870
commit f0f49c6010
35 changed files with 606 additions and 540 deletions

View File

@@ -13,7 +13,7 @@ var __commonPackageInFile_geo_CachedRef ref.Ref
// package implemented by this file and registers it with the global
// type package definition cache.
func init() {
p := types.NewPackage([]types.TypeRef{
p := types.NewPackage([]types.Type{
types.MakeStructTypeRef("Geoposition",
[]types.Field{
types.Field{"Latitude", types.MakePrimitiveTypeRef(types.Float32Kind), false},
@@ -69,9 +69,9 @@ func (s Geoposition) Def() (d GeopositionDef) {
return
}
var __typeRefForGeoposition types.TypeRef
var __typeRefForGeoposition types.Type
func (m Geoposition) TypeRef() types.TypeRef {
func (m Geoposition) Type() types.Type {
return __typeRefForGeoposition
}
@@ -99,7 +99,7 @@ func readerForGeoposition(v types.Value) []types.Value {
}
func (s Geoposition) Equals(other types.Value) bool {
return other != nil && __typeRefForGeoposition.Equals(other.TypeRef()) && s.Ref() == other.Ref()
return other != nil && __typeRefForGeoposition.Equals(other.Type()) && s.Ref() == other.Ref()
}
func (s Geoposition) Ref() ref.Ref {
@@ -174,9 +174,9 @@ func (s Georectangle) Def() (d GeorectangleDef) {
return
}
var __typeRefForGeorectangle types.TypeRef
var __typeRefForGeorectangle types.Type
func (m Georectangle) TypeRef() types.TypeRef {
func (m Georectangle) Type() types.Type {
return __typeRefForGeorectangle
}
@@ -204,7 +204,7 @@ func readerForGeorectangle(v types.Value) []types.Value {
}
func (s Georectangle) Equals(other types.Value) bool {
return other != nil && __typeRefForGeorectangle.Equals(other.TypeRef()) && s.Ref() == other.Ref()
return other != nil && __typeRefForGeorectangle.Equals(other.Type()) && s.Ref() == other.Ref()
}
func (s Georectangle) Ref() ref.Ref {

View File

@@ -14,7 +14,7 @@ var __commonPackageInFile_incident_CachedRef ref.Ref
// package implemented by this file and registers it with the global
// type package definition cache.
func init() {
p := types.NewPackage([]types.TypeRef{
p := types.NewPackage([]types.Type{
types.MakeStructTypeRef("Incident",
[]types.Field{
types.Field{"ID", types.MakePrimitiveTypeRef(types.Int64Kind), false},
@@ -119,9 +119,9 @@ func (s Incident) Def() (d IncidentDef) {
return
}
var __typeRefForIncident types.TypeRef
var __typeRefForIncident types.Type
func (m Incident) TypeRef() types.TypeRef {
func (m Incident) Type() types.Type {
return __typeRefForIncident
}
@@ -176,7 +176,7 @@ func readerForIncident(v types.Value) []types.Value {
}
func (s Incident) Equals(other types.Value) bool {
return other != nil && __typeRefForIncident.Equals(other.TypeRef()) && s.Ref() == other.Ref()
return other != nil && __typeRefForIncident.Equals(other.Type()) && s.Ref() == other.Ref()
}
func (s Incident) Ref() ref.Ref {
@@ -344,7 +344,7 @@ func (l ListOfRefOfIncident) Def() ListOfRefOfIncidentDef {
}
func (l ListOfRefOfIncident) Equals(other types.Value) bool {
return other != nil && __typeRefForListOfRefOfIncident.Equals(other.TypeRef()) && l.Ref() == other.Ref()
return other != nil && __typeRefForListOfRefOfIncident.Equals(other.Type()) && l.Ref() == other.Ref()
}
func (l ListOfRefOfIncident) Ref() ref.Ref {
@@ -352,7 +352,7 @@ func (l ListOfRefOfIncident) Ref() ref.Ref {
}
func (l ListOfRefOfIncident) Chunks() (chunks []ref.Ref) {
chunks = append(chunks, l.TypeRef().Chunks()...)
chunks = append(chunks, l.Type().Chunks()...)
chunks = append(chunks, l.l.Chunks()...)
return
}
@@ -362,9 +362,9 @@ func (l ListOfRefOfIncident) ChildValues() []types.Value {
}
// A Noms Value that describes ListOfRefOfIncident.
var __typeRefForListOfRefOfIncident types.TypeRef
var __typeRefForListOfRefOfIncident types.Type
func (m ListOfRefOfIncident) TypeRef() types.TypeRef {
func (m ListOfRefOfIncident) Type() types.Type {
return __typeRefForListOfRefOfIncident
}
@@ -476,11 +476,11 @@ func (r RefOfIncident) Ref() ref.Ref {
}
func (r RefOfIncident) Equals(other types.Value) bool {
return other != nil && __typeRefForRefOfIncident.Equals(other.TypeRef()) && r.Ref() == other.Ref()
return other != nil && __typeRefForRefOfIncident.Equals(other.Type()) && r.Ref() == other.Ref()
}
func (r RefOfIncident) Chunks() (chunks []ref.Ref) {
chunks = append(chunks, r.TypeRef().Chunks()...)
chunks = append(chunks, r.Type().Chunks()...)
chunks = append(chunks, r.target)
return
}
@@ -490,9 +490,9 @@ func (r RefOfIncident) ChildValues() []types.Value {
}
// A Noms Value that describes RefOfIncident.
var __typeRefForRefOfIncident types.TypeRef
var __typeRefForRefOfIncident types.Type
func (m RefOfIncident) TypeRef() types.TypeRef {
func (m RefOfIncident) Type() types.Type {
return __typeRefForRefOfIncident
}

View File

@@ -13,7 +13,7 @@ var __commonPackageInFile_photo_CachedRef ref.Ref
// package implemented by this file and registers it with the global
// type package definition cache.
func init() {
p := types.NewPackage([]types.TypeRef{
p := types.NewPackage([]types.Type{
types.MakeStructTypeRef("RemotePhoto",
[]types.Field{
types.Field{"Id", types.MakePrimitiveTypeRef(types.StringKind), false},
@@ -95,9 +95,9 @@ func (s RemotePhoto) Def() (d RemotePhotoDef) {
return
}
var __typeRefForRemotePhoto types.TypeRef
var __typeRefForRemotePhoto types.Type
func (m RemotePhoto) TypeRef() types.TypeRef {
func (m RemotePhoto) Type() types.Type {
return __typeRefForRemotePhoto
}
@@ -137,7 +137,7 @@ func readerForRemotePhoto(v types.Value) []types.Value {
}
func (s RemotePhoto) Equals(other types.Value) bool {
return other != nil && __typeRefForRemotePhoto.Equals(other.TypeRef()) && s.Ref() == other.Ref()
return other != nil && __typeRefForRemotePhoto.Equals(other.Type()) && s.Ref() == other.Ref()
}
func (s RemotePhoto) Ref() ref.Ref {
@@ -259,9 +259,9 @@ func (s Size) Def() (d SizeDef) {
return
}
var __typeRefForSize types.TypeRef
var __typeRefForSize types.Type
func (m Size) TypeRef() types.TypeRef {
func (m Size) Type() types.Type {
return __typeRefForSize
}
@@ -289,7 +289,7 @@ func readerForSize(v types.Value) []types.Value {
}
func (s Size) Equals(other types.Value) bool {
return other != nil && __typeRefForSize.Equals(other.TypeRef()) && s.Ref() == other.Ref()
return other != nil && __typeRefForSize.Equals(other.Type()) && s.Ref() == other.Ref()
}
func (s Size) Ref() ref.Ref {
@@ -358,7 +358,7 @@ func (m MapOfSizeToString) Def() MapOfSizeToStringDef {
}
func (m MapOfSizeToString) Equals(other types.Value) bool {
return other != nil && __typeRefForMapOfSizeToString.Equals(other.TypeRef()) && m.Ref() == other.Ref()
return other != nil && __typeRefForMapOfSizeToString.Equals(other.Type()) && m.Ref() == other.Ref()
}
func (m MapOfSizeToString) Ref() ref.Ref {
@@ -366,7 +366,7 @@ func (m MapOfSizeToString) Ref() ref.Ref {
}
func (m MapOfSizeToString) Chunks() (chunks []ref.Ref) {
chunks = append(chunks, m.TypeRef().Chunks()...)
chunks = append(chunks, m.Type().Chunks()...)
chunks = append(chunks, m.m.Chunks()...)
return
}
@@ -376,9 +376,9 @@ func (m MapOfSizeToString) ChildValues() []types.Value {
}
// A Noms Value that describes MapOfSizeToString.
var __typeRefForMapOfSizeToString types.TypeRef
var __typeRefForMapOfSizeToString types.Type
func (m MapOfSizeToString) TypeRef() types.TypeRef {
func (m MapOfSizeToString) Type() types.Type {
return __typeRefForMapOfSizeToString
}
@@ -445,6 +445,12 @@ func (m MapOfSizeToString) IterAll(cb MapOfSizeToStringIterAllCallback) {
})
}
func (m MapOfSizeToString) IterAllP(concurrency int, cb MapOfSizeToStringIterAllCallback) {
m.m.IterAllP(concurrency, func(k, v types.Value) {
cb(k.(Size), v.(types.String).String())
})
}
type MapOfSizeToStringFilterCallback func(k Size, v string) (keep bool)
func (m MapOfSizeToString) Filter(cb MapOfSizeToStringFilterCallback) MapOfSizeToString {
@@ -487,7 +493,7 @@ func (s SetOfString) Def() SetOfStringDef {
}
func (s SetOfString) Equals(other types.Value) bool {
return other != nil && __typeRefForSetOfString.Equals(other.TypeRef()) && s.Ref() == other.Ref()
return other != nil && __typeRefForSetOfString.Equals(other.Type()) && s.Ref() == other.Ref()
}
func (s SetOfString) Ref() ref.Ref {
@@ -495,7 +501,7 @@ func (s SetOfString) Ref() ref.Ref {
}
func (s SetOfString) Chunks() (chunks []ref.Ref) {
chunks = append(chunks, s.TypeRef().Chunks()...)
chunks = append(chunks, s.Type().Chunks()...)
chunks = append(chunks, s.s.Chunks()...)
return
}
@@ -505,9 +511,9 @@ func (s SetOfString) ChildValues() []types.Value {
}
// A Noms Value that describes SetOfString.
var __typeRefForSetOfString types.TypeRef
var __typeRefForSetOfString types.Type
func (m SetOfString) TypeRef() types.TypeRef {
func (m SetOfString) Type() types.Type {
return __typeRefForSetOfString
}

View File

@@ -14,7 +14,7 @@ var __commonPackageInFile_quad_tree_CachedRef ref.Ref
// package implemented by this file and registers it with the global
// type package definition cache.
func init() {
p := types.NewPackage([]types.TypeRef{
p := types.NewPackage([]types.Type{
types.MakeStructTypeRef("Node",
[]types.Field{
types.Field{"Geoposition", types.MakeTypeRef(ref.Parse("sha1-6d5e1c54214264058be9f61f4b4ece0368c8c678"), 0), false},
@@ -87,9 +87,9 @@ func (s Node) Def() (d NodeDef) {
return
}
var __typeRefForNode types.TypeRef
var __typeRefForNode types.Type
func (m Node) TypeRef() types.TypeRef {
func (m Node) Type() types.Type {
return __typeRefForNode
}
@@ -117,7 +117,7 @@ func readerForNode(v types.Value) []types.Value {
}
func (s Node) Equals(other types.Value) bool {
return other != nil && __typeRefForNode.Equals(other.TypeRef()) && s.Ref() == other.Ref()
return other != nil && __typeRefForNode.Equals(other.Type()) && s.Ref() == other.Ref()
}
func (s Node) Ref() ref.Ref {
@@ -214,9 +214,9 @@ func (s QuadTree) Def() (d QuadTreeDef) {
return
}
var __typeRefForQuadTree types.TypeRef
var __typeRefForQuadTree types.Type
func (m QuadTree) TypeRef() types.TypeRef {
func (m QuadTree) Type() types.Type {
return __typeRefForQuadTree
}
@@ -256,7 +256,7 @@ func readerForQuadTree(v types.Value) []types.Value {
}
func (s QuadTree) Equals(other types.Value) bool {
return other != nil && __typeRefForQuadTree.Equals(other.TypeRef()) && s.Ref() == other.Ref()
return other != nil && __typeRefForQuadTree.Equals(other.Type()) && s.Ref() == other.Ref()
}
func (s QuadTree) Ref() ref.Ref {
@@ -398,9 +398,9 @@ func (s SQuadTree) Def() (d SQuadTreeDef) {
return
}
var __typeRefForSQuadTree types.TypeRef
var __typeRefForSQuadTree types.Type
func (m SQuadTree) TypeRef() types.TypeRef {
func (m SQuadTree) Type() types.Type {
return __typeRefForSQuadTree
}
@@ -440,7 +440,7 @@ func readerForSQuadTree(v types.Value) []types.Value {
}
func (s SQuadTree) Equals(other types.Value) bool {
return other != nil && __typeRefForSQuadTree.Equals(other.TypeRef()) && s.Ref() == other.Ref()
return other != nil && __typeRefForSQuadTree.Equals(other.Type()) && s.Ref() == other.Ref()
}
func (s SQuadTree) Ref() ref.Ref {
@@ -545,11 +545,11 @@ func (r RefOfValue) Ref() ref.Ref {
}
func (r RefOfValue) Equals(other types.Value) bool {
return other != nil && __typeRefForRefOfValue.Equals(other.TypeRef()) && r.Ref() == other.Ref()
return other != nil && __typeRefForRefOfValue.Equals(other.Type()) && r.Ref() == other.Ref()
}
func (r RefOfValue) Chunks() (chunks []ref.Ref) {
chunks = append(chunks, r.TypeRef().Chunks()...)
chunks = append(chunks, r.Type().Chunks()...)
chunks = append(chunks, r.target)
return
}
@@ -559,9 +559,9 @@ func (r RefOfValue) ChildValues() []types.Value {
}
// A Noms Value that describes RefOfValue.
var __typeRefForRefOfValue types.TypeRef
var __typeRefForRefOfValue types.Type
func (m RefOfValue) TypeRef() types.TypeRef {
func (m RefOfValue) Type() types.Type {
return __typeRefForRefOfValue
}
@@ -612,7 +612,7 @@ func (l ListOfNode) Def() ListOfNodeDef {
}
func (l ListOfNode) Equals(other types.Value) bool {
return other != nil && __typeRefForListOfNode.Equals(other.TypeRef()) && l.Ref() == other.Ref()
return other != nil && __typeRefForListOfNode.Equals(other.Type()) && l.Ref() == other.Ref()
}
func (l ListOfNode) Ref() ref.Ref {
@@ -620,7 +620,7 @@ func (l ListOfNode) Ref() ref.Ref {
}
func (l ListOfNode) Chunks() (chunks []ref.Ref) {
chunks = append(chunks, l.TypeRef().Chunks()...)
chunks = append(chunks, l.Type().Chunks()...)
chunks = append(chunks, l.l.Chunks()...)
return
}
@@ -630,9 +630,9 @@ func (l ListOfNode) ChildValues() []types.Value {
}
// A Noms Value that describes ListOfNode.
var __typeRefForListOfNode types.TypeRef
var __typeRefForListOfNode types.Type
func (m ListOfNode) TypeRef() types.TypeRef {
func (m ListOfNode) Type() types.Type {
return __typeRefForListOfNode
}
@@ -755,7 +755,7 @@ func (m MapOfStringToQuadTree) Def() MapOfStringToQuadTreeDef {
}
func (m MapOfStringToQuadTree) Equals(other types.Value) bool {
return other != nil && __typeRefForMapOfStringToQuadTree.Equals(other.TypeRef()) && m.Ref() == other.Ref()
return other != nil && __typeRefForMapOfStringToQuadTree.Equals(other.Type()) && m.Ref() == other.Ref()
}
func (m MapOfStringToQuadTree) Ref() ref.Ref {
@@ -763,7 +763,7 @@ func (m MapOfStringToQuadTree) Ref() ref.Ref {
}
func (m MapOfStringToQuadTree) Chunks() (chunks []ref.Ref) {
chunks = append(chunks, m.TypeRef().Chunks()...)
chunks = append(chunks, m.Type().Chunks()...)
chunks = append(chunks, m.m.Chunks()...)
return
}
@@ -773,9 +773,9 @@ func (m MapOfStringToQuadTree) ChildValues() []types.Value {
}
// A Noms Value that describes MapOfStringToQuadTree.
var __typeRefForMapOfStringToQuadTree types.TypeRef
var __typeRefForMapOfStringToQuadTree types.Type
func (m MapOfStringToQuadTree) TypeRef() types.TypeRef {
func (m MapOfStringToQuadTree) Type() types.Type {
return __typeRefForMapOfStringToQuadTree
}
@@ -842,6 +842,12 @@ func (m MapOfStringToQuadTree) IterAll(cb MapOfStringToQuadTreeIterAllCallback)
})
}
func (m MapOfStringToQuadTree) IterAllP(concurrency int, cb MapOfStringToQuadTreeIterAllCallback) {
m.m.IterAllP(concurrency, func(k, v types.Value) {
cb(k.(types.String).String(), v.(QuadTree))
})
}
type MapOfStringToQuadTreeFilterCallback func(k string, v QuadTree) (keep bool)
func (m MapOfStringToQuadTree) Filter(cb MapOfStringToQuadTreeFilterCallback) MapOfStringToQuadTree {
@@ -881,7 +887,7 @@ func (l ListOfRefOfValue) Def() ListOfRefOfValueDef {
}
func (l ListOfRefOfValue) Equals(other types.Value) bool {
return other != nil && __typeRefForListOfRefOfValue.Equals(other.TypeRef()) && l.Ref() == other.Ref()
return other != nil && __typeRefForListOfRefOfValue.Equals(other.Type()) && l.Ref() == other.Ref()
}
func (l ListOfRefOfValue) Ref() ref.Ref {
@@ -889,7 +895,7 @@ func (l ListOfRefOfValue) Ref() ref.Ref {
}
func (l ListOfRefOfValue) Chunks() (chunks []ref.Ref) {
chunks = append(chunks, l.TypeRef().Chunks()...)
chunks = append(chunks, l.Type().Chunks()...)
chunks = append(chunks, l.l.Chunks()...)
return
}
@@ -899,9 +905,9 @@ func (l ListOfRefOfValue) ChildValues() []types.Value {
}
// A Noms Value that describes ListOfRefOfValue.
var __typeRefForListOfRefOfValue types.TypeRef
var __typeRefForListOfRefOfValue types.Type
func (m ListOfRefOfValue) TypeRef() types.TypeRef {
func (m ListOfRefOfValue) Type() types.Type {
return __typeRefForListOfRefOfValue
}
@@ -1024,7 +1030,7 @@ func (m MapOfStringToRefOfSQuadTree) Def() MapOfStringToRefOfSQuadTreeDef {
}
func (m MapOfStringToRefOfSQuadTree) Equals(other types.Value) bool {
return other != nil && __typeRefForMapOfStringToRefOfSQuadTree.Equals(other.TypeRef()) && m.Ref() == other.Ref()
return other != nil && __typeRefForMapOfStringToRefOfSQuadTree.Equals(other.Type()) && m.Ref() == other.Ref()
}
func (m MapOfStringToRefOfSQuadTree) Ref() ref.Ref {
@@ -1032,7 +1038,7 @@ func (m MapOfStringToRefOfSQuadTree) Ref() ref.Ref {
}
func (m MapOfStringToRefOfSQuadTree) Chunks() (chunks []ref.Ref) {
chunks = append(chunks, m.TypeRef().Chunks()...)
chunks = append(chunks, m.Type().Chunks()...)
chunks = append(chunks, m.m.Chunks()...)
return
}
@@ -1042,9 +1048,9 @@ func (m MapOfStringToRefOfSQuadTree) ChildValues() []types.Value {
}
// A Noms Value that describes MapOfStringToRefOfSQuadTree.
var __typeRefForMapOfStringToRefOfSQuadTree types.TypeRef
var __typeRefForMapOfStringToRefOfSQuadTree types.Type
func (m MapOfStringToRefOfSQuadTree) TypeRef() types.TypeRef {
func (m MapOfStringToRefOfSQuadTree) Type() types.Type {
return __typeRefForMapOfStringToRefOfSQuadTree
}
@@ -1111,6 +1117,12 @@ func (m MapOfStringToRefOfSQuadTree) IterAll(cb MapOfStringToRefOfSQuadTreeIterA
})
}
func (m MapOfStringToRefOfSQuadTree) IterAllP(concurrency int, cb MapOfStringToRefOfSQuadTreeIterAllCallback) {
m.m.IterAllP(concurrency, func(k, v types.Value) {
cb(k.(types.String).String(), v.(RefOfSQuadTree))
})
}
type MapOfStringToRefOfSQuadTreeFilterCallback func(k string, v RefOfSQuadTree) (keep bool)
func (m MapOfStringToRefOfSQuadTree) Filter(cb MapOfStringToRefOfSQuadTreeFilterCallback) MapOfStringToRefOfSQuadTree {
@@ -1140,11 +1152,11 @@ func (r RefOfSQuadTree) Ref() ref.Ref {
}
func (r RefOfSQuadTree) Equals(other types.Value) bool {
return other != nil && __typeRefForRefOfSQuadTree.Equals(other.TypeRef()) && r.Ref() == other.Ref()
return other != nil && __typeRefForRefOfSQuadTree.Equals(other.Type()) && r.Ref() == other.Ref()
}
func (r RefOfSQuadTree) Chunks() (chunks []ref.Ref) {
chunks = append(chunks, r.TypeRef().Chunks()...)
chunks = append(chunks, r.Type().Chunks()...)
chunks = append(chunks, r.target)
return
}
@@ -1154,9 +1166,9 @@ func (r RefOfSQuadTree) ChildValues() []types.Value {
}
// A Noms Value that describes RefOfSQuadTree.
var __typeRefForRefOfSQuadTree types.TypeRef
var __typeRefForRefOfSQuadTree types.Type
func (m RefOfSQuadTree) TypeRef() types.TypeRef {
func (m RefOfSQuadTree) Type() types.Type {
return __typeRefForRefOfSQuadTree
}

View File

@@ -13,7 +13,7 @@ var __mainPackageInFile_sha1_00419eb_CachedRef ref.Ref
// package implemented by this file and registers it with the global
// type package definition cache.
func init() {
p := types.NewPackage([]types.TypeRef{
p := types.NewPackage([]types.Type{
types.MakeStructTypeRef("RemotePhoto",
[]types.Field{
types.Field{"Id", types.MakePrimitiveTypeRef(types.StringKind), false},
@@ -95,9 +95,9 @@ func (s RemotePhoto) Def() (d RemotePhotoDef) {
return
}
var __typeRefForRemotePhoto types.TypeRef
var __typeRefForRemotePhoto types.Type
func (m RemotePhoto) TypeRef() types.TypeRef {
func (m RemotePhoto) Type() types.Type {
return __typeRefForRemotePhoto
}
@@ -137,7 +137,7 @@ func readerForRemotePhoto(v types.Value) []types.Value {
}
func (s RemotePhoto) Equals(other types.Value) bool {
return other != nil && __typeRefForRemotePhoto.Equals(other.TypeRef()) && s.Ref() == other.Ref()
return other != nil && __typeRefForRemotePhoto.Equals(other.Type()) && s.Ref() == other.Ref()
}
func (s RemotePhoto) Ref() ref.Ref {
@@ -259,9 +259,9 @@ func (s Size) Def() (d SizeDef) {
return
}
var __typeRefForSize types.TypeRef
var __typeRefForSize types.Type
func (m Size) TypeRef() types.TypeRef {
func (m Size) Type() types.Type {
return __typeRefForSize
}
@@ -289,7 +289,7 @@ func readerForSize(v types.Value) []types.Value {
}
func (s Size) Equals(other types.Value) bool {
return other != nil && __typeRefForSize.Equals(other.TypeRef()) && s.Ref() == other.Ref()
return other != nil && __typeRefForSize.Equals(other.Type()) && s.Ref() == other.Ref()
}
func (s Size) Ref() ref.Ref {
@@ -358,7 +358,7 @@ func (m MapOfSizeToString) Def() MapOfSizeToStringDef {
}
func (m MapOfSizeToString) Equals(other types.Value) bool {
return other != nil && __typeRefForMapOfSizeToString.Equals(other.TypeRef()) && m.Ref() == other.Ref()
return other != nil && __typeRefForMapOfSizeToString.Equals(other.Type()) && m.Ref() == other.Ref()
}
func (m MapOfSizeToString) Ref() ref.Ref {
@@ -366,7 +366,7 @@ func (m MapOfSizeToString) Ref() ref.Ref {
}
func (m MapOfSizeToString) Chunks() (chunks []ref.Ref) {
chunks = append(chunks, m.TypeRef().Chunks()...)
chunks = append(chunks, m.Type().Chunks()...)
chunks = append(chunks, m.m.Chunks()...)
return
}
@@ -376,9 +376,9 @@ func (m MapOfSizeToString) ChildValues() []types.Value {
}
// A Noms Value that describes MapOfSizeToString.
var __typeRefForMapOfSizeToString types.TypeRef
var __typeRefForMapOfSizeToString types.Type
func (m MapOfSizeToString) TypeRef() types.TypeRef {
func (m MapOfSizeToString) Type() types.Type {
return __typeRefForMapOfSizeToString
}
@@ -445,6 +445,12 @@ func (m MapOfSizeToString) IterAll(cb MapOfSizeToStringIterAllCallback) {
})
}
func (m MapOfSizeToString) IterAllP(concurrency int, cb MapOfSizeToStringIterAllCallback) {
m.m.IterAllP(concurrency, func(k, v types.Value) {
cb(k.(Size), v.(types.String).String())
})
}
type MapOfSizeToStringFilterCallback func(k Size, v string) (keep bool)
func (m MapOfSizeToString) Filter(cb MapOfSizeToStringFilterCallback) MapOfSizeToString {
@@ -487,7 +493,7 @@ func (s SetOfString) Def() SetOfStringDef {
}
func (s SetOfString) Equals(other types.Value) bool {
return other != nil && __typeRefForSetOfString.Equals(other.TypeRef()) && s.Ref() == other.Ref()
return other != nil && __typeRefForSetOfString.Equals(other.Type()) && s.Ref() == other.Ref()
}
func (s SetOfString) Ref() ref.Ref {
@@ -495,7 +501,7 @@ func (s SetOfString) Ref() ref.Ref {
}
func (s SetOfString) Chunks() (chunks []ref.Ref) {
chunks = append(chunks, s.TypeRef().Chunks()...)
chunks = append(chunks, s.Type().Chunks()...)
chunks = append(chunks, s.s.Chunks()...)
return
}
@@ -505,9 +511,9 @@ func (s SetOfString) ChildValues() []types.Value {
}
// A Noms Value that describes SetOfString.
var __typeRefForSetOfString types.TypeRef
var __typeRefForSetOfString types.Type
func (m SetOfString) TypeRef() types.TypeRef {
func (m SetOfString) Type() types.Type {
return __typeRefForSetOfString
}

View File

@@ -13,7 +13,7 @@ var __mainPackageInFile_sha1_6d5e1c5_CachedRef ref.Ref
// package implemented by this file and registers it with the global
// type package definition cache.
func init() {
p := types.NewPackage([]types.TypeRef{
p := types.NewPackage([]types.Type{
types.MakeStructTypeRef("Geoposition",
[]types.Field{
types.Field{"Latitude", types.MakePrimitiveTypeRef(types.Float32Kind), false},
@@ -69,9 +69,9 @@ func (s Geoposition) Def() (d GeopositionDef) {
return
}
var __typeRefForGeoposition types.TypeRef
var __typeRefForGeoposition types.Type
func (m Geoposition) TypeRef() types.TypeRef {
func (m Geoposition) Type() types.Type {
return __typeRefForGeoposition
}
@@ -99,7 +99,7 @@ func readerForGeoposition(v types.Value) []types.Value {
}
func (s Geoposition) Equals(other types.Value) bool {
return other != nil && __typeRefForGeoposition.Equals(other.TypeRef()) && s.Ref() == other.Ref()
return other != nil && __typeRefForGeoposition.Equals(other.Type()) && s.Ref() == other.Ref()
}
func (s Geoposition) Ref() ref.Ref {
@@ -174,9 +174,9 @@ func (s Georectangle) Def() (d GeorectangleDef) {
return
}
var __typeRefForGeorectangle types.TypeRef
var __typeRefForGeorectangle types.Type
func (m Georectangle) TypeRef() types.TypeRef {
func (m Georectangle) Type() types.Type {
return __typeRefForGeorectangle
}
@@ -204,7 +204,7 @@ func readerForGeorectangle(v types.Value) []types.Value {
}
func (s Georectangle) Equals(other types.Value) bool {
return other != nil && __typeRefForGeorectangle.Equals(other.TypeRef()) && s.Ref() == other.Ref()
return other != nil && __typeRefForGeorectangle.Equals(other.Type()) && s.Ref() == other.Ref()
}
func (s Georectangle) Ref() ref.Ref {

View File

@@ -14,7 +14,7 @@ var __mainPackageInFile_types_CachedRef ref.Ref
// package implemented by this file and registers it with the global
// type package definition cache.
func init() {
p := types.NewPackage([]types.TypeRef{
p := types.NewPackage([]types.Type{
types.MakeStructTypeRef("User",
[]types.Field{
types.Field{"Id", types.MakePrimitiveTypeRef(types.StringKind), false},
@@ -91,9 +91,9 @@ func (s User) Def() (d UserDef) {
return
}
var __typeRefForUser types.TypeRef
var __typeRefForUser types.Type
func (m User) TypeRef() types.TypeRef {
func (m User) Type() types.Type {
return __typeRefForUser
}
@@ -130,7 +130,7 @@ func readerForUser(v types.Value) []types.Value {
}
func (s User) Equals(other types.Value) bool {
return other != nil && __typeRefForUser.Equals(other.TypeRef()) && s.Ref() == other.Ref()
return other != nil && __typeRefForUser.Equals(other.Type()) && s.Ref() == other.Ref()
}
func (s User) Ref() ref.Ref {
@@ -244,9 +244,9 @@ func (s Album) Def() (d AlbumDef) {
return
}
var __typeRefForAlbum types.TypeRef
var __typeRefForAlbum types.Type
func (m Album) TypeRef() types.TypeRef {
func (m Album) Type() types.Type {
return __typeRefForAlbum
}
@@ -277,7 +277,7 @@ func readerForAlbum(v types.Value) []types.Value {
}
func (s Album) Equals(other types.Value) bool {
return other != nil && __typeRefForAlbum.Equals(other.TypeRef()) && s.Ref() == other.Ref()
return other != nil && __typeRefForAlbum.Equals(other.Type()) && s.Ref() == other.Ref()
}
func (s Album) Ref() ref.Ref {
@@ -358,7 +358,7 @@ func (m MapOfStringToAlbum) Def() MapOfStringToAlbumDef {
}
func (m MapOfStringToAlbum) Equals(other types.Value) bool {
return other != nil && __typeRefForMapOfStringToAlbum.Equals(other.TypeRef()) && m.Ref() == other.Ref()
return other != nil && __typeRefForMapOfStringToAlbum.Equals(other.Type()) && m.Ref() == other.Ref()
}
func (m MapOfStringToAlbum) Ref() ref.Ref {
@@ -366,7 +366,7 @@ func (m MapOfStringToAlbum) Ref() ref.Ref {
}
func (m MapOfStringToAlbum) Chunks() (chunks []ref.Ref) {
chunks = append(chunks, m.TypeRef().Chunks()...)
chunks = append(chunks, m.Type().Chunks()...)
chunks = append(chunks, m.m.Chunks()...)
return
}
@@ -376,9 +376,9 @@ func (m MapOfStringToAlbum) ChildValues() []types.Value {
}
// A Noms Value that describes MapOfStringToAlbum.
var __typeRefForMapOfStringToAlbum types.TypeRef
var __typeRefForMapOfStringToAlbum types.Type
func (m MapOfStringToAlbum) TypeRef() types.TypeRef {
func (m MapOfStringToAlbum) Type() types.Type {
return __typeRefForMapOfStringToAlbum
}
@@ -445,6 +445,12 @@ func (m MapOfStringToAlbum) IterAll(cb MapOfStringToAlbumIterAllCallback) {
})
}
func (m MapOfStringToAlbum) IterAllP(concurrency int, cb MapOfStringToAlbumIterAllCallback) {
m.m.IterAllP(concurrency, func(k, v types.Value) {
cb(k.(types.String).String(), v.(Album))
})
}
type MapOfStringToAlbumFilterCallback func(k string, v Album) (keep bool)
func (m MapOfStringToAlbum) Filter(cb MapOfStringToAlbumFilterCallback) MapOfStringToAlbum {
@@ -474,11 +480,11 @@ func (r RefOfUser) Ref() ref.Ref {
}
func (r RefOfUser) Equals(other types.Value) bool {
return other != nil && __typeRefForRefOfUser.Equals(other.TypeRef()) && r.Ref() == other.Ref()
return other != nil && __typeRefForRefOfUser.Equals(other.Type()) && r.Ref() == other.Ref()
}
func (r RefOfUser) Chunks() (chunks []ref.Ref) {
chunks = append(chunks, r.TypeRef().Chunks()...)
chunks = append(chunks, r.Type().Chunks()...)
chunks = append(chunks, r.target)
return
}
@@ -488,9 +494,9 @@ func (r RefOfUser) ChildValues() []types.Value {
}
// A Noms Value that describes RefOfUser.
var __typeRefForRefOfUser types.TypeRef
var __typeRefForRefOfUser types.Type
func (m RefOfUser) TypeRef() types.TypeRef {
func (m RefOfUser) Type() types.Type {
return __typeRefForRefOfUser
}
@@ -531,11 +537,11 @@ func (r RefOfSetOfRefOfRemotePhoto) Ref() ref.Ref {
}
func (r RefOfSetOfRefOfRemotePhoto) Equals(other types.Value) bool {
return other != nil && __typeRefForRefOfSetOfRefOfRemotePhoto.Equals(other.TypeRef()) && r.Ref() == other.Ref()
return other != nil && __typeRefForRefOfSetOfRefOfRemotePhoto.Equals(other.Type()) && r.Ref() == other.Ref()
}
func (r RefOfSetOfRefOfRemotePhoto) Chunks() (chunks []ref.Ref) {
chunks = append(chunks, r.TypeRef().Chunks()...)
chunks = append(chunks, r.Type().Chunks()...)
chunks = append(chunks, r.target)
return
}
@@ -545,9 +551,9 @@ func (r RefOfSetOfRefOfRemotePhoto) ChildValues() []types.Value {
}
// A Noms Value that describes RefOfSetOfRefOfRemotePhoto.
var __typeRefForRefOfSetOfRefOfRemotePhoto types.TypeRef
var __typeRefForRefOfSetOfRefOfRemotePhoto types.Type
func (m RefOfSetOfRefOfRemotePhoto) TypeRef() types.TypeRef {
func (m RefOfSetOfRefOfRemotePhoto) Type() types.Type {
return __typeRefForRefOfSetOfRefOfRemotePhoto
}
@@ -601,7 +607,7 @@ func (s SetOfRefOfRemotePhoto) Def() SetOfRefOfRemotePhotoDef {
}
func (s SetOfRefOfRemotePhoto) Equals(other types.Value) bool {
return other != nil && __typeRefForSetOfRefOfRemotePhoto.Equals(other.TypeRef()) && s.Ref() == other.Ref()
return other != nil && __typeRefForSetOfRefOfRemotePhoto.Equals(other.Type()) && s.Ref() == other.Ref()
}
func (s SetOfRefOfRemotePhoto) Ref() ref.Ref {
@@ -609,7 +615,7 @@ func (s SetOfRefOfRemotePhoto) Ref() ref.Ref {
}
func (s SetOfRefOfRemotePhoto) Chunks() (chunks []ref.Ref) {
chunks = append(chunks, s.TypeRef().Chunks()...)
chunks = append(chunks, s.Type().Chunks()...)
chunks = append(chunks, s.s.Chunks()...)
return
}
@@ -619,9 +625,9 @@ func (s SetOfRefOfRemotePhoto) ChildValues() []types.Value {
}
// A Noms Value that describes SetOfRefOfRemotePhoto.
var __typeRefForSetOfRefOfRemotePhoto types.TypeRef
var __typeRefForSetOfRefOfRemotePhoto types.Type
func (m SetOfRefOfRemotePhoto) TypeRef() types.TypeRef {
func (m SetOfRefOfRemotePhoto) Type() types.Type {
return __typeRefForSetOfRefOfRemotePhoto
}
@@ -737,11 +743,11 @@ func (r RefOfRemotePhoto) Ref() ref.Ref {
}
func (r RefOfRemotePhoto) Equals(other types.Value) bool {
return other != nil && __typeRefForRefOfRemotePhoto.Equals(other.TypeRef()) && r.Ref() == other.Ref()
return other != nil && __typeRefForRefOfRemotePhoto.Equals(other.Type()) && r.Ref() == other.Ref()
}
func (r RefOfRemotePhoto) Chunks() (chunks []ref.Ref) {
chunks = append(chunks, r.TypeRef().Chunks()...)
chunks = append(chunks, r.Type().Chunks()...)
chunks = append(chunks, r.target)
return
}
@@ -751,9 +757,9 @@ func (r RefOfRemotePhoto) ChildValues() []types.Value {
}
// A Noms Value that describes RefOfRemotePhoto.
var __typeRefForRefOfRemotePhoto types.TypeRef
var __typeRefForRefOfRemotePhoto types.Type
func (m RefOfRemotePhoto) TypeRef() types.TypeRef {
func (m RefOfRemotePhoto) Type() types.Type {
return __typeRefForRefOfRemotePhoto
}

View File

@@ -13,7 +13,7 @@ var __mainPackageInFile_types_CachedRef ref.Ref
// package implemented by this file and registers it with the global
// type package definition cache.
func init() {
p := types.NewPackage([]types.TypeRef{
p := types.NewPackage([]types.Type{
types.MakeStructTypeRef("Song",
[]types.Field{
types.Field{"Title", types.MakePrimitiveTypeRef(types.StringKind), false},
@@ -80,9 +80,9 @@ func (s Song) Def() (d SongDef) {
return
}
var __typeRefForSong types.TypeRef
var __typeRefForSong types.Type
func (m Song) TypeRef() types.TypeRef {
func (m Song) Type() types.Type {
return __typeRefForSong
}
@@ -119,7 +119,7 @@ func readerForSong(v types.Value) []types.Value {
}
func (s Song) Equals(other types.Value) bool {
return other != nil && __typeRefForSong.Equals(other.TypeRef()) && s.Ref() == other.Ref()
return other != nil && __typeRefForSong.Equals(other.Type()) && s.Ref() == other.Ref()
}
func (s Song) Ref() ref.Ref {
@@ -221,7 +221,7 @@ func (l ListOfSong) Def() ListOfSongDef {
}
func (l ListOfSong) Equals(other types.Value) bool {
return other != nil && __typeRefForListOfSong.Equals(other.TypeRef()) && l.Ref() == other.Ref()
return other != nil && __typeRefForListOfSong.Equals(other.Type()) && l.Ref() == other.Ref()
}
func (l ListOfSong) Ref() ref.Ref {
@@ -229,7 +229,7 @@ func (l ListOfSong) Ref() ref.Ref {
}
func (l ListOfSong) Chunks() (chunks []ref.Ref) {
chunks = append(chunks, l.TypeRef().Chunks()...)
chunks = append(chunks, l.Type().Chunks()...)
chunks = append(chunks, l.l.Chunks()...)
return
}
@@ -239,9 +239,9 @@ func (l ListOfSong) ChildValues() []types.Value {
}
// A Noms Value that describes ListOfSong.
var __typeRefForListOfSong types.TypeRef
var __typeRefForListOfSong types.Type
func (m ListOfSong) TypeRef() types.TypeRef {
func (m ListOfSong) Type() types.Type {
return __typeRefForListOfSong
}

View File

@@ -14,7 +14,7 @@ var __mainPackageInFile_picasa_CachedRef ref.Ref
// package implemented by this file and registers it with the global
// type package definition cache.
func init() {
p := types.NewPackage([]types.TypeRef{
p := types.NewPackage([]types.Type{
types.MakeStructTypeRef("User",
[]types.Field{
types.Field{"Id", types.MakePrimitiveTypeRef(types.StringKind), false},
@@ -98,9 +98,9 @@ func (s User) Def() (d UserDef) {
return
}
var __typeRefForUser types.TypeRef
var __typeRefForUser types.Type
func (m User) TypeRef() types.TypeRef {
func (m User) Type() types.Type {
return __typeRefForUser
}
@@ -140,7 +140,7 @@ func readerForUser(v types.Value) []types.Value {
}
func (s User) Equals(other types.Value) bool {
return other != nil && __typeRefForUser.Equals(other.TypeRef()) && s.Ref() == other.Ref()
return other != nil && __typeRefForUser.Equals(other.Type()) && s.Ref() == other.Ref()
}
func (s User) Ref() ref.Ref {
@@ -270,9 +270,9 @@ func (s Album) Def() (d AlbumDef) {
return
}
var __typeRefForAlbum types.TypeRef
var __typeRefForAlbum types.Type
func (m Album) TypeRef() types.TypeRef {
func (m Album) Type() types.Type {
return __typeRefForAlbum
}
@@ -306,7 +306,7 @@ func readerForAlbum(v types.Value) []types.Value {
}
func (s Album) Equals(other types.Value) bool {
return other != nil && __typeRefForAlbum.Equals(other.TypeRef()) && s.Ref() == other.Ref()
return other != nil && __typeRefForAlbum.Equals(other.Type()) && s.Ref() == other.Ref()
}
func (s Album) Ref() ref.Ref {
@@ -398,7 +398,7 @@ func (m MapOfStringToAlbum) Def() MapOfStringToAlbumDef {
}
func (m MapOfStringToAlbum) Equals(other types.Value) bool {
return other != nil && __typeRefForMapOfStringToAlbum.Equals(other.TypeRef()) && m.Ref() == other.Ref()
return other != nil && __typeRefForMapOfStringToAlbum.Equals(other.Type()) && m.Ref() == other.Ref()
}
func (m MapOfStringToAlbum) Ref() ref.Ref {
@@ -406,7 +406,7 @@ func (m MapOfStringToAlbum) Ref() ref.Ref {
}
func (m MapOfStringToAlbum) Chunks() (chunks []ref.Ref) {
chunks = append(chunks, m.TypeRef().Chunks()...)
chunks = append(chunks, m.Type().Chunks()...)
chunks = append(chunks, m.m.Chunks()...)
return
}
@@ -416,9 +416,9 @@ func (m MapOfStringToAlbum) ChildValues() []types.Value {
}
// A Noms Value that describes MapOfStringToAlbum.
var __typeRefForMapOfStringToAlbum types.TypeRef
var __typeRefForMapOfStringToAlbum types.Type
func (m MapOfStringToAlbum) TypeRef() types.TypeRef {
func (m MapOfStringToAlbum) Type() types.Type {
return __typeRefForMapOfStringToAlbum
}
@@ -485,6 +485,12 @@ func (m MapOfStringToAlbum) IterAll(cb MapOfStringToAlbumIterAllCallback) {
})
}
func (m MapOfStringToAlbum) IterAllP(concurrency int, cb MapOfStringToAlbumIterAllCallback) {
m.m.IterAllP(concurrency, func(k, v types.Value) {
cb(k.(types.String).String(), v.(Album))
})
}
type MapOfStringToAlbumFilterCallback func(k string, v Album) (keep bool)
func (m MapOfStringToAlbum) Filter(cb MapOfStringToAlbumFilterCallback) MapOfStringToAlbum {
@@ -506,7 +512,7 @@ func NewSetOfRemotePhoto() SetOfRemotePhoto {
}
func (s SetOfRemotePhoto) Equals(other types.Value) bool {
return other != nil && __typeRefForSetOfRemotePhoto.Equals(other.TypeRef()) && s.Ref() == other.Ref()
return other != nil && __typeRefForSetOfRemotePhoto.Equals(other.Type()) && s.Ref() == other.Ref()
}
func (s SetOfRemotePhoto) Ref() ref.Ref {
@@ -514,7 +520,7 @@ func (s SetOfRemotePhoto) Ref() ref.Ref {
}
func (s SetOfRemotePhoto) Chunks() (chunks []ref.Ref) {
chunks = append(chunks, s.TypeRef().Chunks()...)
chunks = append(chunks, s.Type().Chunks()...)
chunks = append(chunks, s.s.Chunks()...)
return
}
@@ -524,9 +530,9 @@ func (s SetOfRemotePhoto) ChildValues() []types.Value {
}
// A Noms Value that describes SetOfRemotePhoto.
var __typeRefForSetOfRemotePhoto types.TypeRef
var __typeRefForSetOfRemotePhoto types.Type
func (m SetOfRemotePhoto) TypeRef() types.TypeRef {
func (m SetOfRemotePhoto) Type() types.Type {
return __typeRefForSetOfRemotePhoto
}
@@ -642,11 +648,11 @@ func (r RefOfUser) Ref() ref.Ref {
}
func (r RefOfUser) Equals(other types.Value) bool {
return other != nil && __typeRefForRefOfUser.Equals(other.TypeRef()) && r.Ref() == other.Ref()
return other != nil && __typeRefForRefOfUser.Equals(other.Type()) && r.Ref() == other.Ref()
}
func (r RefOfUser) Chunks() (chunks []ref.Ref) {
chunks = append(chunks, r.TypeRef().Chunks()...)
chunks = append(chunks, r.Type().Chunks()...)
chunks = append(chunks, r.target)
return
}
@@ -656,9 +662,9 @@ func (r RefOfUser) ChildValues() []types.Value {
}
// A Noms Value that describes RefOfUser.
var __typeRefForRefOfUser types.TypeRef
var __typeRefForRefOfUser types.Type
func (m RefOfUser) TypeRef() types.TypeRef {
func (m RefOfUser) Type() types.Type {
return __typeRefForRefOfUser
}
@@ -699,11 +705,11 @@ func (r RefOfSetOfRefOfRemotePhoto) Ref() ref.Ref {
}
func (r RefOfSetOfRefOfRemotePhoto) Equals(other types.Value) bool {
return other != nil && __typeRefForRefOfSetOfRefOfRemotePhoto.Equals(other.TypeRef()) && r.Ref() == other.Ref()
return other != nil && __typeRefForRefOfSetOfRefOfRemotePhoto.Equals(other.Type()) && r.Ref() == other.Ref()
}
func (r RefOfSetOfRefOfRemotePhoto) Chunks() (chunks []ref.Ref) {
chunks = append(chunks, r.TypeRef().Chunks()...)
chunks = append(chunks, r.Type().Chunks()...)
chunks = append(chunks, r.target)
return
}
@@ -713,9 +719,9 @@ func (r RefOfSetOfRefOfRemotePhoto) ChildValues() []types.Value {
}
// A Noms Value that describes RefOfSetOfRefOfRemotePhoto.
var __typeRefForRefOfSetOfRefOfRemotePhoto types.TypeRef
var __typeRefForRefOfSetOfRefOfRemotePhoto types.Type
func (m RefOfSetOfRefOfRemotePhoto) TypeRef() types.TypeRef {
func (m RefOfSetOfRefOfRemotePhoto) Type() types.Type {
return __typeRefForRefOfSetOfRefOfRemotePhoto
}
@@ -769,7 +775,7 @@ func (s SetOfRefOfRemotePhoto) Def() SetOfRefOfRemotePhotoDef {
}
func (s SetOfRefOfRemotePhoto) Equals(other types.Value) bool {
return other != nil && __typeRefForSetOfRefOfRemotePhoto.Equals(other.TypeRef()) && s.Ref() == other.Ref()
return other != nil && __typeRefForSetOfRefOfRemotePhoto.Equals(other.Type()) && s.Ref() == other.Ref()
}
func (s SetOfRefOfRemotePhoto) Ref() ref.Ref {
@@ -777,7 +783,7 @@ func (s SetOfRefOfRemotePhoto) Ref() ref.Ref {
}
func (s SetOfRefOfRemotePhoto) Chunks() (chunks []ref.Ref) {
chunks = append(chunks, s.TypeRef().Chunks()...)
chunks = append(chunks, s.Type().Chunks()...)
chunks = append(chunks, s.s.Chunks()...)
return
}
@@ -787,9 +793,9 @@ func (s SetOfRefOfRemotePhoto) ChildValues() []types.Value {
}
// A Noms Value that describes SetOfRefOfRemotePhoto.
var __typeRefForSetOfRefOfRemotePhoto types.TypeRef
var __typeRefForSetOfRefOfRemotePhoto types.Type
func (m SetOfRefOfRemotePhoto) TypeRef() types.TypeRef {
func (m SetOfRefOfRemotePhoto) Type() types.Type {
return __typeRefForSetOfRefOfRemotePhoto
}
@@ -905,11 +911,11 @@ func (r RefOfRemotePhoto) Ref() ref.Ref {
}
func (r RefOfRemotePhoto) Equals(other types.Value) bool {
return other != nil && __typeRefForRefOfRemotePhoto.Equals(other.TypeRef()) && r.Ref() == other.Ref()
return other != nil && __typeRefForRefOfRemotePhoto.Equals(other.Type()) && r.Ref() == other.Ref()
}
func (r RefOfRemotePhoto) Chunks() (chunks []ref.Ref) {
chunks = append(chunks, r.TypeRef().Chunks()...)
chunks = append(chunks, r.Type().Chunks()...)
chunks = append(chunks, r.target)
return
}
@@ -919,9 +925,9 @@ func (r RefOfRemotePhoto) ChildValues() []types.Value {
}
// A Noms Value that describes RefOfRemotePhoto.
var __typeRefForRefOfRemotePhoto types.TypeRef
var __typeRefForRefOfRemotePhoto types.Type
func (m RefOfRemotePhoto) TypeRef() types.TypeRef {
func (m RefOfRemotePhoto) Type() types.Type {
return __typeRefForRefOfRemotePhoto
}

View File

@@ -13,7 +13,7 @@ var __mainPackageInFile_sha1_00419eb_CachedRef ref.Ref
// package implemented by this file and registers it with the global
// type package definition cache.
func init() {
p := types.NewPackage([]types.TypeRef{
p := types.NewPackage([]types.Type{
types.MakeStructTypeRef("RemotePhoto",
[]types.Field{
types.Field{"Id", types.MakePrimitiveTypeRef(types.StringKind), false},
@@ -95,9 +95,9 @@ func (s RemotePhoto) Def() (d RemotePhotoDef) {
return
}
var __typeRefForRemotePhoto types.TypeRef
var __typeRefForRemotePhoto types.Type
func (m RemotePhoto) TypeRef() types.TypeRef {
func (m RemotePhoto) Type() types.Type {
return __typeRefForRemotePhoto
}
@@ -137,7 +137,7 @@ func readerForRemotePhoto(v types.Value) []types.Value {
}
func (s RemotePhoto) Equals(other types.Value) bool {
return other != nil && __typeRefForRemotePhoto.Equals(other.TypeRef()) && s.Ref() == other.Ref()
return other != nil && __typeRefForRemotePhoto.Equals(other.Type()) && s.Ref() == other.Ref()
}
func (s RemotePhoto) Ref() ref.Ref {
@@ -259,9 +259,9 @@ func (s Size) Def() (d SizeDef) {
return
}
var __typeRefForSize types.TypeRef
var __typeRefForSize types.Type
func (m Size) TypeRef() types.TypeRef {
func (m Size) Type() types.Type {
return __typeRefForSize
}
@@ -289,7 +289,7 @@ func readerForSize(v types.Value) []types.Value {
}
func (s Size) Equals(other types.Value) bool {
return other != nil && __typeRefForSize.Equals(other.TypeRef()) && s.Ref() == other.Ref()
return other != nil && __typeRefForSize.Equals(other.Type()) && s.Ref() == other.Ref()
}
func (s Size) Ref() ref.Ref {
@@ -358,7 +358,7 @@ func (m MapOfSizeToString) Def() MapOfSizeToStringDef {
}
func (m MapOfSizeToString) Equals(other types.Value) bool {
return other != nil && __typeRefForMapOfSizeToString.Equals(other.TypeRef()) && m.Ref() == other.Ref()
return other != nil && __typeRefForMapOfSizeToString.Equals(other.Type()) && m.Ref() == other.Ref()
}
func (m MapOfSizeToString) Ref() ref.Ref {
@@ -366,7 +366,7 @@ func (m MapOfSizeToString) Ref() ref.Ref {
}
func (m MapOfSizeToString) Chunks() (chunks []ref.Ref) {
chunks = append(chunks, m.TypeRef().Chunks()...)
chunks = append(chunks, m.Type().Chunks()...)
chunks = append(chunks, m.m.Chunks()...)
return
}
@@ -376,9 +376,9 @@ func (m MapOfSizeToString) ChildValues() []types.Value {
}
// A Noms Value that describes MapOfSizeToString.
var __typeRefForMapOfSizeToString types.TypeRef
var __typeRefForMapOfSizeToString types.Type
func (m MapOfSizeToString) TypeRef() types.TypeRef {
func (m MapOfSizeToString) Type() types.Type {
return __typeRefForMapOfSizeToString
}
@@ -445,6 +445,12 @@ func (m MapOfSizeToString) IterAll(cb MapOfSizeToStringIterAllCallback) {
})
}
func (m MapOfSizeToString) IterAllP(concurrency int, cb MapOfSizeToStringIterAllCallback) {
m.m.IterAllP(concurrency, func(k, v types.Value) {
cb(k.(Size), v.(types.String).String())
})
}
type MapOfSizeToStringFilterCallback func(k Size, v string) (keep bool)
func (m MapOfSizeToString) Filter(cb MapOfSizeToStringFilterCallback) MapOfSizeToString {
@@ -487,7 +493,7 @@ func (s SetOfString) Def() SetOfStringDef {
}
func (s SetOfString) Equals(other types.Value) bool {
return other != nil && __typeRefForSetOfString.Equals(other.TypeRef()) && s.Ref() == other.Ref()
return other != nil && __typeRefForSetOfString.Equals(other.Type()) && s.Ref() == other.Ref()
}
func (s SetOfString) Ref() ref.Ref {
@@ -495,7 +501,7 @@ func (s SetOfString) Ref() ref.Ref {
}
func (s SetOfString) Chunks() (chunks []ref.Ref) {
chunks = append(chunks, s.TypeRef().Chunks()...)
chunks = append(chunks, s.Type().Chunks()...)
chunks = append(chunks, s.s.Chunks()...)
return
}
@@ -505,9 +511,9 @@ func (s SetOfString) ChildValues() []types.Value {
}
// A Noms Value that describes SetOfString.
var __typeRefForSetOfString types.TypeRef
var __typeRefForSetOfString types.Type
func (m SetOfString) TypeRef() types.TypeRef {
func (m SetOfString) Type() types.Type {
return __typeRefForSetOfString
}

View File

@@ -13,7 +13,7 @@ var __mainPackageInFile_sha1_6d5e1c5_CachedRef ref.Ref
// package implemented by this file and registers it with the global
// type package definition cache.
func init() {
p := types.NewPackage([]types.TypeRef{
p := types.NewPackage([]types.Type{
types.MakeStructTypeRef("Geoposition",
[]types.Field{
types.Field{"Latitude", types.MakePrimitiveTypeRef(types.Float32Kind), false},
@@ -69,9 +69,9 @@ func (s Geoposition) Def() (d GeopositionDef) {
return
}
var __typeRefForGeoposition types.TypeRef
var __typeRefForGeoposition types.Type
func (m Geoposition) TypeRef() types.TypeRef {
func (m Geoposition) Type() types.Type {
return __typeRefForGeoposition
}
@@ -99,7 +99,7 @@ func readerForGeoposition(v types.Value) []types.Value {
}
func (s Geoposition) Equals(other types.Value) bool {
return other != nil && __typeRefForGeoposition.Equals(other.TypeRef()) && s.Ref() == other.Ref()
return other != nil && __typeRefForGeoposition.Equals(other.Type()) && s.Ref() == other.Ref()
}
func (s Geoposition) Ref() ref.Ref {
@@ -174,9 +174,9 @@ func (s Georectangle) Def() (d GeorectangleDef) {
return
}
var __typeRefForGeorectangle types.TypeRef
var __typeRefForGeorectangle types.Type
func (m Georectangle) TypeRef() types.TypeRef {
func (m Georectangle) Type() types.Type {
return __typeRefForGeorectangle
}
@@ -204,7 +204,7 @@ func readerForGeorectangle(v types.Value) []types.Value {
}
func (s Georectangle) Equals(other types.Value) bool {
return other != nil && __typeRefForGeorectangle.Equals(other.TypeRef()) && s.Ref() == other.Ref()
return other != nil && __typeRefForGeorectangle.Equals(other.Type()) && s.Ref() == other.Ref()
}
func (s Georectangle) Ref() ref.Ref {

View File

@@ -14,7 +14,7 @@ var __mainPackageInFile_types_CachedRef ref.Ref
// package implemented by this file and registers it with the global
// type package definition cache.
func init() {
p := types.NewPackage([]types.TypeRef{
p := types.NewPackage([]types.Type{
types.MakeStructTypeRef("Pitch",
[]types.Field{
types.Field{"X", types.MakePrimitiveTypeRef(types.Float64Kind), false},
@@ -63,9 +63,9 @@ func (s Pitch) Def() (d PitchDef) {
return
}
var __typeRefForPitch types.TypeRef
var __typeRefForPitch types.Type
func (m Pitch) TypeRef() types.TypeRef {
func (m Pitch) Type() types.Type {
return __typeRefForPitch
}
@@ -93,7 +93,7 @@ func readerForPitch(v types.Value) []types.Value {
}
func (s Pitch) Equals(other types.Value) bool {
return other != nil && __typeRefForPitch.Equals(other.TypeRef()) && s.Ref() == other.Ref()
return other != nil && __typeRefForPitch.Equals(other.Type()) && s.Ref() == other.Ref()
}
func (s Pitch) Ref() ref.Ref {
@@ -162,7 +162,7 @@ func (m MapOfStringToRefOfListOfPitch) Def() MapOfStringToRefOfListOfPitchDef {
}
func (m MapOfStringToRefOfListOfPitch) Equals(other types.Value) bool {
return other != nil && __typeRefForMapOfStringToRefOfListOfPitch.Equals(other.TypeRef()) && m.Ref() == other.Ref()
return other != nil && __typeRefForMapOfStringToRefOfListOfPitch.Equals(other.Type()) && m.Ref() == other.Ref()
}
func (m MapOfStringToRefOfListOfPitch) Ref() ref.Ref {
@@ -170,7 +170,7 @@ func (m MapOfStringToRefOfListOfPitch) Ref() ref.Ref {
}
func (m MapOfStringToRefOfListOfPitch) Chunks() (chunks []ref.Ref) {
chunks = append(chunks, m.TypeRef().Chunks()...)
chunks = append(chunks, m.Type().Chunks()...)
chunks = append(chunks, m.m.Chunks()...)
return
}
@@ -180,9 +180,9 @@ func (m MapOfStringToRefOfListOfPitch) ChildValues() []types.Value {
}
// A Noms Value that describes MapOfStringToRefOfListOfPitch.
var __typeRefForMapOfStringToRefOfListOfPitch types.TypeRef
var __typeRefForMapOfStringToRefOfListOfPitch types.Type
func (m MapOfStringToRefOfListOfPitch) TypeRef() types.TypeRef {
func (m MapOfStringToRefOfListOfPitch) Type() types.Type {
return __typeRefForMapOfStringToRefOfListOfPitch
}
@@ -294,7 +294,7 @@ func (l ListOfRefOfMapOfStringToValue) Def() ListOfRefOfMapOfStringToValueDef {
}
func (l ListOfRefOfMapOfStringToValue) Equals(other types.Value) bool {
return other != nil && __typeRefForListOfRefOfMapOfStringToValue.Equals(other.TypeRef()) && l.Ref() == other.Ref()
return other != nil && __typeRefForListOfRefOfMapOfStringToValue.Equals(other.Type()) && l.Ref() == other.Ref()
}
func (l ListOfRefOfMapOfStringToValue) Ref() ref.Ref {
@@ -302,7 +302,7 @@ func (l ListOfRefOfMapOfStringToValue) Ref() ref.Ref {
}
func (l ListOfRefOfMapOfStringToValue) Chunks() (chunks []ref.Ref) {
chunks = append(chunks, l.TypeRef().Chunks()...)
chunks = append(chunks, l.Type().Chunks()...)
chunks = append(chunks, l.l.Chunks()...)
return
}
@@ -312,9 +312,9 @@ func (l ListOfRefOfMapOfStringToValue) ChildValues() []types.Value {
}
// A Noms Value that describes ListOfRefOfMapOfStringToValue.
var __typeRefForListOfRefOfMapOfStringToValue types.TypeRef
var __typeRefForListOfRefOfMapOfStringToValue types.Type
func (m ListOfRefOfMapOfStringToValue) TypeRef() types.TypeRef {
func (m ListOfRefOfMapOfStringToValue) Type() types.Type {
return __typeRefForListOfRefOfMapOfStringToValue
}
@@ -426,11 +426,11 @@ func (r RefOfMapOfStringToValue) Ref() ref.Ref {
}
func (r RefOfMapOfStringToValue) Equals(other types.Value) bool {
return other != nil && __typeRefForRefOfMapOfStringToValue.Equals(other.TypeRef()) && r.Ref() == other.Ref()
return other != nil && __typeRefForRefOfMapOfStringToValue.Equals(other.Type()) && r.Ref() == other.Ref()
}
func (r RefOfMapOfStringToValue) Chunks() (chunks []ref.Ref) {
chunks = append(chunks, r.TypeRef().Chunks()...)
chunks = append(chunks, r.Type().Chunks()...)
chunks = append(chunks, r.target)
return
}
@@ -440,9 +440,9 @@ func (r RefOfMapOfStringToValue) ChildValues() []types.Value {
}
// A Noms Value that describes RefOfMapOfStringToValue.
var __typeRefForRefOfMapOfStringToValue types.TypeRef
var __typeRefForRefOfMapOfStringToValue types.Type
func (m RefOfMapOfStringToValue) TypeRef() types.TypeRef {
func (m RefOfMapOfStringToValue) Type() types.Type {
return __typeRefForRefOfMapOfStringToValue
}
@@ -494,7 +494,7 @@ func (m MapOfStringToValue) Def() MapOfStringToValueDef {
}
func (m MapOfStringToValue) Equals(other types.Value) bool {
return other != nil && __typeRefForMapOfStringToValue.Equals(other.TypeRef()) && m.Ref() == other.Ref()
return other != nil && __typeRefForMapOfStringToValue.Equals(other.Type()) && m.Ref() == other.Ref()
}
func (m MapOfStringToValue) Ref() ref.Ref {
@@ -502,7 +502,7 @@ func (m MapOfStringToValue) Ref() ref.Ref {
}
func (m MapOfStringToValue) Chunks() (chunks []ref.Ref) {
chunks = append(chunks, m.TypeRef().Chunks()...)
chunks = append(chunks, m.Type().Chunks()...)
chunks = append(chunks, m.m.Chunks()...)
return
}
@@ -512,9 +512,9 @@ func (m MapOfStringToValue) ChildValues() []types.Value {
}
// A Noms Value that describes MapOfStringToValue.
var __typeRefForMapOfStringToValue types.TypeRef
var __typeRefForMapOfStringToValue types.Type
func (m MapOfStringToValue) TypeRef() types.TypeRef {
func (m MapOfStringToValue) Type() types.Type {
return __typeRefForMapOfStringToValue
}
@@ -626,7 +626,7 @@ func (l ListOfPitch) Def() ListOfPitchDef {
}
func (l ListOfPitch) Equals(other types.Value) bool {
return other != nil && __typeRefForListOfPitch.Equals(other.TypeRef()) && l.Ref() == other.Ref()
return other != nil && __typeRefForListOfPitch.Equals(other.Type()) && l.Ref() == other.Ref()
}
func (l ListOfPitch) Ref() ref.Ref {
@@ -634,7 +634,7 @@ func (l ListOfPitch) Ref() ref.Ref {
}
func (l ListOfPitch) Chunks() (chunks []ref.Ref) {
chunks = append(chunks, l.TypeRef().Chunks()...)
chunks = append(chunks, l.Type().Chunks()...)
chunks = append(chunks, l.l.Chunks()...)
return
}
@@ -644,9 +644,9 @@ func (l ListOfPitch) ChildValues() []types.Value {
}
// A Noms Value that describes ListOfPitch.
var __typeRefForListOfPitch types.TypeRef
var __typeRefForListOfPitch types.Type
func (m ListOfPitch) TypeRef() types.TypeRef {
func (m ListOfPitch) Type() types.Type {
return __typeRefForListOfPitch
}
@@ -758,11 +758,11 @@ func (r RefOfListOfPitch) Ref() ref.Ref {
}
func (r RefOfListOfPitch) Equals(other types.Value) bool {
return other != nil && __typeRefForRefOfListOfPitch.Equals(other.TypeRef()) && r.Ref() == other.Ref()
return other != nil && __typeRefForRefOfListOfPitch.Equals(other.Type()) && r.Ref() == other.Ref()
}
func (r RefOfListOfPitch) Chunks() (chunks []ref.Ref) {
chunks = append(chunks, r.TypeRef().Chunks()...)
chunks = append(chunks, r.Type().Chunks()...)
chunks = append(chunks, r.target)
return
}
@@ -772,9 +772,9 @@ func (r RefOfListOfPitch) ChildValues() []types.Value {
}
// A Noms Value that describes RefOfListOfPitch.
var __typeRefForRefOfListOfPitch types.TypeRef
var __typeRefForRefOfListOfPitch types.Type
func (m RefOfListOfPitch) TypeRef() types.TypeRef {
func (m RefOfListOfPitch) Type() types.Type {
return __typeRefForRefOfListOfPitch
}

View File

@@ -23,7 +23,7 @@ var (
inputRefStr = flag.String("input-ref", "", "ref to list containing nodes")
outputDs = flag.String("output-ds", "", "dataset to store data in.")
quietFlag = flag.Bool("quiet", false, "suppress printing of progress statements")
geopositionTypeRef = common.NewGeoposition().TypeRef()
geopositionTypeRef = common.NewGeoposition().Type()
)
func main() {

View File

@@ -13,7 +13,7 @@ var __mainPackageInFile_sha1_00419eb_CachedRef ref.Ref
// package implemented by this file and registers it with the global
// type package definition cache.
func init() {
p := types.NewPackage([]types.TypeRef{
p := types.NewPackage([]types.Type{
types.MakeStructTypeRef("RemotePhoto",
[]types.Field{
types.Field{"Id", types.MakePrimitiveTypeRef(types.StringKind), false},
@@ -95,9 +95,9 @@ func (s RemotePhoto) Def() (d RemotePhotoDef) {
return
}
var __typeRefForRemotePhoto types.TypeRef
var __typeRefForRemotePhoto types.Type
func (m RemotePhoto) TypeRef() types.TypeRef {
func (m RemotePhoto) Type() types.Type {
return __typeRefForRemotePhoto
}
@@ -137,7 +137,7 @@ func readerForRemotePhoto(v types.Value) []types.Value {
}
func (s RemotePhoto) Equals(other types.Value) bool {
return other != nil && __typeRefForRemotePhoto.Equals(other.TypeRef()) && s.Ref() == other.Ref()
return other != nil && __typeRefForRemotePhoto.Equals(other.Type()) && s.Ref() == other.Ref()
}
func (s RemotePhoto) Ref() ref.Ref {
@@ -259,9 +259,9 @@ func (s Size) Def() (d SizeDef) {
return
}
var __typeRefForSize types.TypeRef
var __typeRefForSize types.Type
func (m Size) TypeRef() types.TypeRef {
func (m Size) Type() types.Type {
return __typeRefForSize
}
@@ -289,7 +289,7 @@ func readerForSize(v types.Value) []types.Value {
}
func (s Size) Equals(other types.Value) bool {
return other != nil && __typeRefForSize.Equals(other.TypeRef()) && s.Ref() == other.Ref()
return other != nil && __typeRefForSize.Equals(other.Type()) && s.Ref() == other.Ref()
}
func (s Size) Ref() ref.Ref {
@@ -358,7 +358,7 @@ func (m MapOfSizeToString) Def() MapOfSizeToStringDef {
}
func (m MapOfSizeToString) Equals(other types.Value) bool {
return other != nil && __typeRefForMapOfSizeToString.Equals(other.TypeRef()) && m.Ref() == other.Ref()
return other != nil && __typeRefForMapOfSizeToString.Equals(other.Type()) && m.Ref() == other.Ref()
}
func (m MapOfSizeToString) Ref() ref.Ref {
@@ -366,7 +366,7 @@ func (m MapOfSizeToString) Ref() ref.Ref {
}
func (m MapOfSizeToString) Chunks() (chunks []ref.Ref) {
chunks = append(chunks, m.TypeRef().Chunks()...)
chunks = append(chunks, m.Type().Chunks()...)
chunks = append(chunks, m.m.Chunks()...)
return
}
@@ -376,9 +376,9 @@ func (m MapOfSizeToString) ChildValues() []types.Value {
}
// A Noms Value that describes MapOfSizeToString.
var __typeRefForMapOfSizeToString types.TypeRef
var __typeRefForMapOfSizeToString types.Type
func (m MapOfSizeToString) TypeRef() types.TypeRef {
func (m MapOfSizeToString) Type() types.Type {
return __typeRefForMapOfSizeToString
}
@@ -445,6 +445,12 @@ func (m MapOfSizeToString) IterAll(cb MapOfSizeToStringIterAllCallback) {
})
}
func (m MapOfSizeToString) IterAllP(concurrency int, cb MapOfSizeToStringIterAllCallback) {
m.m.IterAllP(concurrency, func(k, v types.Value) {
cb(k.(Size), v.(types.String).String())
})
}
type MapOfSizeToStringFilterCallback func(k Size, v string) (keep bool)
func (m MapOfSizeToString) Filter(cb MapOfSizeToStringFilterCallback) MapOfSizeToString {
@@ -487,7 +493,7 @@ func (s SetOfString) Def() SetOfStringDef {
}
func (s SetOfString) Equals(other types.Value) bool {
return other != nil && __typeRefForSetOfString.Equals(other.TypeRef()) && s.Ref() == other.Ref()
return other != nil && __typeRefForSetOfString.Equals(other.Type()) && s.Ref() == other.Ref()
}
func (s SetOfString) Ref() ref.Ref {
@@ -495,7 +501,7 @@ func (s SetOfString) Ref() ref.Ref {
}
func (s SetOfString) Chunks() (chunks []ref.Ref) {
chunks = append(chunks, s.TypeRef().Chunks()...)
chunks = append(chunks, s.Type().Chunks()...)
chunks = append(chunks, s.s.Chunks()...)
return
}
@@ -505,9 +511,9 @@ func (s SetOfString) ChildValues() []types.Value {
}
// A Noms Value that describes SetOfString.
var __typeRefForSetOfString types.TypeRef
var __typeRefForSetOfString types.Type
func (m SetOfString) TypeRef() types.TypeRef {
func (m SetOfString) Type() types.Type {
return __typeRefForSetOfString
}

View File

@@ -13,7 +13,7 @@ var __mainPackageInFile_sha1_6d5e1c5_CachedRef ref.Ref
// package implemented by this file and registers it with the global
// type package definition cache.
func init() {
p := types.NewPackage([]types.TypeRef{
p := types.NewPackage([]types.Type{
types.MakeStructTypeRef("Geoposition",
[]types.Field{
types.Field{"Latitude", types.MakePrimitiveTypeRef(types.Float32Kind), false},
@@ -69,9 +69,9 @@ func (s Geoposition) Def() (d GeopositionDef) {
return
}
var __typeRefForGeoposition types.TypeRef
var __typeRefForGeoposition types.Type
func (m Geoposition) TypeRef() types.TypeRef {
func (m Geoposition) Type() types.Type {
return __typeRefForGeoposition
}
@@ -99,7 +99,7 @@ func readerForGeoposition(v types.Value) []types.Value {
}
func (s Geoposition) Equals(other types.Value) bool {
return other != nil && __typeRefForGeoposition.Equals(other.TypeRef()) && s.Ref() == other.Ref()
return other != nil && __typeRefForGeoposition.Equals(other.Type()) && s.Ref() == other.Ref()
}
func (s Geoposition) Ref() ref.Ref {
@@ -174,9 +174,9 @@ func (s Georectangle) Def() (d GeorectangleDef) {
return
}
var __typeRefForGeorectangle types.TypeRef
var __typeRefForGeorectangle types.Type
func (m Georectangle) TypeRef() types.TypeRef {
func (m Georectangle) Type() types.Type {
return __typeRefForGeorectangle
}
@@ -204,7 +204,7 @@ func readerForGeorectangle(v types.Value) []types.Value {
}
func (s Georectangle) Equals(other types.Value) bool {
return other != nil && __typeRefForGeorectangle.Equals(other.TypeRef()) && s.Ref() == other.Ref()
return other != nil && __typeRefForGeorectangle.Equals(other.Type()) && s.Ref() == other.Ref()
}
func (s Georectangle) Ref() ref.Ref {

View File

@@ -39,7 +39,7 @@ func (m MapOfStringToSetOfRefOfRemotePhoto) Def() MapOfStringToSetOfRefOfRemoteP
}
func (m MapOfStringToSetOfRefOfRemotePhoto) Equals(other types.Value) bool {
return other != nil && __typeRefForMapOfStringToSetOfRefOfRemotePhoto.Equals(other.TypeRef()) && m.Ref() == other.Ref()
return other != nil && __typeRefForMapOfStringToSetOfRefOfRemotePhoto.Equals(other.Type()) && m.Ref() == other.Ref()
}
func (m MapOfStringToSetOfRefOfRemotePhoto) Ref() ref.Ref {
@@ -47,7 +47,7 @@ func (m MapOfStringToSetOfRefOfRemotePhoto) Ref() ref.Ref {
}
func (m MapOfStringToSetOfRefOfRemotePhoto) Chunks() (chunks []ref.Ref) {
chunks = append(chunks, m.TypeRef().Chunks()...)
chunks = append(chunks, m.Type().Chunks()...)
chunks = append(chunks, m.m.Chunks()...)
return
}
@@ -57,9 +57,9 @@ func (m MapOfStringToSetOfRefOfRemotePhoto) ChildValues() []types.Value {
}
// A Noms Value that describes MapOfStringToSetOfRefOfRemotePhoto.
var __typeRefForMapOfStringToSetOfRefOfRemotePhoto types.TypeRef
var __typeRefForMapOfStringToSetOfRefOfRemotePhoto types.Type
func (m MapOfStringToSetOfRefOfRemotePhoto) TypeRef() types.TypeRef {
func (m MapOfStringToSetOfRefOfRemotePhoto) Type() types.Type {
return __typeRefForMapOfStringToSetOfRefOfRemotePhoto
}
@@ -126,6 +126,12 @@ func (m MapOfStringToSetOfRefOfRemotePhoto) IterAll(cb MapOfStringToSetOfRefOfRe
})
}
func (m MapOfStringToSetOfRefOfRemotePhoto) IterAllP(concurrency int, cb MapOfStringToSetOfRefOfRemotePhotoIterAllCallback) {
m.m.IterAllP(concurrency, func(k, v types.Value) {
cb(k.(types.String).String(), v.(SetOfRefOfRemotePhoto))
})
}
type MapOfStringToSetOfRefOfRemotePhotoFilterCallback func(k string, v SetOfRefOfRemotePhoto) (keep bool)
func (m MapOfStringToSetOfRefOfRemotePhoto) Filter(cb MapOfStringToSetOfRefOfRemotePhotoFilterCallback) MapOfStringToSetOfRefOfRemotePhoto {
@@ -168,7 +174,7 @@ func (s SetOfRefOfRemotePhoto) Def() SetOfRefOfRemotePhotoDef {
}
func (s SetOfRefOfRemotePhoto) Equals(other types.Value) bool {
return other != nil && __typeRefForSetOfRefOfRemotePhoto.Equals(other.TypeRef()) && s.Ref() == other.Ref()
return other != nil && __typeRefForSetOfRefOfRemotePhoto.Equals(other.Type()) && s.Ref() == other.Ref()
}
func (s SetOfRefOfRemotePhoto) Ref() ref.Ref {
@@ -176,7 +182,7 @@ func (s SetOfRefOfRemotePhoto) Ref() ref.Ref {
}
func (s SetOfRefOfRemotePhoto) Chunks() (chunks []ref.Ref) {
chunks = append(chunks, s.TypeRef().Chunks()...)
chunks = append(chunks, s.Type().Chunks()...)
chunks = append(chunks, s.s.Chunks()...)
return
}
@@ -186,9 +192,9 @@ func (s SetOfRefOfRemotePhoto) ChildValues() []types.Value {
}
// A Noms Value that describes SetOfRefOfRemotePhoto.
var __typeRefForSetOfRefOfRemotePhoto types.TypeRef
var __typeRefForSetOfRefOfRemotePhoto types.Type
func (m SetOfRefOfRemotePhoto) TypeRef() types.TypeRef {
func (m SetOfRefOfRemotePhoto) Type() types.Type {
return __typeRefForSetOfRefOfRemotePhoto
}
@@ -304,11 +310,11 @@ func (r RefOfRemotePhoto) Ref() ref.Ref {
}
func (r RefOfRemotePhoto) Equals(other types.Value) bool {
return other != nil && __typeRefForRefOfRemotePhoto.Equals(other.TypeRef()) && r.Ref() == other.Ref()
return other != nil && __typeRefForRefOfRemotePhoto.Equals(other.Type()) && r.Ref() == other.Ref()
}
func (r RefOfRemotePhoto) Chunks() (chunks []ref.Ref) {
chunks = append(chunks, r.TypeRef().Chunks()...)
chunks = append(chunks, r.Type().Chunks()...)
chunks = append(chunks, r.target)
return
}
@@ -318,9 +324,9 @@ func (r RefOfRemotePhoto) ChildValues() []types.Value {
}
// A Noms Value that describes RefOfRemotePhoto.
var __typeRefForRefOfRemotePhoto types.TypeRef
var __typeRefForRefOfRemotePhoto types.Type
func (m RefOfRemotePhoto) TypeRef() types.TypeRef {
func (m RefOfRemotePhoto) Type() types.Type {
return __typeRefForRefOfRemotePhoto
}

View File

@@ -38,7 +38,7 @@ func (l ListOfRefOfMapOfStringToValue) Def() ListOfRefOfMapOfStringToValueDef {
}
func (l ListOfRefOfMapOfStringToValue) Equals(other types.Value) bool {
return other != nil && __typeRefForListOfRefOfMapOfStringToValue.Equals(other.TypeRef()) && l.Ref() == other.Ref()
return other != nil && __typeRefForListOfRefOfMapOfStringToValue.Equals(other.Type()) && l.Ref() == other.Ref()
}
func (l ListOfRefOfMapOfStringToValue) Ref() ref.Ref {
@@ -46,7 +46,7 @@ func (l ListOfRefOfMapOfStringToValue) Ref() ref.Ref {
}
func (l ListOfRefOfMapOfStringToValue) Chunks() (chunks []ref.Ref) {
chunks = append(chunks, l.TypeRef().Chunks()...)
chunks = append(chunks, l.Type().Chunks()...)
chunks = append(chunks, l.l.Chunks()...)
return
}
@@ -56,9 +56,9 @@ func (l ListOfRefOfMapOfStringToValue) ChildValues() []types.Value {
}
// A Noms Value that describes ListOfRefOfMapOfStringToValue.
var __typeRefForListOfRefOfMapOfStringToValue types.TypeRef
var __typeRefForListOfRefOfMapOfStringToValue types.Type
func (m ListOfRefOfMapOfStringToValue) TypeRef() types.TypeRef {
func (m ListOfRefOfMapOfStringToValue) Type() types.Type {
return __typeRefForListOfRefOfMapOfStringToValue
}
@@ -170,11 +170,11 @@ func (r RefOfMapOfStringToValue) Ref() ref.Ref {
}
func (r RefOfMapOfStringToValue) Equals(other types.Value) bool {
return other != nil && __typeRefForRefOfMapOfStringToValue.Equals(other.TypeRef()) && r.Ref() == other.Ref()
return other != nil && __typeRefForRefOfMapOfStringToValue.Equals(other.Type()) && r.Ref() == other.Ref()
}
func (r RefOfMapOfStringToValue) Chunks() (chunks []ref.Ref) {
chunks = append(chunks, r.TypeRef().Chunks()...)
chunks = append(chunks, r.Type().Chunks()...)
chunks = append(chunks, r.target)
return
}
@@ -184,9 +184,9 @@ func (r RefOfMapOfStringToValue) ChildValues() []types.Value {
}
// A Noms Value that describes RefOfMapOfStringToValue.
var __typeRefForRefOfMapOfStringToValue types.TypeRef
var __typeRefForRefOfMapOfStringToValue types.Type
func (m RefOfMapOfStringToValue) TypeRef() types.TypeRef {
func (m RefOfMapOfStringToValue) Type() types.Type {
return __typeRefForRefOfMapOfStringToValue
}
@@ -238,7 +238,7 @@ func (m MapOfStringToValue) Def() MapOfStringToValueDef {
}
func (m MapOfStringToValue) Equals(other types.Value) bool {
return other != nil && __typeRefForMapOfStringToValue.Equals(other.TypeRef()) && m.Ref() == other.Ref()
return other != nil && __typeRefForMapOfStringToValue.Equals(other.Type()) && m.Ref() == other.Ref()
}
func (m MapOfStringToValue) Ref() ref.Ref {
@@ -246,7 +246,7 @@ func (m MapOfStringToValue) Ref() ref.Ref {
}
func (m MapOfStringToValue) Chunks() (chunks []ref.Ref) {
chunks = append(chunks, m.TypeRef().Chunks()...)
chunks = append(chunks, m.Type().Chunks()...)
chunks = append(chunks, m.m.Chunks()...)
return
}
@@ -256,9 +256,9 @@ func (m MapOfStringToValue) ChildValues() []types.Value {
}
// A Noms Value that describes MapOfStringToValue.
var __typeRefForMapOfStringToValue types.TypeRef
var __typeRefForMapOfStringToValue types.Type
func (m MapOfStringToValue) TypeRef() types.TypeRef {
func (m MapOfStringToValue) Type() types.Type {
return __typeRefForMapOfStringToValue
}
@@ -325,6 +325,12 @@ func (m MapOfStringToValue) IterAll(cb MapOfStringToValueIterAllCallback) {
})
}
func (m MapOfStringToValue) IterAllP(concurrency int, cb MapOfStringToValueIterAllCallback) {
m.m.IterAllP(concurrency, func(k, v types.Value) {
cb(k.(types.String).String(), v)
})
}
type MapOfStringToValueFilterCallback func(k string, v types.Value) (keep bool)
func (m MapOfStringToValue) Filter(cb MapOfStringToValueFilterCallback) MapOfStringToValue {

View File

@@ -14,7 +14,7 @@ var __datasPackageInFile_types_CachedRef ref.Ref
// package implemented by this file and registers it with the global
// type package definition cache.
func init() {
p := types.NewPackage([]types.TypeRef{
p := types.NewPackage([]types.Type{
types.MakeStructTypeRef("Commit",
[]types.Field{
types.Field{"value", types.MakePrimitiveTypeRef(types.ValueKind), false},
@@ -63,9 +63,9 @@ func (s Commit) Def() (d CommitDef) {
return
}
var __typeRefForCommit types.TypeRef
var __typeRefForCommit types.Type
func (m Commit) TypeRef() types.TypeRef {
func (m Commit) Type() types.Type {
return __typeRefForCommit
}
@@ -93,7 +93,7 @@ func readerForCommit(v types.Value) []types.Value {
}
func (s Commit) Equals(other types.Value) bool {
return other != nil && __typeRefForCommit.Equals(other.TypeRef()) && s.Ref() == other.Ref()
return other != nil && __typeRefForCommit.Equals(other.Type()) && s.Ref() == other.Ref()
}
func (s Commit) Ref() ref.Ref {
@@ -164,7 +164,7 @@ func (m MapOfStringToRefOfCommit) Def() MapOfStringToRefOfCommitDef {
}
func (m MapOfStringToRefOfCommit) Equals(other types.Value) bool {
return other != nil && __typeRefForMapOfStringToRefOfCommit.Equals(other.TypeRef()) && m.Ref() == other.Ref()
return other != nil && __typeRefForMapOfStringToRefOfCommit.Equals(other.Type()) && m.Ref() == other.Ref()
}
func (m MapOfStringToRefOfCommit) Ref() ref.Ref {
@@ -172,7 +172,7 @@ func (m MapOfStringToRefOfCommit) Ref() ref.Ref {
}
func (m MapOfStringToRefOfCommit) Chunks() (chunks []ref.Ref) {
chunks = append(chunks, m.TypeRef().Chunks()...)
chunks = append(chunks, m.Type().Chunks()...)
chunks = append(chunks, m.m.Chunks()...)
return
}
@@ -182,9 +182,9 @@ func (m MapOfStringToRefOfCommit) ChildValues() []types.Value {
}
// A Noms Value that describes MapOfStringToRefOfCommit.
var __typeRefForMapOfStringToRefOfCommit types.TypeRef
var __typeRefForMapOfStringToRefOfCommit types.Type
func (m MapOfStringToRefOfCommit) TypeRef() types.TypeRef {
func (m MapOfStringToRefOfCommit) Type() types.Type {
return __typeRefForMapOfStringToRefOfCommit
}
@@ -251,6 +251,12 @@ func (m MapOfStringToRefOfCommit) IterAll(cb MapOfStringToRefOfCommitIterAllCall
})
}
func (m MapOfStringToRefOfCommit) IterAllP(concurrency int, cb MapOfStringToRefOfCommitIterAllCallback) {
m.m.IterAllP(concurrency, func(k, v types.Value) {
cb(k.(types.String).String(), v.(RefOfCommit))
})
}
type MapOfStringToRefOfCommitFilterCallback func(k string, v RefOfCommit) (keep bool)
func (m MapOfStringToRefOfCommit) Filter(cb MapOfStringToRefOfCommitFilterCallback) MapOfStringToRefOfCommit {
@@ -293,7 +299,7 @@ func (s SetOfRefOfCommit) Def() SetOfRefOfCommitDef {
}
func (s SetOfRefOfCommit) Equals(other types.Value) bool {
return other != nil && __typeRefForSetOfRefOfCommit.Equals(other.TypeRef()) && s.Ref() == other.Ref()
return other != nil && __typeRefForSetOfRefOfCommit.Equals(other.Type()) && s.Ref() == other.Ref()
}
func (s SetOfRefOfCommit) Ref() ref.Ref {
@@ -301,7 +307,7 @@ func (s SetOfRefOfCommit) Ref() ref.Ref {
}
func (s SetOfRefOfCommit) Chunks() (chunks []ref.Ref) {
chunks = append(chunks, s.TypeRef().Chunks()...)
chunks = append(chunks, s.Type().Chunks()...)
chunks = append(chunks, s.s.Chunks()...)
return
}
@@ -311,9 +317,9 @@ func (s SetOfRefOfCommit) ChildValues() []types.Value {
}
// A Noms Value that describes SetOfRefOfCommit.
var __typeRefForSetOfRefOfCommit types.TypeRef
var __typeRefForSetOfRefOfCommit types.Type
func (m SetOfRefOfCommit) TypeRef() types.TypeRef {
func (m SetOfRefOfCommit) Type() types.Type {
return __typeRefForSetOfRefOfCommit
}
@@ -429,11 +435,11 @@ func (r RefOfCommit) Ref() ref.Ref {
}
func (r RefOfCommit) Equals(other types.Value) bool {
return other != nil && __typeRefForRefOfCommit.Equals(other.TypeRef()) && r.Ref() == other.Ref()
return other != nil && __typeRefForRefOfCommit.Equals(other.Type()) && r.Ref() == other.Ref()
}
func (r RefOfCommit) Chunks() (chunks []ref.Ref) {
chunks = append(chunks, r.TypeRef().Chunks()...)
chunks = append(chunks, r.Type().Chunks()...)
chunks = append(chunks, r.target)
return
}
@@ -443,9 +449,9 @@ func (r RefOfCommit) ChildValues() []types.Value {
}
// A Noms Value that describes RefOfCommit.
var __typeRefForRefOfCommit types.TypeRef
var __typeRefForRefOfCommit types.Type
func (m RefOfCommit) TypeRef() types.TypeRef {
func (m RefOfCommit) Type() types.Type {
return __typeRefForRefOfCommit
}

View File

@@ -13,7 +13,7 @@ var __genPackageInFile_enum_struct_CachedRef ref.Ref
// package implemented by this file and registers it with the global
// type package definition cache.
func init() {
p := types.NewPackage([]types.TypeRef{
p := types.NewPackage([]types.Type{
types.MakeEnumTypeRef("Handedness", "right", "left", "switch"),
types.MakeStructTypeRef("EnumStruct",
[]types.Field{
@@ -39,9 +39,9 @@ func NewHandedness() Handedness {
return Handedness(0)
}
var __typeRefForHandedness types.TypeRef
var __typeRefForHandedness types.Type
func (e Handedness) TypeRef() types.TypeRef {
func (e Handedness) Type() types.Type {
return __typeRefForHandedness
}
@@ -107,9 +107,9 @@ func (s EnumStruct) Def() (d EnumStructDef) {
return
}
var __typeRefForEnumStruct types.TypeRef
var __typeRefForEnumStruct types.Type
func (m EnumStruct) TypeRef() types.TypeRef {
func (m EnumStruct) Type() types.Type {
return __typeRefForEnumStruct
}
@@ -134,7 +134,7 @@ func readerForEnumStruct(v types.Value) []types.Value {
}
func (s EnumStruct) Equals(other types.Value) bool {
return other != nil && __typeRefForEnumStruct.Equals(other.TypeRef()) && s.Ref() == other.Ref()
return other != nil && __typeRefForEnumStruct.Equals(other.Type()) && s.Ref() == other.Ref()
}
func (s EnumStruct) Ref() ref.Ref {

View File

@@ -37,7 +37,7 @@ func (l ListOfInt64) Def() ListOfInt64Def {
}
func (l ListOfInt64) Equals(other types.Value) bool {
return other != nil && __typeRefForListOfInt64.Equals(other.TypeRef()) && l.Ref() == other.Ref()
return other != nil && __typeRefForListOfInt64.Equals(other.Type()) && l.Ref() == other.Ref()
}
func (l ListOfInt64) Ref() ref.Ref {
@@ -45,7 +45,7 @@ func (l ListOfInt64) Ref() ref.Ref {
}
func (l ListOfInt64) Chunks() (chunks []ref.Ref) {
chunks = append(chunks, l.TypeRef().Chunks()...)
chunks = append(chunks, l.Type().Chunks()...)
chunks = append(chunks, l.l.Chunks()...)
return
}
@@ -55,9 +55,9 @@ func (l ListOfInt64) ChildValues() []types.Value {
}
// A Noms Value that describes ListOfInt64.
var __typeRefForListOfInt64 types.TypeRef
var __typeRefForListOfInt64 types.Type
func (m ListOfInt64) TypeRef() types.TypeRef {
func (m ListOfInt64) Type() types.Type {
return __typeRefForListOfInt64
}

View File

@@ -38,7 +38,7 @@ func (m MapOfBoolToString) Def() MapOfBoolToStringDef {
}
func (m MapOfBoolToString) Equals(other types.Value) bool {
return other != nil && __typeRefForMapOfBoolToString.Equals(other.TypeRef()) && m.Ref() == other.Ref()
return other != nil && __typeRefForMapOfBoolToString.Equals(other.Type()) && m.Ref() == other.Ref()
}
func (m MapOfBoolToString) Ref() ref.Ref {
@@ -46,7 +46,7 @@ func (m MapOfBoolToString) Ref() ref.Ref {
}
func (m MapOfBoolToString) Chunks() (chunks []ref.Ref) {
chunks = append(chunks, m.TypeRef().Chunks()...)
chunks = append(chunks, m.Type().Chunks()...)
chunks = append(chunks, m.m.Chunks()...)
return
}
@@ -56,9 +56,9 @@ func (m MapOfBoolToString) ChildValues() []types.Value {
}
// A Noms Value that describes MapOfBoolToString.
var __typeRefForMapOfBoolToString types.TypeRef
var __typeRefForMapOfBoolToString types.Type
func (m MapOfBoolToString) TypeRef() types.TypeRef {
func (m MapOfBoolToString) Type() types.Type {
return __typeRefForMapOfBoolToString
}
@@ -171,7 +171,7 @@ func (m MapOfStringToValue) Def() MapOfStringToValueDef {
}
func (m MapOfStringToValue) Equals(other types.Value) bool {
return other != nil && __typeRefForMapOfStringToValue.Equals(other.TypeRef()) && m.Ref() == other.Ref()
return other != nil && __typeRefForMapOfStringToValue.Equals(other.Type()) && m.Ref() == other.Ref()
}
func (m MapOfStringToValue) Ref() ref.Ref {
@@ -179,7 +179,7 @@ func (m MapOfStringToValue) Ref() ref.Ref {
}
func (m MapOfStringToValue) Chunks() (chunks []ref.Ref) {
chunks = append(chunks, m.TypeRef().Chunks()...)
chunks = append(chunks, m.Type().Chunks()...)
chunks = append(chunks, m.m.Chunks()...)
return
}
@@ -189,9 +189,9 @@ func (m MapOfStringToValue) ChildValues() []types.Value {
}
// A Noms Value that describes MapOfStringToValue.
var __typeRefForMapOfStringToValue types.TypeRef
var __typeRefForMapOfStringToValue types.Type
func (m MapOfStringToValue) TypeRef() types.TypeRef {
func (m MapOfStringToValue) Type() types.Type {
return __typeRefForMapOfStringToValue
}

View File

@@ -14,7 +14,7 @@ var __genPackageInFile_ref_CachedRef ref.Ref
// package implemented by this file and registers it with the global
// type package definition cache.
func init() {
p := types.NewPackage([]types.TypeRef{
p := types.NewPackage([]types.Type{
types.MakeStructTypeRef("StructWithRef",
[]types.Field{
types.Field{"r", types.MakeCompoundTypeRef(types.RefKind, types.MakeCompoundTypeRef(types.SetKind, types.MakePrimitiveTypeRef(types.Float32Kind))), false},
@@ -57,9 +57,9 @@ func (s StructWithRef) Def() (d StructWithRefDef) {
return
}
var __typeRefForStructWithRef types.TypeRef
var __typeRefForStructWithRef types.Type
func (m StructWithRef) TypeRef() types.TypeRef {
func (m StructWithRef) Type() types.Type {
return __typeRefForStructWithRef
}
@@ -84,7 +84,7 @@ func readerForStructWithRef(v types.Value) []types.Value {
}
func (s StructWithRef) Equals(other types.Value) bool {
return other != nil && __typeRefForStructWithRef.Equals(other.TypeRef()) && s.Ref() == other.Ref()
return other != nil && __typeRefForStructWithRef.Equals(other.Type()) && s.Ref() == other.Ref()
}
func (s StructWithRef) Ref() ref.Ref {
@@ -132,11 +132,11 @@ func (r RefOfListOfString) Ref() ref.Ref {
}
func (r RefOfListOfString) Equals(other types.Value) bool {
return other != nil && __typeRefForRefOfListOfString.Equals(other.TypeRef()) && r.Ref() == other.Ref()
return other != nil && __typeRefForRefOfListOfString.Equals(other.Type()) && r.Ref() == other.Ref()
}
func (r RefOfListOfString) Chunks() (chunks []ref.Ref) {
chunks = append(chunks, r.TypeRef().Chunks()...)
chunks = append(chunks, r.Type().Chunks()...)
chunks = append(chunks, r.target)
return
}
@@ -146,9 +146,9 @@ func (r RefOfListOfString) ChildValues() []types.Value {
}
// A Noms Value that describes RefOfListOfString.
var __typeRefForRefOfListOfString types.TypeRef
var __typeRefForRefOfListOfString types.Type
func (m RefOfListOfString) TypeRef() types.TypeRef {
func (m RefOfListOfString) Type() types.Type {
return __typeRefForRefOfListOfString
}
@@ -199,7 +199,7 @@ func (l ListOfRefOfFloat32) Def() ListOfRefOfFloat32Def {
}
func (l ListOfRefOfFloat32) Equals(other types.Value) bool {
return other != nil && __typeRefForListOfRefOfFloat32.Equals(other.TypeRef()) && l.Ref() == other.Ref()
return other != nil && __typeRefForListOfRefOfFloat32.Equals(other.Type()) && l.Ref() == other.Ref()
}
func (l ListOfRefOfFloat32) Ref() ref.Ref {
@@ -207,7 +207,7 @@ func (l ListOfRefOfFloat32) Ref() ref.Ref {
}
func (l ListOfRefOfFloat32) Chunks() (chunks []ref.Ref) {
chunks = append(chunks, l.TypeRef().Chunks()...)
chunks = append(chunks, l.Type().Chunks()...)
chunks = append(chunks, l.l.Chunks()...)
return
}
@@ -217,9 +217,9 @@ func (l ListOfRefOfFloat32) ChildValues() []types.Value {
}
// A Noms Value that describes ListOfRefOfFloat32.
var __typeRefForListOfRefOfFloat32 types.TypeRef
var __typeRefForListOfRefOfFloat32 types.Type
func (m ListOfRefOfFloat32) TypeRef() types.TypeRef {
func (m ListOfRefOfFloat32) Type() types.Type {
return __typeRefForListOfRefOfFloat32
}
@@ -331,11 +331,11 @@ func (r RefOfSetOfFloat32) Ref() ref.Ref {
}
func (r RefOfSetOfFloat32) Equals(other types.Value) bool {
return other != nil && __typeRefForRefOfSetOfFloat32.Equals(other.TypeRef()) && r.Ref() == other.Ref()
return other != nil && __typeRefForRefOfSetOfFloat32.Equals(other.Type()) && r.Ref() == other.Ref()
}
func (r RefOfSetOfFloat32) Chunks() (chunks []ref.Ref) {
chunks = append(chunks, r.TypeRef().Chunks()...)
chunks = append(chunks, r.Type().Chunks()...)
chunks = append(chunks, r.target)
return
}
@@ -345,9 +345,9 @@ func (r RefOfSetOfFloat32) ChildValues() []types.Value {
}
// A Noms Value that describes RefOfSetOfFloat32.
var __typeRefForRefOfSetOfFloat32 types.TypeRef
var __typeRefForRefOfSetOfFloat32 types.Type
func (m RefOfSetOfFloat32) TypeRef() types.TypeRef {
func (m RefOfSetOfFloat32) Type() types.Type {
return __typeRefForRefOfSetOfFloat32
}
@@ -398,7 +398,7 @@ func (l ListOfString) Def() ListOfStringDef {
}
func (l ListOfString) Equals(other types.Value) bool {
return other != nil && __typeRefForListOfString.Equals(other.TypeRef()) && l.Ref() == other.Ref()
return other != nil && __typeRefForListOfString.Equals(other.Type()) && l.Ref() == other.Ref()
}
func (l ListOfString) Ref() ref.Ref {
@@ -406,7 +406,7 @@ func (l ListOfString) Ref() ref.Ref {
}
func (l ListOfString) Chunks() (chunks []ref.Ref) {
chunks = append(chunks, l.TypeRef().Chunks()...)
chunks = append(chunks, l.Type().Chunks()...)
chunks = append(chunks, l.l.Chunks()...)
return
}
@@ -416,9 +416,9 @@ func (l ListOfString) ChildValues() []types.Value {
}
// A Noms Value that describes ListOfString.
var __typeRefForListOfString types.TypeRef
var __typeRefForListOfString types.Type
func (m ListOfString) TypeRef() types.TypeRef {
func (m ListOfString) Type() types.Type {
return __typeRefForListOfString
}
@@ -530,11 +530,11 @@ func (r RefOfFloat32) Ref() ref.Ref {
}
func (r RefOfFloat32) Equals(other types.Value) bool {
return other != nil && __typeRefForRefOfFloat32.Equals(other.TypeRef()) && r.Ref() == other.Ref()
return other != nil && __typeRefForRefOfFloat32.Equals(other.Type()) && r.Ref() == other.Ref()
}
func (r RefOfFloat32) Chunks() (chunks []ref.Ref) {
chunks = append(chunks, r.TypeRef().Chunks()...)
chunks = append(chunks, r.Type().Chunks()...)
chunks = append(chunks, r.target)
return
}
@@ -544,9 +544,9 @@ func (r RefOfFloat32) ChildValues() []types.Value {
}
// A Noms Value that describes RefOfFloat32.
var __typeRefForRefOfFloat32 types.TypeRef
var __typeRefForRefOfFloat32 types.Type
func (m RefOfFloat32) TypeRef() types.TypeRef {
func (m RefOfFloat32) Type() types.Type {
return __typeRefForRefOfFloat32
}
@@ -600,7 +600,7 @@ func (s SetOfFloat32) Def() SetOfFloat32Def {
}
func (s SetOfFloat32) Equals(other types.Value) bool {
return other != nil && __typeRefForSetOfFloat32.Equals(other.TypeRef()) && s.Ref() == other.Ref()
return other != nil && __typeRefForSetOfFloat32.Equals(other.Type()) && s.Ref() == other.Ref()
}
func (s SetOfFloat32) Ref() ref.Ref {
@@ -608,7 +608,7 @@ func (s SetOfFloat32) Ref() ref.Ref {
}
func (s SetOfFloat32) Chunks() (chunks []ref.Ref) {
chunks = append(chunks, s.TypeRef().Chunks()...)
chunks = append(chunks, s.Type().Chunks()...)
chunks = append(chunks, s.s.Chunks()...)
return
}
@@ -618,9 +618,9 @@ func (s SetOfFloat32) ChildValues() []types.Value {
}
// A Noms Value that describes SetOfFloat32.
var __typeRefForSetOfFloat32 types.TypeRef
var __typeRefForSetOfFloat32 types.Type
func (m SetOfFloat32) TypeRef() types.TypeRef {
func (m SetOfFloat32) Type() types.Type {
return __typeRefForSetOfFloat32
}

View File

@@ -40,7 +40,7 @@ func (s SetOfBool) Def() SetOfBoolDef {
}
func (s SetOfBool) Equals(other types.Value) bool {
return other != nil && __typeRefForSetOfBool.Equals(other.TypeRef()) && s.Ref() == other.Ref()
return other != nil && __typeRefForSetOfBool.Equals(other.Type()) && s.Ref() == other.Ref()
}
func (s SetOfBool) Ref() ref.Ref {
@@ -48,7 +48,7 @@ func (s SetOfBool) Ref() ref.Ref {
}
func (s SetOfBool) Chunks() (chunks []ref.Ref) {
chunks = append(chunks, s.TypeRef().Chunks()...)
chunks = append(chunks, s.Type().Chunks()...)
chunks = append(chunks, s.s.Chunks()...)
return
}
@@ -58,9 +58,9 @@ func (s SetOfBool) ChildValues() []types.Value {
}
// A Noms Value that describes SetOfBool.
var __typeRefForSetOfBool types.TypeRef
var __typeRefForSetOfBool types.Type
func (m SetOfBool) TypeRef() types.TypeRef {
func (m SetOfBool) Type() types.Type {
return __typeRefForSetOfBool
}

View File

@@ -13,7 +13,7 @@ var __genPackageInFile_sha1_09d2fdd_CachedRef ref.Ref
// package implemented by this file and registers it with the global
// type package definition cache.
func init() {
p := types.NewPackage([]types.TypeRef{
p := types.NewPackage([]types.Type{
types.MakeStructTypeRef("D",
[]types.Field{
types.Field{"structField", types.MakeTypeRef(ref.Parse("sha1-1c216c6f1d6989e4ede5f78b7689214948dabeef"), 0), false},
@@ -70,9 +70,9 @@ func (s D) Def() (d DDef) {
return
}
var __typeRefForD types.TypeRef
var __typeRefForD types.Type
func (m D) TypeRef() types.TypeRef {
func (m D) Type() types.Type {
return __typeRefForD
}
@@ -100,7 +100,7 @@ func readerForD(v types.Value) []types.Value {
}
func (s D) Equals(other types.Value) bool {
return other != nil && __typeRefForD.Equals(other.TypeRef()) && s.Ref() == other.Ref()
return other != nil && __typeRefForD.Equals(other.Type()) && s.Ref() == other.Ref()
}
func (s D) Ref() ref.Ref {
@@ -171,9 +171,9 @@ func (s DUser) Def() (d DUserDef) {
return
}
var __typeRefForDUser types.TypeRef
var __typeRefForDUser types.Type
func (m DUser) TypeRef() types.TypeRef {
func (m DUser) Type() types.Type {
return __typeRefForDUser
}
@@ -198,7 +198,7 @@ func readerForDUser(v types.Value) []types.Value {
}
func (s DUser) Equals(other types.Value) bool {
return other != nil && __typeRefForDUser.Equals(other.TypeRef()) && s.Ref() == other.Ref()
return other != nil && __typeRefForDUser.Equals(other.Type()) && s.Ref() == other.Ref()
}
func (s DUser) Ref() ref.Ref {

View File

@@ -13,7 +13,7 @@ var __genPackageInFile_sha1_1c216c6_CachedRef ref.Ref
// package implemented by this file and registers it with the global
// type package definition cache.
func init() {
p := types.NewPackage([]types.TypeRef{
p := types.NewPackage([]types.Type{
types.MakeStructTypeRef("S",
[]types.Field{
types.Field{"s", types.MakePrimitiveTypeRef(types.StringKind), false},
@@ -63,9 +63,9 @@ func (s S) Def() (d SDef) {
return
}
var __typeRefForS types.TypeRef
var __typeRefForS types.Type
func (m S) TypeRef() types.TypeRef {
func (m S) Type() types.Type {
return __typeRefForS
}
@@ -93,7 +93,7 @@ func readerForS(v types.Value) []types.Value {
}
func (s S) Equals(other types.Value) bool {
return other != nil && __typeRefForS.Equals(other.TypeRef()) && s.Ref() == other.Ref()
return other != nil && __typeRefForS.Equals(other.Type()) && s.Ref() == other.Ref()
}
func (s S) Ref() ref.Ref {
@@ -145,9 +145,9 @@ func NewE() E {
return E(0)
}
var __typeRefForE types.TypeRef
var __typeRefForE types.Type
func (e E) TypeRef() types.TypeRef {
func (e E) Type() types.Type {
return __typeRefForE
}

View File

@@ -13,7 +13,7 @@ var __genPackageInFile_struct_CachedRef ref.Ref
// package implemented by this file and registers it with the global
// type package definition cache.
func init() {
p := types.NewPackage([]types.TypeRef{
p := types.NewPackage([]types.Type{
types.MakeStructTypeRef("Struct",
[]types.Field{
types.Field{"s", types.MakePrimitiveTypeRef(types.StringKind), false},
@@ -62,9 +62,9 @@ func (s Struct) Def() (d StructDef) {
return
}
var __typeRefForStruct types.TypeRef
var __typeRefForStruct types.Type
func (m Struct) TypeRef() types.TypeRef {
func (m Struct) Type() types.Type {
return __typeRefForStruct
}
@@ -92,7 +92,7 @@ func readerForStruct(v types.Value) []types.Value {
}
func (s Struct) Equals(other types.Value) bool {
return other != nil && __typeRefForStruct.Equals(other.TypeRef()) && s.Ref() == other.Ref()
return other != nil && __typeRefForStruct.Equals(other.Type()) && s.Ref() == other.Ref()
}
func (s Struct) Ref() ref.Ref {
@@ -160,7 +160,7 @@ func (l ListOfStruct) Def() ListOfStructDef {
}
func (l ListOfStruct) Equals(other types.Value) bool {
return other != nil && __typeRefForListOfStruct.Equals(other.TypeRef()) && l.Ref() == other.Ref()
return other != nil && __typeRefForListOfStruct.Equals(other.Type()) && l.Ref() == other.Ref()
}
func (l ListOfStruct) Ref() ref.Ref {
@@ -168,7 +168,7 @@ func (l ListOfStruct) Ref() ref.Ref {
}
func (l ListOfStruct) Chunks() (chunks []ref.Ref) {
chunks = append(chunks, l.TypeRef().Chunks()...)
chunks = append(chunks, l.Type().Chunks()...)
chunks = append(chunks, l.l.Chunks()...)
return
}
@@ -178,9 +178,9 @@ func (l ListOfStruct) ChildValues() []types.Value {
}
// A Noms Value that describes ListOfStruct.
var __typeRefForListOfStruct types.TypeRef
var __typeRefForListOfStruct types.Type
func (m ListOfStruct) TypeRef() types.TypeRef {
func (m ListOfStruct) Type() types.Type {
return __typeRefForListOfStruct
}

View File

@@ -13,7 +13,7 @@ var __genPackageInFile_struct_optional_CachedRef ref.Ref
// package implemented by this file and registers it with the global
// type package definition cache.
func init() {
p := types.NewPackage([]types.TypeRef{
p := types.NewPackage([]types.Type{
types.MakeStructTypeRef("OptionalStruct",
[]types.Field{
types.Field{"s", types.MakePrimitiveTypeRef(types.StringKind), true},
@@ -68,9 +68,9 @@ func (s OptionalStruct) Def() (d OptionalStructDef) {
return
}
var __typeRefForOptionalStruct types.TypeRef
var __typeRefForOptionalStruct types.Type
func (m OptionalStruct) TypeRef() types.TypeRef {
func (m OptionalStruct) Type() types.Type {
return __typeRefForOptionalStruct
}
@@ -112,7 +112,7 @@ func readerForOptionalStruct(v types.Value) []types.Value {
}
func (s OptionalStruct) Equals(other types.Value) bool {
return other != nil && __typeRefForOptionalStruct.Equals(other.TypeRef()) && s.Ref() == other.Ref()
return other != nil && __typeRefForOptionalStruct.Equals(other.Type()) && s.Ref() == other.Ref()
}
func (s OptionalStruct) Ref() ref.Ref {

View File

@@ -13,7 +13,7 @@ var __genPackageInFile_struct_primitives_CachedRef ref.Ref
// package implemented by this file and registers it with the global
// type package definition cache.
func init() {
p := types.NewPackage([]types.TypeRef{
p := types.NewPackage([]types.Type{
types.MakeStructTypeRef("StructPrimitives",
[]types.Field{
types.Field{"uint64", types.MakePrimitiveTypeRef(types.UInt64Kind), false},
@@ -134,9 +134,9 @@ func (s StructPrimitives) Def() (d StructPrimitivesDef) {
return
}
var __typeRefForStructPrimitives types.TypeRef
var __typeRefForStructPrimitives types.Type
func (m StructPrimitives) TypeRef() types.TypeRef {
func (m StructPrimitives) Type() types.Type {
return __typeRefForStructPrimitives
}
@@ -200,7 +200,7 @@ func readerForStructPrimitives(v types.Value) []types.Value {
}
func (s StructPrimitives) Equals(other types.Value) bool {
return other != nil && __typeRefForStructPrimitives.Equals(other.TypeRef()) && s.Ref() == other.Ref()
return other != nil && __typeRefForStructPrimitives.Equals(other.Type()) && s.Ref() == other.Ref()
}
func (s StructPrimitives) Ref() ref.Ref {

View File

@@ -13,7 +13,7 @@ var __genPackageInFile_struct_recursive_CachedRef ref.Ref
// package implemented by this file and registers it with the global
// type package definition cache.
func init() {
p := types.NewPackage([]types.TypeRef{
p := types.NewPackage([]types.Type{
types.MakeStructTypeRef("Tree",
[]types.Field{
types.Field{"children", types.MakeCompoundTypeRef(types.ListKind, types.MakeTypeRef(ref.Ref{}, 0)), false},
@@ -56,9 +56,9 @@ func (s Tree) Def() (d TreeDef) {
return
}
var __typeRefForTree types.TypeRef
var __typeRefForTree types.Type
func (m Tree) TypeRef() types.TypeRef {
func (m Tree) Type() types.Type {
return __typeRefForTree
}
@@ -83,7 +83,7 @@ func readerForTree(v types.Value) []types.Value {
}
func (s Tree) Equals(other types.Value) bool {
return other != nil && __typeRefForTree.Equals(other.TypeRef()) && s.Ref() == other.Ref()
return other != nil && __typeRefForTree.Equals(other.Type()) && s.Ref() == other.Ref()
}
func (s Tree) Ref() ref.Ref {
@@ -141,7 +141,7 @@ func (l ListOfTree) Def() ListOfTreeDef {
}
func (l ListOfTree) Equals(other types.Value) bool {
return other != nil && __typeRefForListOfTree.Equals(other.TypeRef()) && l.Ref() == other.Ref()
return other != nil && __typeRefForListOfTree.Equals(other.Type()) && l.Ref() == other.Ref()
}
func (l ListOfTree) Ref() ref.Ref {
@@ -149,7 +149,7 @@ func (l ListOfTree) Ref() ref.Ref {
}
func (l ListOfTree) Chunks() (chunks []ref.Ref) {
chunks = append(chunks, l.TypeRef().Chunks()...)
chunks = append(chunks, l.Type().Chunks()...)
chunks = append(chunks, l.l.Chunks()...)
return
}
@@ -159,9 +159,9 @@ func (l ListOfTree) ChildValues() []types.Value {
}
// A Noms Value that describes ListOfTree.
var __typeRefForListOfTree types.TypeRef
var __typeRefForListOfTree types.Type
func (m ListOfTree) TypeRef() types.TypeRef {
func (m ListOfTree) Type() types.Type {
return __typeRefForListOfTree
}

View File

@@ -13,7 +13,7 @@ var __genPackageInFile_struct_with_dup_list_CachedRef ref.Ref
// package implemented by this file and registers it with the global
// type package definition cache.
func init() {
p := types.NewPackage([]types.TypeRef{
p := types.NewPackage([]types.Type{
types.MakeStructTypeRef("StructWithDupList",
[]types.Field{
types.Field{"l", types.MakeCompoundTypeRef(types.ListKind, types.MakePrimitiveTypeRef(types.UInt8Kind)), false},
@@ -56,9 +56,9 @@ func (s StructWithDupList) Def() (d StructWithDupListDef) {
return
}
var __typeRefForStructWithDupList types.TypeRef
var __typeRefForStructWithDupList types.Type
func (m StructWithDupList) TypeRef() types.TypeRef {
func (m StructWithDupList) Type() types.Type {
return __typeRefForStructWithDupList
}
@@ -83,7 +83,7 @@ func readerForStructWithDupList(v types.Value) []types.Value {
}
func (s StructWithDupList) Equals(other types.Value) bool {
return other != nil && __typeRefForStructWithDupList.Equals(other.TypeRef()) && s.Ref() == other.Ref()
return other != nil && __typeRefForStructWithDupList.Equals(other.Type()) && s.Ref() == other.Ref()
}
func (s StructWithDupList) Ref() ref.Ref {
@@ -110,3 +110,145 @@ func (s StructWithDupList) SetL(val ListOfUInt8) StructWithDupList {
s.ref = &ref.Ref{}
return s
}
// ListOfUInt8
type ListOfUInt8 struct {
l types.List
ref *ref.Ref
}
func NewListOfUInt8() ListOfUInt8 {
return ListOfUInt8{types.NewList(), &ref.Ref{}}
}
type ListOfUInt8Def []uint8
func (def ListOfUInt8Def) New() ListOfUInt8 {
l := make([]types.Value, len(def))
for i, d := range def {
l[i] = types.UInt8(d)
}
return ListOfUInt8{types.NewList(l...), &ref.Ref{}}
}
func (l ListOfUInt8) Def() ListOfUInt8Def {
d := make([]uint8, l.Len())
for i := uint64(0); i < l.Len(); i++ {
d[i] = uint8(l.l.Get(i).(types.UInt8))
}
return d
}
func (l ListOfUInt8) Equals(other types.Value) bool {
return other != nil && __typeRefForListOfUInt8.Equals(other.Type()) && l.Ref() == other.Ref()
}
func (l ListOfUInt8) Ref() ref.Ref {
return types.EnsureRef(l.ref, l)
}
func (l ListOfUInt8) Chunks() (chunks []ref.Ref) {
chunks = append(chunks, l.Type().Chunks()...)
chunks = append(chunks, l.l.Chunks()...)
return
}
func (l ListOfUInt8) ChildValues() []types.Value {
return append([]types.Value{}, l.l.ChildValues()...)
}
// A Noms Value that describes ListOfUInt8.
var __typeRefForListOfUInt8 types.Type
func (m ListOfUInt8) Type() types.Type {
return __typeRefForListOfUInt8
}
func init() {
__typeRefForListOfUInt8 = types.MakeCompoundTypeRef(types.ListKind, types.MakePrimitiveTypeRef(types.UInt8Kind))
types.RegisterValue(__typeRefForListOfUInt8, builderForListOfUInt8, readerForListOfUInt8)
}
func builderForListOfUInt8(v types.Value) types.Value {
return ListOfUInt8{v.(types.List), &ref.Ref{}}
}
func readerForListOfUInt8(v types.Value) types.Value {
return v.(ListOfUInt8).l
}
func (l ListOfUInt8) Len() uint64 {
return l.l.Len()
}
func (l ListOfUInt8) Empty() bool {
return l.Len() == uint64(0)
}
func (l ListOfUInt8) Get(i uint64) uint8 {
return uint8(l.l.Get(i).(types.UInt8))
}
func (l ListOfUInt8) Slice(idx uint64, end uint64) ListOfUInt8 {
return ListOfUInt8{l.l.Slice(idx, end), &ref.Ref{}}
}
func (l ListOfUInt8) Set(i uint64, val uint8) ListOfUInt8 {
return ListOfUInt8{l.l.Set(i, types.UInt8(val)), &ref.Ref{}}
}
func (l ListOfUInt8) Append(v ...uint8) ListOfUInt8 {
return ListOfUInt8{l.l.Append(l.fromElemSlice(v)...), &ref.Ref{}}
}
func (l ListOfUInt8) Insert(idx uint64, v ...uint8) ListOfUInt8 {
return ListOfUInt8{l.l.Insert(idx, l.fromElemSlice(v)...), &ref.Ref{}}
}
func (l ListOfUInt8) Remove(idx uint64, end uint64) ListOfUInt8 {
return ListOfUInt8{l.l.Remove(idx, end), &ref.Ref{}}
}
func (l ListOfUInt8) RemoveAt(idx uint64) ListOfUInt8 {
return ListOfUInt8{(l.l.RemoveAt(idx)), &ref.Ref{}}
}
func (l ListOfUInt8) fromElemSlice(p []uint8) []types.Value {
r := make([]types.Value, len(p))
for i, v := range p {
r[i] = types.UInt8(v)
}
return r
}
type ListOfUInt8IterCallback func(v uint8, i uint64) (stop bool)
func (l ListOfUInt8) Iter(cb ListOfUInt8IterCallback) {
l.l.Iter(func(v types.Value, i uint64) bool {
return cb(uint8(v.(types.UInt8)), i)
})
}
type ListOfUInt8IterAllCallback func(v uint8, i uint64)
func (l ListOfUInt8) IterAll(cb ListOfUInt8IterAllCallback) {
l.l.IterAll(func(v types.Value, i uint64) {
cb(uint8(v.(types.UInt8)), i)
})
}
func (l ListOfUInt8) IterAllP(concurrency int, cb ListOfUInt8IterAllCallback) {
l.l.IterAllP(concurrency, func(v types.Value, i uint64) {
cb(uint8(v.(types.UInt8)), i)
})
}
type ListOfUInt8FilterCallback func(v uint8, i uint64) (keep bool)
func (l ListOfUInt8) Filter(cb ListOfUInt8FilterCallback) ListOfUInt8 {
out := l.l.Filter(func(v types.Value, i uint64) bool {
return cb(uint8(v.(types.UInt8)), i)
})
return ListOfUInt8{out, &ref.Ref{}}
}

View File

@@ -13,7 +13,7 @@ var __genPackageInFile_struct_with_imports_CachedRef ref.Ref
// package implemented by this file and registers it with the global
// type package definition cache.
func init() {
p := types.NewPackage([]types.TypeRef{
p := types.NewPackage([]types.Type{
types.MakeEnumTypeRef("LocalE", "LocalE1", "Ignored"),
types.MakeStructTypeRef("ImportUser",
[]types.Field{
@@ -41,9 +41,9 @@ func NewLocalE() LocalE {
return LocalE(0)
}
var __typeRefForLocalE types.TypeRef
var __typeRefForLocalE types.Type
func (e LocalE) TypeRef() types.TypeRef {
func (e LocalE) Type() types.Type {
return __typeRefForLocalE
}
@@ -114,9 +114,9 @@ func (s ImportUser) Def() (d ImportUserDef) {
return
}
var __typeRefForImportUser types.TypeRef
var __typeRefForImportUser types.Type
func (m ImportUser) TypeRef() types.TypeRef {
func (m ImportUser) Type() types.Type {
return __typeRefForImportUser
}
@@ -144,7 +144,7 @@ func readerForImportUser(v types.Value) []types.Value {
}
func (s ImportUser) Equals(other types.Value) bool {
return other != nil && __typeRefForImportUser.Equals(other.TypeRef()) && s.Ref() == other.Ref()
return other != nil && __typeRefForImportUser.Equals(other.Type()) && s.Ref() == other.Ref()
}
func (s ImportUser) Ref() ref.Ref {
@@ -213,7 +213,7 @@ func (l ListOfD) Def() ListOfDDef {
}
func (l ListOfD) Equals(other types.Value) bool {
return other != nil && __typeRefForListOfD.Equals(other.TypeRef()) && l.Ref() == other.Ref()
return other != nil && __typeRefForListOfD.Equals(other.Type()) && l.Ref() == other.Ref()
}
func (l ListOfD) Ref() ref.Ref {
@@ -221,7 +221,7 @@ func (l ListOfD) Ref() ref.Ref {
}
func (l ListOfD) Chunks() (chunks []ref.Ref) {
chunks = append(chunks, l.TypeRef().Chunks()...)
chunks = append(chunks, l.Type().Chunks()...)
chunks = append(chunks, l.l.Chunks()...)
return
}
@@ -231,9 +231,9 @@ func (l ListOfD) ChildValues() []types.Value {
}
// A Noms Value that describes ListOfD.
var __typeRefForListOfD types.TypeRef
var __typeRefForListOfD types.Type
func (m ListOfD) TypeRef() types.TypeRef {
func (m ListOfD) Type() types.Type {
return __typeRefForListOfD
}

View File

@@ -13,7 +13,7 @@ var __genPackageInFile_struct_with_list_CachedRef ref.Ref
// package implemented by this file and registers it with the global
// type package definition cache.
func init() {
p := types.NewPackage([]types.TypeRef{
p := types.NewPackage([]types.Type{
types.MakeStructTypeRef("StructWithList",
[]types.Field{
types.Field{"l", types.MakeCompoundTypeRef(types.ListKind, types.MakePrimitiveTypeRef(types.UInt8Kind)), false},
@@ -74,9 +74,9 @@ func (s StructWithList) Def() (d StructWithListDef) {
return
}
var __typeRefForStructWithList types.TypeRef
var __typeRefForStructWithList types.Type
func (m StructWithList) TypeRef() types.TypeRef {
func (m StructWithList) Type() types.Type {
return __typeRefForStructWithList
}
@@ -110,7 +110,7 @@ func readerForStructWithList(v types.Value) []types.Value {
}
func (s StructWithList) Equals(other types.Value) bool {
return other != nil && __typeRefForStructWithList.Equals(other.TypeRef()) && s.Ref() == other.Ref()
return other != nil && __typeRefForStructWithList.Equals(other.Type()) && s.Ref() == other.Ref()
}
func (s StructWithList) Ref() ref.Ref {
@@ -170,145 +170,3 @@ func (s StructWithList) SetI(val int64) StructWithList {
s.ref = &ref.Ref{}
return s
}
// ListOfUInt8
type ListOfUInt8 struct {
l types.List
ref *ref.Ref
}
func NewListOfUInt8() ListOfUInt8 {
return ListOfUInt8{types.NewList(), &ref.Ref{}}
}
type ListOfUInt8Def []uint8
func (def ListOfUInt8Def) New() ListOfUInt8 {
l := make([]types.Value, len(def))
for i, d := range def {
l[i] = types.UInt8(d)
}
return ListOfUInt8{types.NewList(l...), &ref.Ref{}}
}
func (l ListOfUInt8) Def() ListOfUInt8Def {
d := make([]uint8, l.Len())
for i := uint64(0); i < l.Len(); i++ {
d[i] = uint8(l.l.Get(i).(types.UInt8))
}
return d
}
func (l ListOfUInt8) Equals(other types.Value) bool {
return other != nil && __typeRefForListOfUInt8.Equals(other.TypeRef()) && l.Ref() == other.Ref()
}
func (l ListOfUInt8) Ref() ref.Ref {
return types.EnsureRef(l.ref, l)
}
func (l ListOfUInt8) Chunks() (chunks []ref.Ref) {
chunks = append(chunks, l.TypeRef().Chunks()...)
chunks = append(chunks, l.l.Chunks()...)
return
}
func (l ListOfUInt8) ChildValues() []types.Value {
return append([]types.Value{}, l.l.ChildValues()...)
}
// A Noms Value that describes ListOfUInt8.
var __typeRefForListOfUInt8 types.TypeRef
func (m ListOfUInt8) TypeRef() types.TypeRef {
return __typeRefForListOfUInt8
}
func init() {
__typeRefForListOfUInt8 = types.MakeCompoundTypeRef(types.ListKind, types.MakePrimitiveTypeRef(types.UInt8Kind))
types.RegisterValue(__typeRefForListOfUInt8, builderForListOfUInt8, readerForListOfUInt8)
}
func builderForListOfUInt8(v types.Value) types.Value {
return ListOfUInt8{v.(types.List), &ref.Ref{}}
}
func readerForListOfUInt8(v types.Value) types.Value {
return v.(ListOfUInt8).l
}
func (l ListOfUInt8) Len() uint64 {
return l.l.Len()
}
func (l ListOfUInt8) Empty() bool {
return l.Len() == uint64(0)
}
func (l ListOfUInt8) Get(i uint64) uint8 {
return uint8(l.l.Get(i).(types.UInt8))
}
func (l ListOfUInt8) Slice(idx uint64, end uint64) ListOfUInt8 {
return ListOfUInt8{l.l.Slice(idx, end), &ref.Ref{}}
}
func (l ListOfUInt8) Set(i uint64, val uint8) ListOfUInt8 {
return ListOfUInt8{l.l.Set(i, types.UInt8(val)), &ref.Ref{}}
}
func (l ListOfUInt8) Append(v ...uint8) ListOfUInt8 {
return ListOfUInt8{l.l.Append(l.fromElemSlice(v)...), &ref.Ref{}}
}
func (l ListOfUInt8) Insert(idx uint64, v ...uint8) ListOfUInt8 {
return ListOfUInt8{l.l.Insert(idx, l.fromElemSlice(v)...), &ref.Ref{}}
}
func (l ListOfUInt8) Remove(idx uint64, end uint64) ListOfUInt8 {
return ListOfUInt8{l.l.Remove(idx, end), &ref.Ref{}}
}
func (l ListOfUInt8) RemoveAt(idx uint64) ListOfUInt8 {
return ListOfUInt8{(l.l.RemoveAt(idx)), &ref.Ref{}}
}
func (l ListOfUInt8) fromElemSlice(p []uint8) []types.Value {
r := make([]types.Value, len(p))
for i, v := range p {
r[i] = types.UInt8(v)
}
return r
}
type ListOfUInt8IterCallback func(v uint8, i uint64) (stop bool)
func (l ListOfUInt8) Iter(cb ListOfUInt8IterCallback) {
l.l.Iter(func(v types.Value, i uint64) bool {
return cb(uint8(v.(types.UInt8)), i)
})
}
type ListOfUInt8IterAllCallback func(v uint8, i uint64)
func (l ListOfUInt8) IterAll(cb ListOfUInt8IterAllCallback) {
l.l.IterAll(func(v types.Value, i uint64) {
cb(uint8(v.(types.UInt8)), i)
})
}
func (l ListOfUInt8) IterAllP(concurrency int, cb ListOfUInt8IterAllCallback) {
l.l.IterAllP(concurrency, func(v types.Value, i uint64) {
cb(uint8(v.(types.UInt8)), i)
})
}
type ListOfUInt8FilterCallback func(v uint8, i uint64) (keep bool)
func (l ListOfUInt8) Filter(cb ListOfUInt8FilterCallback) ListOfUInt8 {
out := l.l.Filter(func(v types.Value, i uint64) bool {
return cb(uint8(v.(types.UInt8)), i)
})
return ListOfUInt8{out, &ref.Ref{}}
}

View File

@@ -13,7 +13,7 @@ var __genPackageInFile_struct_with_union_field_CachedRef ref.Ref
// package implemented by this file and registers it with the global
// type package definition cache.
func init() {
p := types.NewPackage([]types.TypeRef{
p := types.NewPackage([]types.Type{
types.MakeStructTypeRef("StructWithUnionField",
[]types.Field{
types.Field{"a", types.MakePrimitiveTypeRef(types.Float32Kind), false},
@@ -70,9 +70,9 @@ func (s StructWithUnionField) Def() (d StructWithUnionFieldDef) {
return
}
var __typeRefForStructWithUnionField types.TypeRef
var __typeRefForStructWithUnionField types.Type
func (m StructWithUnionField) TypeRef() types.TypeRef {
func (m StructWithUnionField) Type() types.Type {
return __typeRefForStructWithUnionField
}
@@ -103,7 +103,7 @@ func readerForStructWithUnionField(v types.Value) []types.Value {
}
func (s StructWithUnionField) Equals(other types.Value) bool {
return other != nil && __typeRefForStructWithUnionField.Equals(other.TypeRef()) && s.Ref() == other.Ref()
return other != nil && __typeRefForStructWithUnionField.Equals(other.Type()) && s.Ref() == other.Ref()
}
func (s StructWithUnionField) Ref() ref.Ref {
@@ -300,7 +300,7 @@ func (s SetOfUInt8) Def() SetOfUInt8Def {
}
func (s SetOfUInt8) Equals(other types.Value) bool {
return other != nil && __typeRefForSetOfUInt8.Equals(other.TypeRef()) && s.Ref() == other.Ref()
return other != nil && __typeRefForSetOfUInt8.Equals(other.Type()) && s.Ref() == other.Ref()
}
func (s SetOfUInt8) Ref() ref.Ref {
@@ -308,7 +308,7 @@ func (s SetOfUInt8) Ref() ref.Ref {
}
func (s SetOfUInt8) Chunks() (chunks []ref.Ref) {
chunks = append(chunks, s.TypeRef().Chunks()...)
chunks = append(chunks, s.Type().Chunks()...)
chunks = append(chunks, s.s.Chunks()...)
return
}
@@ -318,9 +318,9 @@ func (s SetOfUInt8) ChildValues() []types.Value {
}
// A Noms Value that describes SetOfUInt8.
var __typeRefForSetOfUInt8 types.TypeRef
var __typeRefForSetOfUInt8 types.Type
func (m SetOfUInt8) TypeRef() types.TypeRef {
func (m SetOfUInt8) Type() types.Type {
return __typeRefForSetOfUInt8
}

View File

@@ -13,7 +13,7 @@ var __genPackageInFile_struct_with_unions_CachedRef ref.Ref
// package implemented by this file and registers it with the global
// type package definition cache.
func init() {
p := types.NewPackage([]types.TypeRef{
p := types.NewPackage([]types.Type{
types.MakeStructTypeRef("StructWithUnions",
[]types.Field{
types.Field{"a", types.MakeTypeRef(ref.Ref{}, 1), false},
@@ -76,9 +76,9 @@ func (s StructWithUnions) Def() (d StructWithUnionsDef) {
return
}
var __typeRefForStructWithUnions types.TypeRef
var __typeRefForStructWithUnions types.Type
func (m StructWithUnions) TypeRef() types.TypeRef {
func (m StructWithUnions) Type() types.Type {
return __typeRefForStructWithUnions
}
@@ -106,7 +106,7 @@ func readerForStructWithUnions(v types.Value) []types.Value {
}
func (s StructWithUnions) Equals(other types.Value) bool {
return other != nil && __typeRefForStructWithUnions.Equals(other.TypeRef()) && s.Ref() == other.Ref()
return other != nil && __typeRefForStructWithUnions.Equals(other.Type()) && s.Ref() == other.Ref()
}
func (s StructWithUnions) Ref() ref.Ref {
@@ -181,9 +181,9 @@ func (s __unionOfBOfFloat64AndCOfString) Def() (d __unionOfBOfFloat64AndCOfStrin
return
}
var __typeRefFor__unionOfBOfFloat64AndCOfString types.TypeRef
var __typeRefFor__unionOfBOfFloat64AndCOfString types.Type
func (m __unionOfBOfFloat64AndCOfString) TypeRef() types.TypeRef {
func (m __unionOfBOfFloat64AndCOfString) Type() types.Type {
return __typeRefFor__unionOfBOfFloat64AndCOfString
}
@@ -211,7 +211,7 @@ func readerFor__unionOfBOfFloat64AndCOfString(v types.Value) []types.Value {
}
func (s __unionOfBOfFloat64AndCOfString) Equals(other types.Value) bool {
return other != nil && __typeRefFor__unionOfBOfFloat64AndCOfString.Equals(other.TypeRef()) && s.Ref() == other.Ref()
return other != nil && __typeRefFor__unionOfBOfFloat64AndCOfString.Equals(other.Type()) && s.Ref() == other.Ref()
}
func (s __unionOfBOfFloat64AndCOfString) Ref() ref.Ref {
@@ -318,9 +318,9 @@ func (s __unionOfEOfFloat64AndFOfString) Def() (d __unionOfEOfFloat64AndFOfStrin
return
}
var __typeRefFor__unionOfEOfFloat64AndFOfString types.TypeRef
var __typeRefFor__unionOfEOfFloat64AndFOfString types.Type
func (m __unionOfEOfFloat64AndFOfString) TypeRef() types.TypeRef {
func (m __unionOfEOfFloat64AndFOfString) Type() types.Type {
return __typeRefFor__unionOfEOfFloat64AndFOfString
}
@@ -348,7 +348,7 @@ func readerFor__unionOfEOfFloat64AndFOfString(v types.Value) []types.Value {
}
func (s __unionOfEOfFloat64AndFOfString) Equals(other types.Value) bool {
return other != nil && __typeRefFor__unionOfEOfFloat64AndFOfString.Equals(other.TypeRef()) && s.Ref() == other.Ref()
return other != nil && __typeRefFor__unionOfEOfFloat64AndFOfString.Equals(other.Type()) && s.Ref() == other.Ref()
}
func (s __unionOfEOfFloat64AndFOfString) Ref() ref.Ref {

View File

@@ -13,7 +13,7 @@ var __leafDepPackageInFile_leafDep_CachedRef ref.Ref
// package implemented by this file and registers it with the global
// type package definition cache.
func init() {
p := types.NewPackage([]types.TypeRef{
p := types.NewPackage([]types.Type{
types.MakeStructTypeRef("S",
[]types.Field{
types.Field{"s", types.MakePrimitiveTypeRef(types.StringKind), false},
@@ -63,9 +63,9 @@ func (s S) Def() (d SDef) {
return
}
var __typeRefForS types.TypeRef
var __typeRefForS types.Type
func (m S) TypeRef() types.TypeRef {
func (m S) Type() types.Type {
return __typeRefForS
}
@@ -93,7 +93,7 @@ func readerForS(v types.Value) []types.Value {
}
func (s S) Equals(other types.Value) bool {
return other != nil && __typeRefForS.Equals(other.TypeRef()) && s.Ref() == other.Ref()
return other != nil && __typeRefForS.Equals(other.Type()) && s.Ref() == other.Ref()
}
func (s S) Ref() ref.Ref {
@@ -145,9 +145,9 @@ func NewE() E {
return E(0)
}
var __typeRefForE types.TypeRef
var __typeRefForE types.Type
func (e E) TypeRef() types.TypeRef {
func (e E) Type() types.Type {
return __typeRefForE
}