- private static int MakePosition (int pos, bool front_inclusive)
- {
- return (pos << 2) + (front_inclusive ? -1 : 1);
- }
-
- private MInterval (int start, int end)
- {
- if (start > end)
- throw new Exception ("Invalid Interval Range");
- this.total_start = (start << 2) + 1;
- this.total_end = (end << 2) + -1;
- this.stack = new Stack<MTextProperty> ();
- this.nodes = 1;
- }
-
- public MInterval (int start, bool front_inclusive,
- int end, bool rear_inclusive)
- {
- if (start > end)
- throw new Exception ("Invalid Interval Range");
- this.total_start = (start << 2) + (front_inclusive ? -1 : 1);
- this.total_end = (end << 2) + (rear_inclusive ? 1 : -1);
- this.stack = new Stack<MTextProperty> ();
- this.nodes = 1;
- }
-