예제 #1
0
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);
}
예제 #2
0
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;
}