本文整理匯總了Golang中github.com/richardlehane/siegfried/pkg/core/persist.LoadSaver.SaveByte方法的典型用法代碼示例。如果您正苦於以下問題:Golang LoadSaver.SaveByte方法的具體用法?Golang LoadSaver.SaveByte怎麽用?Golang LoadSaver.SaveByte使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類github.com/richardlehane/siegfried/pkg/core/persist.LoadSaver
的用法示例。
在下文中一共展示了LoadSaver.SaveByte方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: Save
// Save persists the pattern.
func (s *RBMHSequence) Save(ls *persist.LoadSaver) {
ls.SaveByte(rbmhLoader)
ls.SaveBytes(s.Seq)
for _, v := range s.Shift {
ls.SaveSmallInt(v)
}
}
示例2: Save
// Save persists the pattern.
func (l List) Save(ls *persist.LoadSaver) {
ls.SaveByte(listLoader)
ls.SaveSmallInt(len(l))
for _, pat := range l {
pat.Save(ls)
}
}
示例3: Save
// Save frame to a LoadSaver.
func (w Window) Save(ls *persist.LoadSaver) {
ls.SaveByte(windowLoader)
ls.SaveByte(byte(w.OffType))
ls.SaveInt(w.MinOff)
ls.SaveInt(w.MaxOff)
w.Pattern.Save(ls)
}
示例4: saveKeyFrames
func saveKeyFrames(ls *persist.LoadSaver, kfs [][]keyFrame) {
ls.SaveSmallInt(len(kfs))
for _, v := range kfs {
ls.SaveSmallInt(len(v))
for _, kf := range v {
ls.SaveByte(byte(kf.typ))
ls.SaveInt(int(kf.seg.pMin))
ls.SaveInt(int(kf.seg.pMax))
ls.SaveSmallInt(kf.seg.lMin)
ls.SaveSmallInt(kf.seg.lMax)
ls.SaveInt(int(kf.key.pMin))
ls.SaveInt(int(kf.key.pMax))
ls.SaveSmallInt(kf.key.lMin)
ls.SaveSmallInt(kf.key.lMax)
}
}
}
示例5: Save
func (i *Identifier) Save(ls *persist.LoadSaver) {
ls.SaveByte(core.Pronom)
ls.SaveString(i.name)
ls.SaveString(i.details)
ls.SaveBool(i.noPriority)
ls.SaveSmallInt(len(i.infos))
for k, v := range i.infos {
ls.SaveString(k)
ls.SaveString(v.name)
ls.SaveString(v.version)
ls.SaveString(v.mimeType)
}
ls.SaveInt(i.eStart)
ls.SaveStrings(i.ePuids)
ls.SaveInt(i.cStart)
ls.SaveStrings(i.cPuids)
ls.SaveInt(i.bStart)
ls.SaveStrings(i.bPuids)
ls.SaveSmallInt(i.tStart)
}
示例6: Save
func (am AnyMask) Save(ls *persist.LoadSaver) {
ls.SaveByte(anyMaskLoader)
ls.SaveByte(byte(am))
}