本文整理匯總了Golang中github.com/hhkbp2/go-hsm.State類的典型用法代碼示例。如果您正苦於以下問題:Golang State類的具體用法?Golang State怎麽用?Golang State使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了State類的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: NewStarState
func NewStarState(super hsm.State) *StarState {
object := &StarState{
StateHead: hsm.NewStateHead(super),
}
super.AddChild(object)
return object
}
示例2: NewCommentState
func NewCommentState(super hsm.State) *CommentState {
object := &CommentState{
StateHead: hsm.NewStateHead(super),
}
super.AddChild(object)
return object
}
示例3: NewS1State
func NewS1State(super hsm.State) *S1State {
object := &S1State{
NewVerboseStateHead(super),
}
object.VerboseStateHead.ID = object.ID()
super.AddChild(object)
return object
}
示例4: NewCodeState
func NewCodeState(super hsm.State) *CodeState {
// initialized CodeState
object := &CodeState{
StateHead: hsm.NewStateHead(super),
entryCount: 0,
initCount: 0,
}
// hook up to super
super.AddChild(object)
return object
}