void GeoReference::create(const QString& type) { GeoRefImplementationFactory *grfFac = kernel()->factory<GeoRefImplementationFactory>("ilwis::georefimplementationfactory"); GeoRefImplementation *implementation = grfFac->create(type); if ( !implementation) { ERROR1(ERR_COULDNT_CREATE_OBJECT_FOR_1,type); } impl(implementation); }
GeoReference *GeoReference::create(const QString& type) { GeoReference *georef = new GeoReference(); GeoRefImplementationFactory *grfFac = kernel()->factory<GeoRefImplementationFactory>("ilwis::georefimplementationfactory"); GeoRefImplementation *impl = grfFac->create(type); if ( !impl) { ERROR1(ERR_COULDNT_CREATE_OBJECT_FOR_1,type); return 0; } georef->impl(impl); return georef; }