Inheritance: NS_ValCommon.ValInfoBasic, I_Drawable
Exemplo n.º 1
0
 static public void Parse(GErr gerr, 
     out DefsGV.TypeGV typeGV, out int[] indsGlyph)
 {
     typeGV=DefsGV.TypeGV.Invalid;
     indsGlyph=null;
     string strSign=gerr.SignCreator;
     if (strSign==null)
     {
         throw new ExceptionGlyph("GErrSign","Parse",null);
     }
     string[] strs=strSign.Split('_');
     if (strs.Length<1)
     {
         throw new ExceptionGlyph("GErrSign","Parse",null);
     }
     typeGV=(DefsGV.TypeGV)Enum.Parse(typeof(DefsGV.TypeGV),strs[0]);
     if ((strs.Length)>1)
     {
         indsGlyph=new int[strs.Length-1];
     }
     for (int iInd=1; iInd<strs.Length; iInd++)
     {
         indsGlyph[iInd]=Int32.Parse(strs[iInd]);
     }
 }
Exemplo n.º 2
0
 /*
  *        METHODS
  */
 public bool Add(GErr gerrToAdd)
 {
     if (gerrToAdd==null)
     {
         throw new ExceptionGlyph("GErrList","Add","Null argument");
     }
     int numErrBefore=this.gerrs.Count;
     this.gerrs.Add(gerrToAdd);
     int numErrAfter=this.gerrs.Count;
     return (numErrAfter>numErrBefore);    
 }
Exemplo n.º 3
0
 public bool Delete(GErr gerrToDelete)
 {
     int numErrBefore=this.gerrs.Count;
     int poz;
     for (poz=0; poz<numErrBefore; poz++)
     {
         if ((object)this.gerrs[poz]==(object)gerrToDelete)
             break;
     }
     if (poz==numErrBefore)
         return false;
     this.gerrs.RemoveAt(poz);
     int numErrAfter=this.gerrs.Count;
     return (numErrAfter<numErrBefore);
 }
Exemplo n.º 4
0
 static public void Sign(GErr gerr, DefsGV.TypeGV typeGV, params int[] indsGlyph)
 {
     if (gerr==null)
     {
         throw new ExceptionGlyph("GErrSign","Sign","NullArgument");
     }
     StringBuilder sb=new StringBuilder("");
     sb.Append(Enum.GetName(typeof(DefsGV.TypeGV),typeGV));
     sb.Append("_");
     foreach (int indGlyph in indsGlyph)
     {
         sb.Append(indGlyph+"_");
     }
     gerr.SignCreator=sb.ToString();
 }
Exemplo n.º 5
0
 /*
         static public bool DICFunc_HasTypeExact(ValInfoBasic info, Type typeGErr)
         {
             GErr gerr=info as GErr;
             if (gerr==null)
                 return false;
             return (gerr is typeGErr);
         }
 */
 static public bool DICFunc_HasSeverity(ValInfoBasic info, GErr.TypeGErrSeverity severity)
 {
     GErr gerr=info as GErr;
     if (gerr==null)
         return false;   // has NO ANY severity
     return (gerr.severity==severity);
 }
Exemplo n.º 6
0
 public bool HasSeverity(int indexGlyph,   
     GScope.TypeGScope scope,   
     GErr.TypeGErrSeverity severity)
 {    
     if ((indexGlyph!=GConsts.IND_ANY)&&(indexGlyph!=this.IndexGlyphOwner))
         return false;
     if (!GScope.GScInterfer(scope, this.GetScope))
         return false;
     return (severity==this.Severity);
 }
Exemplo n.º 7
0
 public bool DICFunc(GErr gerr)
 {
     return gerr.HasErrorType(this.indexGlyph,this.scope,this.typeGErr);
 }
Exemplo n.º 8
0
 static public DefsGV.TypeGV GetTypeErrCreator(GErr gerr)
 {
     string strSign=gerr.SignCreator;
     foreach (string strTypeGV in Enum.GetNames(typeof(DefsGV.TypeGV)))
     {
         if (strSign.StartsWith(strTypeGV))
         {
             return (DefsGV.TypeGV)(Enum.Parse(typeof(DefsGV.TypeGV),strTypeGV));
         }
     }
     throw new ExceptionGlyph("GErrSign","GetTypeErrCreator",null);
     //return DefsGV.TypeGV.Invalid;
 }
Exemplo n.º 9
0
 static public bool GetIndGlyph(GErr gerr, out int indGlyph)
 {
     indGlyph=GConsts.IND_UNINITIALIZED;
     string sign=gerr.SignCreator;
     if (sign==null)
         return false;
     string[] strAux=sign.Split('_');
     if (strAux.Length<2)
         return false;
     indGlyph=Int32.Parse(strAux[1]);
     return true;
 }