Example #1
0
func Load(ls *persist.LoadSaver) core.Identifier {
	i := &Identifier{}
	i.name = ls.LoadString()
	i.details = ls.LoadString()
	i.noPriority = ls.LoadBool()
	i.zipDefault = ls.LoadBool()
	i.infos = make(map[string]formatInfo)
	le := ls.LoadSmallInt()
	for j := 0; j < le; j++ {
		i.infos[ls.LoadString()] = formatInfo{
			ls.LoadString(),
			ls.LoadString(),
			ls.LoadString(),
		}
	}
	i.eStart = ls.LoadInt()
	i.ePuids = ls.LoadStrings()
	i.mStart = ls.LoadInt()
	i.mPuids = ls.LoadStrings()
	i.cStart = ls.LoadInt()
	i.cPuids = ls.LoadStrings()
	i.bStart = ls.LoadInt()
	i.bPuids = ls.LoadStrings()
	i.tStart = ls.LoadSmallInt()
	return i
}
Example #2
0
func loadCM(ls *persist.LoadSaver) *ContainerMatcher {
	return &ContainerMatcher{
		startIndexes: ls.LoadInts(),
		conType:      containerType(ls.LoadTinyUInt()),
		nameCTest:    loadCTests(ls),
		parts:        ls.LoadInts(),
		priorities:   priority.Load(ls),
		extension:    ls.LoadString(),
	}
}
Example #3
0
func loadCTests(ls *persist.LoadSaver) map[string]*cTest {
	ret := make(map[string]*cTest)
	l := ls.LoadSmallInt()
	for i := 0; i < l; i++ {
		ret[ls.LoadString()] = &cTest{
			satisfied:   ls.LoadInts(),
			unsatisfied: ls.LoadInts(),
			bm:          bytematcher.Load(ls),
		}
	}
	return ret
}
Example #4
0
func Load(ls *persist.LoadSaver) Matcher {
	le := ls.LoadSmallInt()
	if le == 0 {
		return nil
	}
	ret := make(Matcher)
	for i := 0; i < le; i++ {
		k := ls.LoadString()
		r := make([]result, ls.LoadSmallInt())
		for j := range r {
			r[j] = result(ls.LoadSmallInt())
		}
		ret[k] = r
	}
	return ret
}