Exemplo n.º 1
0
func (c *ContainerMatcher) save(ls *persist.LoadSaver) {
	ls.SaveInts(c.startIndexes)
	ls.SaveTinyUInt(int(c.conType))
	saveCTests(ls, c.nameCTest)
	ls.SaveInts(c.parts)
	c.priorities.Save(ls)
	ls.SaveString(c.extension)
}
Exemplo n.º 2
0
func saveCTests(ls *persist.LoadSaver, ct map[string]*cTest) {
	ls.SaveSmallInt(len(ct))
	for k, v := range ct {
		ls.SaveString(k)
		ls.SaveInts(v.satisfied)
		ls.SaveInts(v.unsatisfied)
		v.bm.Save(ls)
	}
}
Exemplo n.º 3
0
func (m Matcher) Save(ls *persist.LoadSaver) {
	ls.SaveSmallInt(len(m))
	for k, v := range m {
		ls.SaveString(k)
		ls.SaveSmallInt(len(v))
		for _, w := range v {
			ls.SaveSmallInt(int(w))
		}
	}
}
Exemplo n.º 4
0
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)
}