Collection* Database::_getOrCreateCollectionInstance(OperationContext* txn, StringData fullns) { Collection* collection = getCollection(fullns); if (collection) { return collection; } unique_ptr<CollectionCatalogEntry> cce(_dbEntry->getCollectionCatalogEntry(fullns)); invariant(cce.get()); unique_ptr<RecordStore> rs(_dbEntry->getRecordStore(fullns)); invariant(rs.get()); // if cce exists, so should this // Not registering AddCollectionChange since this is for collections that already exist. Collection* c = new Collection(txn, fullns, cce.release(), rs.release(), _dbEntry); return c; }
void ComponentCoordinateExtracter::getCoordinates(const Geometry &geom, std::vector<const Coordinate*> &ret) { ComponentCoordinateExtracter cce(ret); geom.apply_ro(&cce); }