public ArrayVariable(string name, StackFrame stackFrame, TargetArrayObject obj) { this.name = name; this.stackFrame = stackFrame; this.obj = obj; universalSubset = new ArraySubsetVariable(stackFrame, obj, new int[0]); }
public ArraySubsetVariable(StackFrame stackFrame, TargetArrayObject obj, int[] indicesPefix, int startIndex, int endIndex) { this.stackFrame = stackFrame; this.obj = obj; this.indicesPefix = indicesPefix; this.startIndex = startIndex; this.endIndex = endIndex; dimension = indicesPefix.Length; lowerBound = obj.GetLowerBound(stackFrame.Thread, dimension); upperBound = obj.GetUpperBound(stackFrame.Thread, dimension) - 1; // Uncoment to test that the whole int range can be handled //lowerBound = int.MinValue; //upperBound = int.MaxValue; }
public ArraySubsetVariable(StackFrame stackFrame, TargetArrayObject obj, int[] indicesPefix) : this(stackFrame, obj, indicesPefix, 0, 0) { this.startIndex = lowerBound; this.endIndex = upperBound; }
protected void FormatArray(Thread target, TargetArrayObject aobj, TargetArrayBounds bounds, int dimension, int[] indices) { Append ("[ "); indent_level += 3; bool first = true; int[] new_indices = new int [dimension + 1]; indices.CopyTo (new_indices, 0); int lower, upper; if (!bounds.IsMultiDimensional) { lower = 0; upper = bounds.Length - 1; } else { lower = bounds.LowerBounds [dimension]; upper = bounds.UpperBounds [dimension]; } for (int i = lower; i <= upper; i++) { if (!first) { Append (", "); CheckLineWrap (); } first = false; new_indices [dimension] = i; if (dimension + 1 < bounds.Rank) FormatArray (target, aobj, bounds, dimension + 1, new_indices); else { TargetObject eobj = aobj.GetElement (target, new_indices); FormatObjectRecursed (target, eobj, false); } } Append (first ? "]" : " ]"); indent_level -= 3; }
protected void FormatArray(Thread target, TargetArrayObject aobj) { TargetArrayBounds bounds = aobj.GetArrayBounds (target); if (bounds.IsUnbound) Append ("[ ]"); else FormatArray (target, aobj, bounds, 0, new int [0]); }
public ArrayAdaptor (MdbEvaluationContext ctx, TargetArrayObject array) { this.ctx = ctx; this.array = array; }