I don't know what to do.
After getting the StorageArea reference I don't know how to use the StorageAreaIterator
I'm stuck with
StorageArea *area = storage.find_area("World Bank");
Please help!!
Code: Select all
StorageArea *area = storage.find_area("World Bank");
if(area != NULL)
cout<<"World Bank found"<<endl; // <- I always get this
else
cout<<"WORLD BANK ERROR"<<endl;
BObject* pIterVal = new BObject(UninitObject::create());
SAIMP aIter = SAIMP(area); // <- I must create a StorageAreaImp
ContIterator* pIter = aIter.createIterator(pIterVal); // <- and then create an iterator (StorageAreaIterator)
BObject* next;
do
{
next = pIter->step();
cout<<'.'; // <- many dots showing, something in going on
}
while (next != NULL);Code: Select all
BObject* result = new BObject( make_itemref( (*itr).second ) ); //<- (*itr).second is a UObject
Code: Select all
StorageArea *area = storage.find_area("World Bank");
BObject* pIterVal = new BObject(UninitObject::create());
SAIMP aIter = SAIMP(area);
SAI* pIter = aIter.createMYIterator(pIterVal);
UObject* next;
next = pIter->mystep();
while (next != NULL)
{
cout<<next->name()<<'\t';
next = pIter->mystep();
}