/* * METHODS: UPDATES */ internal void OnGM(int indGlyph, DefsGM.TypeGM typeGM, bool isCaller) { Glyph glyph = this.gStore.GGet(indGlyph); if ((isCaller) && (glyph == null)) { throw new ExceptionGlyph("FManager", "OnGM", "Null argument"); } ArrayList arrCompDep = this.grel.GetCompDep(indGlyph); if (arrCompDep != null) { foreach (int indCompDep in arrCompDep) { this.OnGM(indCompDep, typeGM, false); } } /* * IN ANY CASE */ // clear self-errors on SourceValidator if (isCaller && DefsGM.IsSourceValidator(typeGM)) { this.gerrPool.ClearByGV(indGlyph, DefsGV.From(typeGM)); } // INVALIDATION TABLE: // // Itself Dependents // VSrc VBind VPure VSrc VBind VPure // // Validator SOURCE No Yes Yes No Yes Yes // // Validator BINDING No No Yes No Yes Yes // // MODIFIER PURE Yes Yes Yes Yes Yes Yes // | | // BUT: does not clear errors // VSrc clears its errors by itself if (DefsGM.IsSourceValidator(typeGM)) { // ValidateTypeGlyphSource // ValidateSimpSource // ValidateCompBind foreach (DefsGV.TypeGV typeGV in Enum.GetValues(typeof(DefsGV.TypeGV))) { if (DefsGV.IsTest(typeGV)) { // invalidate & clear errors if (DefsGV.IsSourceValidator(typeGV)) { continue; } glyph.StatusVal(typeGV).IsValid = false; this.gerrPool.ClearByGV(indGlyph, typeGV); } } } else if (typeGM == DefsGM.TypeGM.ValidateCompBind) { // ValidateCompBind foreach (DefsGV.TypeGV typeGV in Enum.GetValues(typeof(DefsGV.TypeGV))) { if (DefsGV.IsTest(typeGV)) { if (DefsGV.IsSourceValidator(typeGV)) { continue; } if (isCaller && (typeGV == DefsGV.TypeGV.ValidateCompBind)) { continue; } glyph.StatusVal(typeGV).IsValid = false; this.gerrPool.ClearByGV(indGlyph, typeGV); } } } else { // Pure Modifier foreach (DefsGV.TypeGV typeGV in Enum.GetValues(typeof(DefsGV.TypeGV))) { if (DefsGV.IsTest(typeGV)) { glyph.StatusVal(typeGV).IsValid = false; if (!DefsGV.IsSourceValidator(typeGV)) { this.gerrPool.ClearByGV(indGlyph, typeGV); } } } } if (!this.indGM.Contains(indGlyph)) { this.indGM.Add(indGlyph); } }
public static bool IsContentValidator(TypeGV typeGV) { return(DefsGV.IsTest(typeGV) && (!DefsGV.IsSourceValidator(typeGV)) && (!DefsGV.IsBindingValidator(typeGV))); }