示例#1
0
 public bool IsCompatible(RecordValue x)
 {
     for (int i = 0; i < names.Count; ++i)
     {
         string    name = names[i];
         HeronType type = types[i];
         int       n    = x.GetFieldIndex(name);
         if (n < 0)
         {
             return(false);
         }
         HeronValue val  = x.GetValue(n);
         HeronValue test = val.As(type);
         if (test == null)
         {
             return(false);
         }
     }
     return(true);
 }
示例#2
0
 public bool IsCompatible(RecordValue x)
 {
     for (int i = 0; i < names.Count; ++i)
     {
         string name = names[i];
         HeronType type = types[i];
         int n = x.GetFieldIndex(name);
         if (n < 0)
             return false;
         HeronValue val = x.GetValue(n);
         HeronValue test = val.As(type);
         if (test == null)
             return false;
     }
     return true;
 }
示例#3
0
 public HeronValue GetIndexValue(RecordValue rec)
 {
     return rec.GetValue(GetIndexField());
 }
示例#4
0
 public HeronValue GetIndexValue(RecordValue rec)
 {
     return(rec.GetValue(GetIndexField()));
 }