Exemple #1
0
void ArrayData::newFullPos(FullPos &fp) {
  assert(fp.getContainer() == NULL);
  fp.setContainer(this);
  fp.setNext(strongIterators());
  setStrongIterators(&fp);
  getFullPos(fp);
}
bool NameValueTableWrapper::validFullPos(const FullPos & fp) const {
  assert(fp.getContainer() == (ArrayData*)this);
  if (fp.getResetFlag()) return false;
  if (fp.m_pos == ArrayData::invalid_index) return false;
  NameValueTable::Iterator iter(m_tab, fp.m_pos);
  return (iter.valid());
}
Exemple #3
0
void ArrayData::newFullPos(FullPos &fp) {
  assert(!fp.getContainer());
  fp.setContainer(this);
  fp.setNext(strongIterators());
  setStrongIterators(&fp);
  fp.m_pos = m_pos;
}
bool
NameValueTableWrapper::ValidFullPos(const ArrayData* ad, const FullPos & fp) {
  assert(fp.getContainer() == ad);
  auto a = asNVTW(ad);
  if (fp.getResetFlag()) return false;
  if (fp.m_pos == invalid_index) return false;
  NameValueTable::Iterator iter(a->m_tab, fp.m_pos);
  return iter.valid();
}
Exemple #5
0
void ArrayData::freeFullPos(FullPos &fp) {
  assert(strongIterators() != 0 && fp.getContainer() == (ArrayData*)this);
  // search for fp in our list, then remove it. Usually its the first one.
  FullPos* p = strongIterators();
  if (p == &fp) {
    setStrongIterators(p->getNext());
    fp.setContainer(NULL);
    return;
  }
  for (; p->getNext(); p = p->getNext()) {
    if (p->getNext() == &fp) {
      p->setNext(p->getNext()->getNext());
      fp.setContainer(NULL);
      return;
    }
  }
  // If the strong iterator list was empty or if fp could not be
  // found in the strong iterator list, then we are in a bad state
  assert(false);
}
Exemple #6
0
bool SharedMap::validFullPos(const FullPos& fp) const {
  assert(fp.getContainer() == (ArrayData*)this);
  return false;
}
Exemple #7
0
bool APCLocalArray::ValidFullPos(const ArrayData* ad, const FullPos& fp) {
  assert(fp.getContainer() == ad);
  return false;
}
Exemple #8
0
bool SharedMap::ValidFullPos(const ArrayData* ad, const FullPos& fp) {
  assert(fp.getContainer() == ad);
  return false;
}
Exemple #9
0
bool ArrayData::setFullPos(const FullPos &fp) {
  assert(fp.getContainer() == (ArrayData*)this);
  return false;
}
Exemple #10
0
void ArrayData::getFullPos(FullPos &fp) {
  assert(fp.getContainer() == (ArrayData*)this);
  fp.m_pos = ArrayData::invalid_index;
}