コード例 #1
0
        // update constraintStruct.axisFields as well, if it's new LocatedActiveAxis
        public int PushKS(int errline, int errcol)
        {
            // new KeySequence each time
            KeySequence ks = new KeySequence(_cs.TableDim, errline, errcol);

            // needs to clear KSStruct before using
            KSStruct kss;

            if (_KSpointer < _KSs.Count)
            {
                // reuse, clear up KSs.KSpointer
                kss    = (KSStruct)_KSs[_KSpointer] !;
                kss.ks = ks;
                // reactivate LocatedActiveAxis
                for (int i = 0; i < _cs.TableDim; i++)
                {
                    kss.fields[i].Reactivate(ks);               // reassociate key sequence
                }
            }
            else
            { // "==", new
                kss = new KSStruct(ks, _cs.TableDim);
                for (int i = 0; i < _cs.TableDim; i++)
                {
                    kss.fields[i] = new LocatedActiveAxis(_cs.constraint.Fields[i], ks, i);
                    _cs.axisFields.Add(kss.fields[i]);          // new, add to axisFields
                }
                _KSs.Add(kss);
            }

            kss.depth = this.CurrentDepth - 1;

            return(_KSpointer++);
        }
 public int PushKS(int errline, int errcol)
 {
     KSStruct struct2;
     KeySequence ks = new KeySequence(this.cs.TableDim, errline, errcol);
     if (this.KSpointer < this.KSs.Count)
     {
         struct2 = (KSStruct) this.KSs[this.KSpointer];
         struct2.ks = ks;
         for (int i = 0; i < this.cs.TableDim; i++)
         {
             struct2.fields[i].Reactivate(ks);
         }
     }
     else
     {
         struct2 = new KSStruct(ks, this.cs.TableDim);
         for (int j = 0; j < this.cs.TableDim; j++)
         {
             struct2.fields[j] = new LocatedActiveAxis(this.cs.constraint.Fields[j], ks, j);
             this.cs.axisFields.Add(struct2.fields[j]);
         }
         this.KSs.Add(struct2);
     }
     struct2.depth = base.CurrentDepth - 1;
     return this.KSpointer++;
 }
コード例 #3
0
        public int PushKS(int errline, int errcol)
        {
            KSStruct    struct2;
            KeySequence ks = new KeySequence(this.cs.TableDim, errline, errcol);

            if (this.KSpointer < this.KSs.Count)
            {
                struct2    = (KSStruct)this.KSs[this.KSpointer];
                struct2.ks = ks;
                for (int i = 0; i < this.cs.TableDim; i++)
                {
                    struct2.fields[i].Reactivate(ks);
                }
            }
            else
            {
                struct2 = new KSStruct(ks, this.cs.TableDim);
                for (int j = 0; j < this.cs.TableDim; j++)
                {
                    struct2.fields[j] = new LocatedActiveAxis(this.cs.constraint.Fields[j], ks, j);
                    this.cs.axisFields.Add(struct2.fields[j]);
                }
                this.KSs.Add(struct2);
            }
            struct2.depth = base.CurrentDepth - 1;
            return(this.KSpointer++);
        }
コード例 #4
0
        // update constraintStruct.axisFields as well, if it's new LocatedActiveAxis
        public int PushKS (int errline, int errcol) {
            // new KeySequence each time
            KeySequence ks = new KeySequence(cs.TableDim, errline, errcol);

            // needs to clear KSStruct before using
            KSStruct kss;
            if (KSpointer < KSs.Count) {
                // reuse, clear up KSs.KSpointer
                kss = (KSStruct) KSs[KSpointer];
                kss.ks = ks;
                // reactivate LocatedActiveAxis
                for (int i = 0; i < cs.TableDim; i ++) {
                    kss.fields[i].Reactivate(ks);               // reassociate key sequence
                }
            }
            else { // "==", new
                kss = new KSStruct(ks, cs.TableDim);
                for (int i = 0; i < cs.TableDim; i ++) {
                    kss.fields[i] = new LocatedActiveAxis (cs.constraint.Fields[i], ks, i);
                    cs.axisFields.Add (kss.fields[i]);          // new, add to axisFields
                }
                KSs.Add(kss);
            }
            
            kss.depth = this.CurrentDepth - 1;
            
            return (KSpointer ++);
        }