func (g *Global) CleanupNodeType(nt bh.NodeTypeIf) { for _, impl := range nt.Implementation() { if impl.ImplementationType() == bh.NodeTypeGraph { g.CleanupNodeTypesFromNodes(impl.Graph().Nodes()) } } freesp.RemoveRegisteredNodeType(nt) }
func CreateXmlNodeType(t bh.NodeTypeIf) *backend.XmlNodeType { ret := backend.XmlNodeTypeNew(t.TypeName()) for _, p := range t.InPorts() { ret.InPort = append(ret.InPort, *CreateXmlNamedInPort(p)) } for _, p := range t.OutPorts() { ret.OutPort = append(ret.OutPort, *CreateXmlNamedOutPort(p)) } for _, impl := range t.Implementation() { ret.Implementation = append(ret.Implementation, *CreateXmlImplementation(impl)) } return ret }