public bool EditorOnly_SetSuper(ref VisClass.Rep rep, VisClass _super) { VisClass visClass = _super; int num = 50; while (visClass != null) { if (visClass == this) { Debug.LogError("Self Reference Detected", this); return(false); } visClass = visClass._super; int num1 = num - 1; num = num1; if (num1 > 0) { continue; } Debug.LogError("Circular Dependancy Detected", this); return(false); } rep = null; this._super = _super; return(true); }
public void EditorOnly_Add(ref VisClass.Rep rep, string key, VisQuery value) { Array.Resize <string>(ref this.keys, (int)this.keys.Length + 1); Array.Resize <VisQuery>(ref this.values, (int)this.values.Length + 1); this.keys[(int)this.keys.Length - 1] = key; this.values[(int)this.values.Length - 1] = value; rep = null; }
public void EditorOnly_Rep(ref VisClass.Rep rep) { if (this.keys == null && this.values == null) { this.keys = new string[0]; this.values = new VisQuery[0]; } VisClass.Rep.Ref(ref rep, this); }
internal static void Recur(ref VisClass.Rep rep, VisClass klass) { if (klass._super != null) { Recur(ref rep, klass._super); foreach (Setting setting in rep.dict.Values) { setting.isInherited = true; } for (int i = 0; i < klass.keys.Length; i++) { string str = klass.keys[i]; if (!string.IsNullOrEmpty(str)) { Setting setting2; VisQuery query = klass.values[i]; if (!rep.dict.TryGetValue(str, out setting2)) { if (query == null) { continue; } setting2 = new Setting(str, klass, rep); rep.dict.Add(str, setting2); } else { rep.dict[str] = setting2 = setting2.Override(klass); } setting2.isInherited = false; setting2.query = query; } } } else { rep = new VisClass.Rep(); rep.klass = nklass; rep.dict = new Dictionary <string, Setting>(); for (int j = 0; j < klass.keys.Length; j++) { string str2 = klass.keys[j]; if (!string.IsNullOrEmpty(str2)) { VisQuery query2 = klass.values[j]; if (query2 != null) { Setting setting3 = new Setting(str2, klass, rep) { query = query2 }; rep.dict.Add(str2, setting3); } } } } }
internal static void Ref(ref VisClass.Rep rep, VisClass klass) { if (rep == null) { VisClass.Rep.nklass = klass; VisClass.Rep.building = true; VisClass.Rep.Recur(ref rep, klass); VisClass.Rep.building = false; VisClass.Rep.nklass = null; } }
public bool EditorOnly_Apply(ref VisClass.Rep rep) { return(rep == null ? false : rep.Apply()); }
internal Setting(string key, VisClass klass, VisClass.Rep rep) { this.key = key; this.rep = rep; this._inheritedClass = klass; }
internal static void Recur(ref VisClass.Rep rep, VisClass klass) { VisClass.Rep.Setting setting; if (!klass._super) { rep = new VisClass.Rep() { klass = VisClass.Rep.nklass, dict = new Dictionary <string, VisClass.Rep.Setting>() }; for (int i = 0; i < (int)klass.keys.Length; i++) { string str = klass.keys[i]; if (!string.IsNullOrEmpty(str)) { VisQuery visQuery = klass.values[i]; if (visQuery != null) { VisClass.Rep.Setting setting1 = new VisClass.Rep.Setting(str, klass, rep) { query = visQuery }; rep.dict.Add(str, setting1); } } } } else { VisClass.Rep.Recur(ref rep, klass._super); foreach (VisClass.Rep.Setting value in rep.dict.Values) { value.isInherited = true; } for (int j = 0; j < (int)klass.keys.Length; j++) { string str1 = klass.keys[j]; if (!string.IsNullOrEmpty(str1)) { VisQuery visQuery1 = klass.values[j]; if (rep.dict.TryGetValue(str1, out setting)) { Dictionary <string, VisClass.Rep.Setting> strs = rep.dict; VisClass.Rep.Setting setting2 = setting.Override(klass); setting = setting2; strs[str1] = setting2; } else { if (visQuery1 == null) { goto Label0; } setting = new VisClass.Rep.Setting(str1, klass, rep); rep.dict.Add(str1, setting); } setting.isInherited = false; setting.query = visQuery1; } Label0: } } }
internal static void Recur(ref VisClass.Rep rep, VisClass klass) { VisClass.Rep.Setting setting; if (!klass._super) { rep = new VisClass.Rep() { klass = VisClass.Rep.nklass, dict = new Dictionary<string, VisClass.Rep.Setting>() }; for (int i = 0; i < (int)klass.keys.Length; i++) { string str = klass.keys[i]; if (!string.IsNullOrEmpty(str)) { VisQuery visQuery = klass.values[i]; if (visQuery != null) { VisClass.Rep.Setting setting1 = new VisClass.Rep.Setting(str, klass, rep) { query = visQuery }; rep.dict.Add(str, setting1); } } } } else { VisClass.Rep.Recur(ref rep, klass._super); foreach (VisClass.Rep.Setting value in rep.dict.Values) { value.isInherited = true; } for (int j = 0; j < (int)klass.keys.Length; j++) { string str1 = klass.keys[j]; if (!string.IsNullOrEmpty(str1)) { VisQuery visQuery1 = klass.values[j]; if (rep.dict.TryGetValue(str1, out setting)) { Dictionary<string, VisClass.Rep.Setting> strs = rep.dict; VisClass.Rep.Setting setting2 = setting.Override(klass); setting = setting2; strs[str1] = setting2; } else { if (visQuery1 == null) { goto Label0; } setting = new VisClass.Rep.Setting(str1, klass, rep); rep.dict.Add(str1, setting); } setting.isInherited = false; setting.query = visQuery1; } Label0: } } }