rtss-core/model/turnout.go

28 lines
386 B
Go

package model
import (
"strings"
)
// 道岔
type Turnout interface {
PipeElement
}
var _ Turnout = (*TurnoutImpl)(nil)
type TurnoutImpl struct {
*ThreePortsPipeElement
}
func NewTurnout(uid string) *TurnoutImpl {
if strings.Trim(uid, " ") == "" {
panic("Turnout uid is empty")
}
return &TurnoutImpl{
ThreePortsPipeElement: &ThreePortsPipeElement{
uid: uid,
},
}
}