| 780 | } |
| 781 | |
| 782 | SLONG getCursorAdjustment() const |
| 783 | { |
| 784 | if (rsr_fetch_operation != fetch_next && rsr_fetch_operation != fetch_prior) |
| 785 | return 0; |
| 786 | |
| 787 | const bool isEnd = rsr_flags.test(Rsr::STREAM_END) && !rsr_flags.test(Rsr::PAST_END); |
| 788 | const SLONG offset = rsr_msgs_waiting + (isEnd ? 1 : 0); |
| 789 | const bool isAhead = (rsr_fetch_operation == fetch_next); |
| 790 | return isAhead ? -offset : offset; |
| 791 | } |
| 792 | }; |
| 793 | |
| 794 |