Ejemplo n.º 1
0
            /// <summary>
            /// Constructs the checker.
            /// </summary>
            /// <param name="scheme"></param>
            /// <param name="ranges"></param>
            public RangeChecker(BlindSearch scheme, SelectableRange[] ranges)
            {
                this.scheme = scheme;

                int size = ranges.Length;

                lowerFlags = new byte[size];
                upperFlags = new byte[size];
                lowerCells = new DataObject[size];
                upperCells = new DataObject[size];
                for (int i = 0; i < ranges.Length; ++i)
                {
                    SetupRange(i, ranges[i]);
                }
            }
Ejemplo n.º 2
0
            /// <summary>
            /// Constructs the checker.
            /// </summary>
            /// <param name="scheme"></param>
            /// <param name="ranges"></param>
            public RangeChecker(BlindSearch scheme, SelectableRange[] ranges)
            {
                this.scheme = scheme;

                int size = ranges.Length;
                lowerFlags = new byte[size];
                upperFlags = new byte[size];
                lowerCells = new DataObject[size];
                upperCells = new DataObject[size];
                for (int i = 0; i < ranges.Length; ++i) {
                    SetupRange(i, ranges[i]);
                }
            }
Ejemplo n.º 3
0
        /// <inheritdoc/>
        internal override SelectableScheme GetSelectableSchemeFor(int column, int originalColumn, Table table)
        {
            SelectableScheme scheme = columnScheme[column];
            if (scheme == null) {
                scheme = new BlindSearch(this, column);
                columnScheme[column] = scheme;
            }

            // If we are getting a scheme for this table, simple return the information
            // from the column_trees Vector.
            if (table == this)
                return scheme;

            // Otherwise, get the scheme to calculate a subset of the given scheme.
            return scheme.GetSubsetScheme(table, originalColumn);
        }
Ejemplo n.º 4
0
 /// <summary>
 /// Blanks all the column schemes in this table to a specific 
 /// type of scheme.
 /// </summary>
 /// <param name="type">The type of the new scheme to set. If 0 
 /// then <see cref="InsertSearch"/> (fast but takes up memory - 
 /// requires each insert and delete from the table to be logged). 
 /// If 1 then <see cref="BlindSearch"/> (slower but uses no memory 
 /// and doesn't require insert and delete to be logged).</param>
 protected virtual void BlankSelectableSchemes(int type)
 {
     columnScheme = new SelectableScheme[ColumnCount];
     for (int i = 0; i < columnScheme.Length; ++i) {
         if (type == 0) {
             columnScheme[i] = new InsertSearch(this, i);
         } else if (type == 1) {
             columnScheme[i] = new BlindSearch(this, i);
         }
     }
 }