本文整理汇总了Golang中github.com/axel-freesp/sge/interface/behaviour.SignalTypeIf类的典型用法代码示例。如果您正苦于以下问题:Golang SignalTypeIf类的具体用法?Golang SignalTypeIf怎么用?Golang SignalTypeIf使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了SignalTypeIf类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Golang代码示例。
示例1: RemoveRegisteredSignalType
func RemoveRegisteredSignalType(st bh.SignalTypeIf) {
name := st.TypeName()
delete(signalTypes, name)
_, ok := registeredSignalTypes.Find(name)
if ok {
registeredSignalTypes.Remove(name)
}
}
开发者ID:axel-freesp,项目名称:sge,代码行数:8,代码来源:globals.go
示例2: CreateXmlSignalType
func CreateXmlSignalType(s bh.SignalTypeIf) *backend.XmlSignalType {
var scope, mode string
if s.Scope() == bh.Local {
scope = "local"
}
if s.Mode() == bh.Synchronous {
mode = "sync"
}
return backend.XmlSignalTypeNew(s.TypeName(), scope, mode, s.CType(), s.ChannelId())
}
开发者ID:axel-freesp,项目名称:sge,代码行数:10,代码来源:backendconversions.go
示例3: AddSignalType
func (l *library) AddSignalType(s bh.SignalTypeIf) (ok bool) {
for _, st := range l.signalTypes.SignalTypes() {
if st.TypeName() == s.TypeName() {
log.Printf(`library.AddSignalType: warning: adding
duplicate signal type definition %s (ignored)`, s.TypeName())
return
}
}
ok = true
l.signalTypes.Append(s)
return
}
开发者ID:axel-freesp,项目名称:sge,代码行数:12,代码来源:library.go
示例4: LibraryUsesSignalType
func LibraryUsesSignalType(l bh.LibraryIf, st bh.SignalTypeIf) bool {
for _, t := range l.SignalTypes() {
if t.TypeName() == st.TypeName() {
return true
}
}
for _, t := range l.NodeTypes() {
for _, impl := range t.Implementation() {
if impl.ImplementationType() == bh.NodeTypeGraph {
if SignalGraphTypeUsesSignalType(impl.Graph(), st) {
return true
}
}
}
}
return false
}
开发者ID:axel-freesp,项目名称:sge,代码行数:17,代码来源:library.go
示例5: RemoveSignalType
func (l *library) RemoveSignalType(st bh.SignalTypeIf) {
for _, ntName := range freesp.GetRegisteredNodeTypes() {
nt, ok := freesp.GetNodeTypeByName(ntName)
if !ok {
log.Panicf("library.RemoveSignalType internal error: node type %s\n", ntName)
}
for _, p := range nt.InPorts() {
if p.SignalType().TypeName() == st.TypeName() {
log.Printf(`library.RemoveSignalType warning:
bh.SignalTypeIf %v is still in use\n`, st)
return
}
}
for _, p := range nt.OutPorts() {
if p.SignalType().TypeName() == st.TypeName() {
log.Printf(`library.RemoveSignalType warning:
bh.SignalTypeIf %v is still in use\n`, st)
return
}
}
}
SignalTypeDestroy(st)
l.signalTypes.Remove(st)
}
开发者ID:axel-freesp,项目名称:sge,代码行数:24,代码来源:library.go
示例6: RegisterSignalType
func RegisterSignalType(st bh.SignalTypeIf) {
signalTypes[st.TypeName()] = st
registeredSignalTypes.Append(st.TypeName())
}
开发者ID:axel-freesp,项目名称:sge,代码行数:4,代码来源:globals.go
示例7: addOutPort
func (t *nodeType) addOutPort(name string, pType bh.SignalTypeIf) {
t.outPorts.Append(PortTypeNew(name, pType.TypeName(), gr.OutPort))
}
开发者ID:axel-freesp,项目名称:sge,代码行数:3,代码来源:nodetype.go
示例8: signalTypeCpmpatible
func signalTypeCpmpatible(s1, s2 bh.SignalTypeIf) bool {
if s1.TypeName() != s2.TypeName() {
return true
}
if s1.CType() != s2.CType() {
return false
}
if s1.Scope() != s2.Scope() {
return false
}
if s1.ChannelId() != s2.ChannelId() {
return false
}
if s1.Mode() != s2.Mode() {
return false
}
return true
}
开发者ID:axel-freesp,项目名称:sge,代码行数:18,代码来源:signaltype.go
注:本文中的github.com/axel-freesp/sge/interface/behaviour.SignalTypeIf类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论