示例#1
0
 /// <summary>
 /// Static constructor to build all the instance and the dictionary.
 /// </summary>
 static TQualifiers()
 {
     N    = new TQualifiers(false, false, false);
     C    = new TQualifiers(true, false, false);
     R    = new TQualifiers(false, true, false);
     V    = new TQualifiers(false, false, true);
     CR   = new TQualifiers(true, true, false);
     CV   = new TQualifiers(true, false, true);
     RV   = new TQualifiers(false, true, true);
     CRV  = new TQualifiers(true, true, true);
     dict = new Dictionary <Tuple <bool, bool, bool>, TQualifiers> {
         { new Tuple <bool, bool, bool>(false, false, false), N },
         { new Tuple <bool, bool, bool>(true, false, false), C },
         { new Tuple <bool, bool, bool>(false, true, false), R },
         { new Tuple <bool, bool, bool>(false, false, true), V },
         { new Tuple <bool, bool, bool>(true, true, false), CR },
         { new Tuple <bool, bool, bool>(true, false, true), CV },
         { new Tuple <bool, bool, bool>(false, true, true), RV },
         { new Tuple <bool, bool, bool>(true, true, true), CRV }
     };
 }
示例#2
0
 /// <summary>
 /// Variable length array derivation.
 /// </summary>
 /// <param name="qualifiers"></param>
 /// <param name="store"></param>
 /// <returns></returns>
 public T VArr(TQualifiers qualifiers = null)
 {
     qualifiers = qualifiers ?? TQualifiers.N;
     return(new T(new TVArr(this), qualifiers));
 }
示例#3
0
 /// <summary>
 /// Complete array derivation.
 /// </summary>
 /// <param name="qualifiers"></param>
 /// <param name="lr"></param>
 /// <returns></returns>
 public T Arr(int n, TQualifiers qualifiers = null)
 {
     qualifiers = qualifiers ?? TQualifiers.N;
     return(new T(new TCArr(this, n), qualifiers));
 }
示例#4
0
 /// <summary>
 /// XOR the qualifiers.
 /// </summary>
 /// <param name="qualifiers"></param>
 /// <returns></returns>
 public T Qualify(TQualifiers qualifiers)
 {
     return(new T(nake, qualifiers | this.qualifiers));
 }
示例#5
0
 public T(TUnqualified nake, TQualifiers qualifiers)
 {
     this.nake       = nake;
     this.qualifiers = qualifiers;
 }
示例#6
0
 /// <summary>
 /// Qualify this type.
 /// </summary>
 /// <param name="qualifiers"></param>
 /// <param name="lr"></param>
 /// <returns></returns>
 public T Qualify(TQualifiers qualifiers)
 {
     return(new T(this, qualifiers));
 }