public
Created

  • Download Gist
old.go
Go
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
type iStringer interface {
String(int) string
}
 
type tLibraryBase struct {
tBaseElement
elemCount int
elemName string
stringer func(int) iStringer
}
 
func (me *tBaseElement) initFromNode(xn *xmlx.Node) {
/* ... */
}
 
type tVisualSceneDecl struct{}
 
func newVisualSceneDecl(xn *xmlx.Node) (f *tVisualSceneDecl) {
f = &tVisualSceneDecl{}
return
}
 
func (me *tVisualSceneDecl) String(indent int) (str string) {
str = ""
return
}
 
type tVisualSceneInst struct{}
 
func newVisualSceneInst(xn *xmlx.Node) (f *tVisualSceneInst) {
f = &tVisualSceneInst{}
return
}
 
type tPhysicsSceneDecl struct{}
 
func newPhysicsSceneDecl(xn *xmlx.Node) (f *tPhysicsSceneDecl) {
f = &tPhysicsSceneDecl{}
return
}
 
func (me *tPhysicsSceneDecl) String(indent int) (str string) {
str = ""
return
}
 
type tPhysicsSceneInst struct{}
 
func newPhysicsSceneInst(xn *xmlx.Node) (f *tPhysicsSceneInst) {
f = &tPhysicsSceneInst{}
return
}
 
type tLibraryPhysicsScenes struct {
tLibraryBase
Elements []*tPhysicsSceneDecl
}
 
func newLibraryPhysicsScenes(xn *xmlx.Node, elemName string) (l *tLibraryPhysicsScenes) {
l = &tLibraryPhysicsScenes{}
c := l.tLibraryBase.initLib(xn, elemName)
l.Elements = make([]*tPhysicsSceneDecl, len(c))
l.tLibraryBase.stringer = func(index int) iStringer { return l.Elements[index] }
for i, n := range c {
l.Elements[i] = newPhysicsSceneDecl(n)
}
return
}
 
type tLibraryVisualScenes struct {
tLibraryBase
Elements []*tVisualSceneDecl
}
 
func newLibraryVisualScenes(xn *xmlx.Node, elemName string) (l *tLibraryVisualScenes) {
l = &tLibraryVisualScenes{}
c := l.tLibraryBase.initLib(xn, elemName)
l.Elements = make([]*tVisualSceneDecl, len(c))
l.tLibraryBase.stringer = func(index int) iStringer { return l.Elements[index] }
for i, n := range c {
l.Elements[i] = newVisualSceneDecl(n)
}
return
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.