Variant NameValueTableWrapper::prev() {
  if (m_pos != ArrayData::invalid_index) {
    m_pos = iter_rewind(m_pos);
    return current();
  }
  return Variant(false);
}
Example #2
0
Variant ArrayData::prev() {
  if (m_pos != invalid_index) {
    m_pos = iter_rewind(m_pos);
    if (m_pos != invalid_index) {
      return getValue(m_pos);
    }
  }
  return Variant(false);
}
Example #3
0
Variant ArrayData::prev() {
  // We only call iter_rewind() if m_pos is not the canonical invalid position.
  // Thus, EmptyArray::IterRewind() is not reachable.
  auto pos_limit = iter_end();
  if (m_pos != pos_limit) {
    setPosition(iter_rewind(m_pos));
    if (m_pos != pos_limit) {
      return getValue(m_pos);
    }
  }
  return Variant(false);
}
Example #4
0
void start_find_select(void*) {
    RandomChoice choice(/*rand_,*/ size());

    for(iter_rewind(); !iter_end(); iter_inc(), ++choice) {
        if(choice.choose()) {
            iter_get(find_s_, find_p_, find_o_);
            iter_free();

            timer_->set_timer<App, &App::start_find>(1000, this, 0);
            return;
        }
        ++choice;
    }

    debug_->debug("!fnd %d %d", (int)choice.elements, (int)choice.current);
}