Comparing Objectivity and Versant: Iterators/Lists
cHandle1.open(dbHandle1,"DB1_CONT",oocRead);
cHandle2.open(dbHandle2,"DB2_CONT",oocRead);
if(star_iterator1.scan(cHandle1,oocRead)) {
while (star_iterator1.next()) {
// find 3-sigma value for this star ...
sigma3 = 3.0*star_iterator1->_sigma();
xlow = star_iterator1->_x() - sigma3;
xhigh = xlow + 2.*sigma3;
ylow = star_iterator1->_y() - sigma3;
yhigh = ylow + 2.*sigma3;
if(star_iterator2.scan(cHandle2,oocRead)) {
while (star_iterator2.next()) { x = star_iterator2->_x();
y = star_iterator2->_y();
if(x> && x< && y> && y<) {
d = star_iterator1->(x,y);
star_iterator2->_catalogue();
cout << "Checksum " << checksum << endl;
LinkVstr<> a = Star::Find_all();
::dom->_default_db("starsdb2");
LinkVstr<> b = Star::Find_all();
// find 3-sigma value for this star ...
sigma3 = 3.0*a[i]->_sigma();
xlow = a[i]->_x() - sigma3;
xhigh = xlow + 2.*sigma3;
ylow = a[i]->_y() - sigma3;
yhigh = ylow + 2.*sigma3;
if(x> && x< && y> && y<) {
nearest = b[j]->_catalogue(); }
cout << "Checksum " << checksum << endl;
Note use of LinkVstr, a linked list of (persistent) object pointers