void CloudRepository::addUpdateableCloud( autoPtr<ReaderParticleCloud> c ) { const word &name=c->name(); if(clouds_.found(name)) { FatalErrorIn("CloudRepository::addCloud") << "There is already a cloud " << name << " in the non-updateable clouds. I guess there is a mistake" << endl << exit(FatalError); } if(updateableClouds_.found(name)) { FatalErrorIn("CloudRepository::addCloud") << "Repository of updateable clouds already has an entry " << name << ". This can't be right" << endl << exit(FatalError); } else { updateableClouds_.insert( name, c.ptr() ); } }
void CloudRepository::addCloud( autoPtr<cloud> c ) { const word &name=c->name(); if(updateableClouds_.found(name)) { FatalErrorIn("CloudRepository::addCloud") << "There is already a cloud " << name << " in the updateable clouds. I guess there is a mistake" << endl << exit(FatalError); } if(clouds_.found(name)) { WarningIn("CloudRepository::addCloud") << "Repository of clouds already has an entry " << name <<". Overwriting. Expect strange behaviour" << endl; clouds_.set( name, c.ptr() ); } else { clouds_.insert( name, c.ptr() ); } }
// transfer p1 as autoPtr void test1(autoPtr<myLib> p1) { // display name Info << nl << "name: " << p1->name() << endl; }