Exemple #1
0
bool wb_vrepdbs::exportHead(wb_import& i)
{
  dbs_sObject* op = 0;
  pwr_tStatus sts;

  while ((op = dbs_NextHead(&sts, dbsenv(), op))) {
    i.importHead(op->oid, op->cid, op->poid, op->boid, op->aoid, op->foid,
        op->loid, op->name, op->normname, op->ohFlags, op->time, op->rbody.time,
        op->dbody.time, op->rbody.size, op->dbody.size);
  }

  return true;
}
Exemple #2
0
void wb_dbms_ohead::iter(wb_import &i)
{
    int rc = 0;

    rc = m_db->m_t_ohead->cursor(m_db->m_txn, &m_key, &m_data, &m_dbc);

    memset(&m_oid, 0, sizeof(m_oid));
    memset(&m_o, 0, sizeof(m_o));

    while ((rc = m_dbc->get()) == 0) {
        i.importHead(m_o.oid, m_o.cid, m_o.poid, m_o.boid, m_o.aoid, m_o.foid, m_o.loid, m_o.name, m_o.normname,
                     m_o.flags, m_o.time, m_o.body[0].time, m_o.body[1].time, m_o.body[0].size, m_o.body[1].size);
    }

    m_dbc->close();
    delete m_dbc;
    m_dbc = 0;
}
Exemple #3
0
void wb_db_ohead::iter(wb_import &i)
{
  int rc = 0;

  rc = m_db->m_t_ohead->cursor(m_db->m_txn, &m_dbc, 0);

  memset(&m_oid, 0, sizeof(m_oid));
  memset(&m_o, 0, sizeof(m_o));

  m_key.set_data(&m_oid);
  m_key.set_ulen(sizeof(m_oid));
  m_key.set_flags(DB_DBT_USERMEM);

  m_data.set_data(&m_o);
  m_data.set_ulen(sizeof(m_o));
  m_data.set_flags(DB_DBT_USERMEM);

  while ((rc = m_dbc->get(&m_key, &m_data, DB_NEXT)) == 0) {
    i.importHead(m_o.oid, m_o.cid, m_o.poid, m_o.boid, m_o.aoid, m_o.foid, m_o.loid, m_o.name, m_o.normname,
                 m_o.flags, m_o.time, m_o.body[0].time, m_o.body[1].time, m_o.body[0].size, m_o.body[1].size);
  }

  m_dbc->close();
}