Esempio n. 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());
}
Esempio n. 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();
}
Esempio n. 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);
}
Esempio n. 6
0
bool SharedMap::validFullPos(const FullPos& fp) const {
  assert(fp.getContainer() == (ArrayData*)this);
  return false;
}
Esempio n. 7
0
bool APCLocalArray::ValidFullPos(const ArrayData* ad, const FullPos& fp) {
  assert(fp.getContainer() == ad);
  return false;
}
Esempio n. 8
0
bool SharedMap::ValidFullPos(const ArrayData* ad, const FullPos& fp) {
  assert(fp.getContainer() == ad);
  return false;
}
Esempio n. 9
0
bool ArrayData::setFullPos(const FullPos &fp) {
  assert(fp.getContainer() == (ArrayData*)this);
  return false;
}
Esempio n. 10
0
void ArrayData::getFullPos(FullPos &fp) {
  assert(fp.getContainer() == (ArrayData*)this);
  fp.m_pos = ArrayData::invalid_index;
}