public override void Decode(string key, CfgData data) { switch (key) { case "b": data.Decode(base.Decode); break; case "tgs": data.ToList(out _usageTags); break; } }
public void Decode(string key, CfgData data) { switch (key) { case "m": min = data.ToFloat(); break; case "v": Value = data.ToFloat(); break; case "x": max = data.ToFloat(); break; } }
public override void Decode(string key, CfgData data) { switch (key) { case "inds": List <int> inds; data.ToList(out inds); foreach (int i in inds) { Set(i, true); } count = inds.Count; inds = null; break; case "last": data.ToInt(ref lastFreeIndex); break; } }
public override void Decode(string key, CfgData data) { switch (key) { case "inds": data.ToList(out inds); break; case "vals": List <int> vals; data.ToList(out vals); for (int i = 0; i < vals.Count; i++) { Set(inds[i], vals[i]); } inds = null; count = vals.Count; break; case "last": data.ToInt(ref lastFreeIndex); break; } }
public static void DecodeFull <T>(this T obj, CfgData data) where T : class, ICfg { var cstm = obj as ICfgCustom; if (cstm != null) { if (cstm == _loopSafe) { new CfgDecoder(data).DecodeTagsFor(obj); Debug.LogError("Decode Full is probably calld from Decode Custom call"); } else { _loopSafe = cstm; cstm.Decode(data); } } else { new CfgDecoder(data).DecodeTagsFor(obj); } }
public void Decode(string key, CfgData data) { switch (key) { case "adl": allowDuplicants = data.ToBool(); break; case "insp": inspected = data.ToInt(0); break; case "pi": previousInspected = data.ToInt(0); break; case "fld": folderToSearch = data.ToString(); break; case "ktd": keepTypeData = data.ToBool(); break; case "del": allowDelete = data.ToBool(); break; case "reord": allowReorder = data.ToBool(); break; case "st": data.ToInt(ref listSectionStartIndex); break; case "s": searchData.DecodeFull(data); break; } }
public CfgDecoder(CfgData data) { _data = data.ToString() ?? ""; _position = 0; }
public static void DecodeTagsFrom <T>(this T obj, CfgData data) where T : class, ICfgCustom => new CfgDecoder(data).DecodeTagsFor(obj);
public void Decode(CfgData data) { new CfgDecoder(data).DecodeTagsFor(ref this); dynamicMin = min; dynamicMax = max; }
public void Decode(CfgData data) { Clear(); this.DecodeTagsFrom(data); }
public abstract void Decode(string key, CfgData data);