182{
184
186
188
189 if ((andOperation == true) && (a1 == b1))
190 return 0;
191
193
195
196 if (andOperation == true) {
197 if (a2 == b2)
198 return 0;
199
200
201
202
203
204
205
206
208
210 if ((b2 != end()) && ((*b2)->data[
offset] < (*a1)->data[
offset]))
211 return 0;
212 pos1 = a1;
213 } else {
214 if ((b1 != end()) && (*a2)->data[
offset] > (*b1)->data[
offset])
215 return 0;
216 pos1 = a2;
217 }
218
219 if (b2 == end() || b1 == end()) {
220 pos2 = (b2 != end()) ? b2 : b1;
221 } else
222 pos2 = ((*b2)->data[
offset] <= (*b1)->data[
offset]) ? b2 : b1;
223
225 for (; pos1 != pos2; ++pos1)
226 olist->push_back(*pos1);
227 } else {
228 if (a1 != b1 && a2 == b2) {
230 for (; a1 != b1; ++a1)
231 olist->push_back(*a1);
232 } else if (a2 != b2 && a1 == b1) {
234 for (; a2 != b2; ++a2)
235 olist->push_back(*a2);
236 } else if (a1 != b1 && a2 != b2) {
238
239
240
241
242
243
244
245
247
249 if (b2 != end() && (*b2)->data[
offset] < (*a1)->data[
offset]) {
250 for (; a2 != b2; ++a2)
251 olist->push_back(*a2);
252 for (; a1 != b1; ++a1)
253 olist->push_back(*a1);
254
255 return olist;
256 }
257
258 pos1 = a2;
259 } else {
260 if (b1 != end() && (*a2)->data[
offset] > (*b1)->data[
offset]) {
261 for (; a1 != b1; ++a1)
262 olist->push_back(*a1);
263 for (; a2 != b2; ++a2)
264 olist->push_back(*a2);
265
266 return olist;
267 }
268
269 pos1 = a1;
270 }
271
272 if (b2 == end() || b1 == end()) {
273 pos2 = (b2 == end()) ? b2 : b1;
274 } else
275 pos2 = ((*b2)->data[
offset] >= (*b1)->data[
offset]) ? b2 : b1;
276
277 for (; pos1 != pos2; ++pos1)
278 olist->push_back(*pos1);
279 }
280 }
281
282 return olist;
283}
std::multiset< OksObject *, OksObjectSortBy >::const_iterator ConstPosition
void find_interval(OksData *, OksQuery::Comparator, ConstPosition &, ConstPosition &) const
std::list< OksObject * > List