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