Opera 12.15 Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ResultBase.h 16KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781
  1. /* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
  2. **
  3. ** Copyright (C) 1995-2011 Opera Software ASA. All rights reserved.
  4. **
  5. ** This file is part of the Opera web browser.
  6. ** It may not be distributed under any circumstances.
  7. */
  8. #ifndef RESULTBASE_H
  9. #define RESULTBASE_H
  10. #include "modules/search_engine/TypeDescriptor.h"
  11. /**
  12. * @brief basic iteration in search results
  13. * @author Pavel Studeny <pavels@opera.com>
  14. *
  15. * This iterator will give you one result at a time (method SearchIterator::Get). You can move
  16. * to other results until the end/beginning.
  17. */
  18. class IteratorBase : public NonCopyable
  19. {
  20. public:
  21. IteratorBase() {}
  22. virtual ~IteratorBase(void) {}
  23. /**
  24. * go to the next result
  25. * @return FALSE if there are no more results or on error
  26. */
  27. virtual BOOL Next(void) = 0;
  28. /**
  29. * go to the previous result
  30. * @return FALSE if there are no more results or on error
  31. */
  32. virtual BOOL Prev(void) = 0;
  33. /**
  34. * After performing any operation with Next/Prev, we need to check the Error status.
  35. * @return status of the last operation
  36. */
  37. CHECK_RESULT(virtual OP_STATUS Error(void) const) = 0;
  38. /**
  39. * Number of results is often unknown.
  40. * @return number of results available, -1 if the number is unknown, but at least one
  41. */
  42. virtual int Count(void) const = 0;
  43. /**
  44. * @return TRUE if Next() finished past the end of data
  45. */
  46. virtual BOOL End(void) const = 0;
  47. /**
  48. * @return TRUE if Prev() finished past the beginning of data
  49. */
  50. virtual BOOL Beginning(void) const = 0;
  51. /**
  52. * @return TRUE if there are no data
  53. */
  54. BOOL Empty(void) const {return Count() == 0;}
  55. };
  56. /**
  57. * @brief common predecessor of all iterators
  58. */
  59. template <typename T> class SearchIterator : public IteratorBase
  60. {
  61. public:
  62. /**
  63. * @return the value of the current result
  64. */
  65. virtual const T &Get(void) = 0;
  66. };
  67. /**
  68. * @brief Random-access iterator
  69. * Not used currently.
  70. */
  71. template <typename T> class SearchRndIterator : public SearchIterator<T>
  72. {
  73. public:
  74. /**
  75. * go to the first result
  76. */
  77. virtual BOOL First(void) = 0;
  78. /**
  79. * go to the last result
  80. */
  81. virtual BOOL Last(void) = 0;
  82. /**
  83. * go to result at specified position
  84. */
  85. virtual BOOL Goto(int index) = 0;
  86. };
  87. /**
  88. * @brief returns sorted results from two other iterators
  89. * Or is still not implemented anywhere by any search class, but all code is here.
  90. */
  91. template <typename T> class OrIterator : public SearchIterator<T>
  92. {
  93. public:
  94. OrIterator(TypeDescriptor::ComparePtr compare = NULL)
  95. {
  96. m_a1 = NULL;
  97. m_a2 = NULL;
  98. Compare = compare == NULL ? &DefDescriptor<T>::Compare : compare;
  99. }
  100. /**
  101. * Results must be sorted before applying this.
  102. */
  103. OrIterator(SearchIterator<T> *a1, SearchIterator<T> *a2, TypeDescriptor::ComparePtr compare = NULL)
  104. {
  105. OP_ASSERT(a1 != NULL);
  106. OP_ASSERT(a2 != NULL);
  107. m_a1 = a1;
  108. m_a2 = a2;
  109. Compare = compare == NULL ? &DefDescriptor<T>::Compare : compare;
  110. }
  111. void Set(SearchIterator<T> *a1, SearchIterator<T> *a2, TypeDescriptor::ComparePtr compare = NULL)
  112. {
  113. OP_ASSERT(a1 != NULL);
  114. OP_ASSERT(a2 != NULL);
  115. OP_DELETE(m_a1);
  116. OP_DELETE(m_a2);
  117. m_a1 = a1;
  118. m_a2 = a2;
  119. if (compare != NULL)
  120. Compare = compare;
  121. }
  122. virtual ~OrIterator(void)
  123. {
  124. OP_DELETE(m_a2);
  125. OP_DELETE(m_a1);
  126. }
  127. virtual BOOL Next(void)
  128. {
  129. BOOL n1, n2;
  130. if (End())
  131. return FALSE;
  132. if (m_a2 == NULL || m_a2->End())
  133. return m_a1->Next();
  134. if (m_a1 == NULL || m_a1->End())
  135. return m_a2->Next();
  136. if (Beginning())
  137. {
  138. n1 = FALSE;
  139. n2 = FALSE;
  140. if (m_a1 != NULL)
  141. n1 = m_a1->Next();
  142. if (m_a2 != NULL)
  143. n2 = m_a2->Next();
  144. return n1 || n2;
  145. }
  146. if (Compare(&m_a1->Get(), &m_a2->Get())) // m_a1 < m_a2
  147. return m_a1->Next() || !m_a2->End();
  148. else if (!Compare(&m_a2->Get(), &m_a1->Get())) // equal
  149. {
  150. n1 = m_a1->Next();
  151. n2 = m_a2->Next();
  152. return n1 || n2;
  153. }
  154. else // m_a2 < m_a1
  155. return m_a2->Next() || !m_a1->End();
  156. }
  157. virtual BOOL Prev(void)
  158. {
  159. BOOL p1, p2;
  160. if (Beginning())
  161. return FALSE;
  162. if (m_a2 == NULL || m_a2->Beginning())
  163. return m_a1->Prev();
  164. if (m_a1 == NULL || m_a1->Beginning())
  165. return m_a2->Prev();
  166. if (End())
  167. {
  168. p1 = FALSE;
  169. p2 = FALSE;
  170. if (m_a1 != NULL)
  171. p1 = m_a1->Prev();
  172. if (m_a2 != NULL)
  173. p2 = m_a2->Prev();
  174. if (p1 && p2)
  175. {
  176. if (Compare(&m_a1->Get(), &m_a2->Get()))
  177. m_a1->Next();
  178. else
  179. m_a2->Next();
  180. }
  181. return p1 || p2;
  182. }
  183. // at least one of m_a1 and m_a2 is valid here
  184. if (m_a1 != NULL && m_a1->End())
  185. {
  186. if (!m_a2->Prev())
  187. return m_a1->Prev();
  188. if (!m_a1->Prev())
  189. return TRUE;
  190. if (!Compare(&m_a1->Get(), &m_a2->Get()))
  191. {
  192. m_a1->Next();
  193. return TRUE;
  194. }
  195. return TRUE;
  196. }
  197. if (m_a2 != NULL && m_a2->End())
  198. {
  199. if (!m_a1->Prev())
  200. return m_a2->Prev();
  201. if (!m_a2->Prev())
  202. return TRUE;
  203. if (!Compare(&m_a2->Get(), &m_a1->Get()))
  204. {
  205. m_a2->Next();
  206. return TRUE;
  207. }
  208. return TRUE;
  209. }
  210. if (Compare(&m_a1->Get(), &m_a2->Get())) // m_a1 < m_a2
  211. return m_a2->Prev() || !m_a1->Beginning();
  212. else if (!Compare(&m_a2->Get(), &m_a1->Get())) // equal
  213. {
  214. p1 = m_a1->Prev();
  215. p2 = m_a2->Prev();
  216. return p1 || p2;
  217. }
  218. else // m_a2 < m_a1
  219. return m_a1->Prev() || !m_a2->Beginning();
  220. }
  221. virtual const T &Get(void)
  222. {
  223. OP_ASSERT(!End());
  224. OP_ASSERT(!Beginning());
  225. if (m_a2 == NULL || m_a2->End() || m_a2->Beginning())
  226. return m_a1->Get();
  227. if (m_a1 == NULL || m_a1->End() || m_a2->Beginning())
  228. return m_a2->Get();
  229. return Compare(&m_a1->Get(), &m_a2->Get()) ? m_a1->Get() : m_a2->Get();
  230. }
  231. CHECK_RESULT(virtual OP_STATUS Error(void) const)
  232. {
  233. register OP_STATUS err;
  234. if (m_a1 != NULL && OpStatus::IsError(err = m_a1->Error()))
  235. return err;
  236. return m_a2 == NULL ? OpStatus::OK : m_a2->Error();
  237. }
  238. virtual int Count(void) const
  239. {
  240. int c1, c2;
  241. if ((c1 = m_a1->Count()) == -1 || (c2 = m_a2->Count()) == -1)
  242. return -1;
  243. return c1 + c2;
  244. }
  245. virtual BOOL End(void) const {return (m_a1 == NULL || m_a1->End()) && (m_a2 == NULL || m_a2->End());}
  246. virtual BOOL Beginning(void) const {return (m_a1 == NULL || m_a1->Beginning()) && (m_a2 == NULL || m_a2->Beginning());}
  247. protected:
  248. SearchIterator<T> *m_a1;
  249. SearchIterator<T> *m_a2;
  250. TypeDescriptor::ComparePtr Compare;
  251. };
  252. /**
  253. * @brief returns sorted results present in both other iterators
  254. */
  255. template <typename T> class AndIterator : public SearchIterator<T>
  256. {
  257. public:
  258. AndIterator(TypeDescriptor::ComparePtr compare = NULL)
  259. {
  260. m_a1 = NULL;
  261. m_a2 = NULL;
  262. Compare = compare == NULL ? &DefDescriptor<T>::Compare : compare;
  263. }
  264. AndIterator(SearchIterator<T> *a1, SearchIterator<T> *a2, TypeDescriptor::ComparePtr compare = NULL)
  265. {
  266. OP_ASSERT(a1 != NULL);
  267. OP_ASSERT(a2 != NULL);
  268. m_a1 = a1;
  269. m_a2 = a2;
  270. Compare = compare == NULL ? &DefDescriptor<T>::Compare : compare;
  271. if (m_a1 != NULL && !m_a1->End() && m_a2 != NULL && !m_a2->End())
  272. {
  273. do {
  274. while (Compare(&m_a1->Get(), &m_a2->Get()))
  275. if (!m_a1->Next())
  276. return;
  277. while (Compare(&m_a2->Get(), &m_a1->Get()))
  278. if (!m_a2->Next())
  279. return;
  280. } while (Compare(&m_a1->Get(), &m_a2->Get()));
  281. }
  282. }
  283. void Set(SearchIterator<T> *a1, SearchIterator<T> *a2, TypeDescriptor::ComparePtr compare = NULL)
  284. {
  285. OP_ASSERT(a1 != NULL);
  286. OP_ASSERT(a2 != NULL);
  287. OP_DELETE(m_a1);
  288. OP_DELETE(m_a2);
  289. m_a1 = a1;
  290. m_a2 = a2;
  291. if (compare != NULL)
  292. Compare = compare;
  293. if (m_a1 != NULL && !m_a1->End() && m_a2 != NULL && !m_a2->End())
  294. {
  295. do {
  296. while (Compare(&m_a1->Get(), &m_a2->Get()))
  297. if (!m_a1->Next())
  298. return;
  299. while (Compare(&m_a2->Get(), &m_a1->Get()))
  300. if (!m_a2->Next())
  301. return;
  302. } while (Compare(&m_a1->Get(), &m_a2->Get()));
  303. }
  304. }
  305. virtual ~AndIterator(void)
  306. {
  307. OP_DELETE(m_a2);
  308. OP_DELETE(m_a1);
  309. }
  310. virtual BOOL Next(void)
  311. {
  312. if (m_a2->Beginning())
  313. {
  314. m_a2->Next();
  315. if (m_a2->Beginning())
  316. m_a2->Next();
  317. }
  318. else if (!m_a1->Next())
  319. return FALSE;
  320. if (End())
  321. return FALSE;
  322. do {
  323. while (Compare(&m_a1->Get(), &m_a2->Get()))
  324. if (!m_a1->Next())
  325. return FALSE;
  326. while (Compare(&m_a2->Get(), &m_a1->Get()))
  327. if (!m_a2->Next())
  328. return FALSE;
  329. } while (Compare(&m_a1->Get(), &m_a2->Get()));
  330. return TRUE;
  331. }
  332. virtual BOOL Prev(void)
  333. {
  334. if (m_a2->End())
  335. {
  336. m_a2->Prev();
  337. if (m_a2->End())
  338. m_a2->Prev();
  339. }
  340. else if (!m_a1->Prev())
  341. return FALSE;
  342. if (Beginning())
  343. return FALSE;
  344. do {
  345. while (Compare(&m_a1->Get(), &m_a2->Get()))
  346. if (!m_a2->Prev())
  347. return FALSE;
  348. while (Compare(&m_a2->Get(), &m_a1->Get()))
  349. if (!m_a1->Prev())
  350. return FALSE;
  351. } while (Compare(&m_a1->Get(), &m_a2->Get()));
  352. return TRUE;
  353. }
  354. virtual const T &Get(void)
  355. {
  356. OP_ASSERT(!End());
  357. OP_ASSERT(!Beginning());
  358. return m_a1->Get();
  359. }
  360. CHECK_RESULT(virtual OP_STATUS Error(void) const)
  361. {
  362. register OP_STATUS err;
  363. if (m_a1 != NULL && OpStatus::IsError(err = m_a1->Error()))
  364. return err;
  365. return m_a2 == NULL ? OpStatus::OK : m_a2->Error();
  366. }
  367. virtual int Count(void) const
  368. {
  369. int c1, c2;
  370. if ((c1 = m_a1->Count()) == -1 || (c2 = m_a2->Count()) == -1)
  371. return -1;
  372. return c1;
  373. }
  374. virtual BOOL End(void) const {return m_a1 == NULL || m_a1->End() || m_a2 == NULL || m_a2->End();}
  375. virtual BOOL Beginning(void) const {return m_a1 == NULL || m_a1->Beginning() || m_a2 == NULL || m_a2->Beginning();}
  376. protected:
  377. SearchIterator<T> *m_a1;
  378. SearchIterator<T> *m_a2;
  379. TypeDescriptor::ComparePtr Compare;
  380. };
  381. /**
  382. * @brief returns sorted results only present in the first of the iterators
  383. */
  384. template <typename T> class AndNotIterator : public SearchIterator<T>
  385. {
  386. public:
  387. AndNotIterator(TypeDescriptor::ComparePtr compare = NULL)
  388. {
  389. m_a1 = NULL;
  390. m_a2 = NULL;
  391. Compare = compare == NULL ? &DefDescriptor<T>::Compare : compare;
  392. }
  393. AndNotIterator(SearchIterator<T> *a1, SearchIterator<T> *a2, TypeDescriptor::ComparePtr compare = NULL)
  394. {
  395. OP_ASSERT(a1 != NULL);
  396. OP_ASSERT(a2 != NULL);
  397. m_a1 = a1;
  398. m_a2 = a2;
  399. Compare = compare == NULL ? &DefDescriptor<T>::Compare : compare;
  400. if (m_a1 == NULL || m_a1->End() || m_a2 == NULL || m_a2->End())
  401. return;
  402. for (;;) {
  403. while (Compare(&m_a2->Get(), &m_a1->Get()))
  404. if (!m_a2->Next())
  405. return;
  406. if (!Compare(&m_a1->Get(), &m_a2->Get()))
  407. {
  408. if (!m_a1->Next())
  409. return;
  410. }
  411. else return;
  412. }
  413. }
  414. void Set(SearchIterator<T> *a1, SearchIterator<T> *a2, TypeDescriptor::ComparePtr compare = NULL)
  415. {
  416. OP_ASSERT(a1 != NULL);
  417. OP_ASSERT(a2 != NULL);
  418. OP_DELETE(m_a1);
  419. OP_DELETE(m_a2);
  420. m_a1 = a1;
  421. m_a2 = a2;
  422. if (compare != NULL)
  423. Compare = compare;
  424. if (m_a1 == NULL || m_a1->End() || m_a2 == NULL || m_a2->End())
  425. return;
  426. for (;;) {
  427. while (Compare(&m_a2->Get(), &m_a1->Get()))
  428. if (!m_a2->Next())
  429. return;
  430. if (!Compare(&m_a1->Get(), &m_a2->Get()))
  431. {
  432. if (!m_a1->Next())
  433. return;
  434. }
  435. else return;
  436. }
  437. }
  438. virtual ~AndNotIterator(void)
  439. {
  440. OP_DELETE(m_a2);
  441. OP_DELETE(m_a1);
  442. }
  443. virtual BOOL Next(void)
  444. {
  445. if (End())
  446. return FALSE;
  447. if (m_a2 == NULL || m_a2->End())
  448. return m_a1->Next();
  449. if (m_a2->Beginning())
  450. m_a2->Next();
  451. do {
  452. if (!m_a1->Next())
  453. return FALSE;
  454. while (Compare(&m_a1->Get(), &m_a2->Get()))
  455. if (!m_a2->Prev())
  456. return TRUE;
  457. while (Compare(&m_a2->Get(), &m_a1->Get()))
  458. if (!m_a2->Next())
  459. return TRUE;
  460. } while (!Compare(&m_a1->Get(), &m_a2->Get()));
  461. return TRUE;
  462. }
  463. virtual BOOL Prev(void)
  464. {
  465. if (Beginning())
  466. return FALSE;
  467. if (m_a2 == NULL || m_a2->Beginning())
  468. return m_a1->Prev();
  469. if (m_a2->End())
  470. m_a2->Prev();
  471. do {
  472. if (!m_a1->Prev())
  473. return FALSE;
  474. while (Compare(&m_a2->Get(), &m_a1->Get()))
  475. if (!m_a2->Next())
  476. return TRUE;
  477. while (Compare(&m_a1->Get(), &m_a2->Get()))
  478. if (!m_a2->Prev())
  479. return TRUE;
  480. } while (!Compare(&m_a2->Get(), &m_a1->Get()));
  481. return TRUE;
  482. }
  483. virtual const T &Get(void)
  484. {
  485. OP_ASSERT(!End());
  486. OP_ASSERT(!Beginning());
  487. return m_a1->Get();
  488. }
  489. CHECK_RESULT(virtual OP_STATUS Error(void) const)
  490. {
  491. register OP_STATUS err;
  492. if (m_a1 != NULL && OpStatus::IsError(err = m_a1->Error()))
  493. return err;
  494. return m_a2 == NULL ? OpStatus::OK : m_a2->Error();
  495. }
  496. virtual int Count(void) const
  497. {
  498. return m_a1->Count();
  499. }
  500. virtual BOOL End(void) const {return m_a1 == NULL || m_a1->End();}
  501. virtual BOOL Beginning(void) const {return m_a1 == NULL || m_a1->Beginning();}
  502. protected:
  503. SearchIterator<T> *m_a1;
  504. SearchIterator<T> *m_a2;
  505. TypeDescriptor::ComparePtr Compare;
  506. };
  507. /**
  508. * @brief A filter to use with FilterIterator
  509. */
  510. template <typename T> class SearchFilter
  511. {
  512. public:
  513. virtual ~SearchFilter() {}
  514. /**
  515. * @return TRUE if the filter would filter nothing, i.e. match everything
  516. */
  517. virtual BOOL Empty() const { return FALSE; }
  518. /**
  519. * @param item a search result to be tested
  520. * @return TRUE if this SearchFilter matches the item
  521. */
  522. virtual BOOL Matches(const T &item) const = 0;
  523. /**
  524. * @return status of the last Matches operation
  525. */
  526. CHECK_RESULT(virtual OP_STATUS Error(void) const) { return OpStatus::OK; }
  527. };
  528. /**
  529. * @brief A filtering SearchIterator that filters the output of a source iterator
  530. * based on a SearchFilter
  531. */
  532. template <typename T> class FilterIterator : public SearchIterator<T>
  533. {
  534. public:
  535. /**
  536. * Create a new FilterIterator with the given source iterator and search filter
  537. * @param source_it The source iterator
  538. * @param filter The search filter
  539. */
  540. FilterIterator(SearchIterator<T> *source_it, SearchFilter<T> *filter)
  541. {
  542. OP_ASSERT(source_it != NULL);
  543. OP_ASSERT(filter != NULL);
  544. m_source_it = source_it;
  545. m_filter = filter;
  546. if (m_filter != NULL && m_filter->Empty())
  547. {
  548. OP_DELETE(m_filter);
  549. m_filter = NULL;
  550. }
  551. if (m_filter != NULL && !End())
  552. if (!m_filter->Matches(m_source_it->Get()))
  553. Next();
  554. m_empty = End();
  555. }
  556. virtual ~FilterIterator(void)
  557. {
  558. OP_DELETE(m_source_it);
  559. OP_DELETE(m_filter);
  560. }
  561. virtual BOOL Next(void)
  562. {
  563. if (End())
  564. return FALSE;
  565. while (m_source_it->Next())
  566. if (m_filter == NULL || m_filter->Matches(m_source_it->Get()))
  567. return TRUE;
  568. return FALSE;
  569. }
  570. virtual BOOL Prev(void)
  571. {
  572. if (Beginning())
  573. return FALSE;
  574. while (m_source_it->Prev())
  575. if (m_filter == NULL || m_filter->Matches(m_source_it->Get()))
  576. return TRUE;
  577. return FALSE;
  578. }
  579. virtual const T &Get(void)
  580. {
  581. OP_ASSERT(!End());
  582. OP_ASSERT(!Beginning());
  583. return m_source_it->Get();
  584. }
  585. CHECK_RESULT(virtual OP_STATUS Error(void) const)
  586. {
  587. if (m_source_it != NULL)
  588. RETURN_IF_ERROR(m_source_it->Error());
  589. if (m_filter != NULL)
  590. RETURN_IF_ERROR(m_filter->Error());
  591. return OpStatus::OK;
  592. }
  593. virtual int Count(void) const
  594. {
  595. return m_empty ? 0 : m_source_it->Count();
  596. }
  597. virtual BOOL End(void) const {return m_source_it == NULL || m_source_it->End();}
  598. virtual BOOL Beginning(void) const {return m_source_it == NULL || m_source_it->Beginning();}
  599. protected:
  600. SearchIterator<T> *m_source_it;
  601. SearchFilter<T> *m_filter;
  602. BOOL m_empty;
  603. };
  604. template <typename T> class EmptyIterator : public SearchIterator<T>
  605. {
  606. public:
  607. virtual BOOL Next(void) {return FALSE;}
  608. virtual BOOL Prev(void) {return FALSE;}
  609. virtual const T &Get(void) {OP_ASSERT(0); return *(T *)NULL;}
  610. CHECK_RESULT(virtual OP_STATUS Error(void) const) {return OpStatus::OK;}
  611. virtual int Count(void) const {return 0;}
  612. virtual BOOL End(void) const {return TRUE;}
  613. virtual BOOL Beginning(void) const {return TRUE;}
  614. };
  615. /**
  616. * type of searches
  617. */
  618. enum SearchOperator
  619. {
  620. operatorLT, /**< find all results less than the given value */
  621. operatorLE, /**< find all results less than or equal to the given value */
  622. operatorEQ, /**< find all results equal to the given value */
  623. operatorGE, /**< find all results greater than or equal the given value */
  624. operatorGT /**< find all results greater than the given value */
  625. };
  626. #endif // RESULTBASE_H