Lines Matching defs:index

58 	inline	bool				RemoveRanges(int32 index, int32 count = 1);
69 inline const RangeType& RangeAt(int32 index) const
70 { return fRanges.ElementAt(index); }
72 inline const RangeType& operator[](int32 index) const
73 { return fRanges[index]; }
78 inline RangeType& _RangeAt(int32 index)
79 { return fRanges.ElementAt(index); }
124 int32 index = InsertionIndex(offset);
128 int32 endIndex = index;
129 // index after the last affected range
135 if (index > 0 && offset == RangeAt(index - 1).EndOffset())
136 index--;
138 if (index == endIndex) {
140 return fRanges.Insert(RangeType(offset, size), index);
146 RangeType& firstRange = _RangeAt(index);
150 if (index + 1 < endIndex)
151 RemoveRanges(index + 1, endIndex - index - 1);
183 int32 index = InsertionIndex(offset);
187 int32 endIndex = index;
188 // index after the last affected range
193 if (index == endIndex) {
199 RangeType& firstRange = _RangeAt(index);
202 int32 firstRemoveIndex = firstRange.offset >= offset ? index : index + 1;
209 if (!fRanges.Insert(newRange, index + 1))
217 if (index < firstRemoveIndex)
235 RangeArray<Value>::RemoveRanges(int32 index, int32 count)
237 return fRanges.Remove(index, count);
253 int32 index = InsertionIndex(offset);
254 return index < CountRanges() && RangeAt(index).offset < offset + size;
258 /*! Returns the insertion index of a range starting at \a offset.
261 \a offset, the index of that range is returned. If \a offset lies in between
262 two ranges or before the first range, the index of the range following
265 \return The insertion index for a range starting at \a offset.
271 // binary search the index