CompressionModel *CompressionModel::loadModel(DataInput& in) {
    string type;
    in >> type;
    CompressionModel *model = createModel(type);
    model->load(in);
    return model;
}
Beispiel #2
0
CompressionModel *CompressionModel::loadModel(DataInput& in) {
    string type;
    in >> type;
    CompressionModel *model = createModel(type);
    try {
        model->load(in);
    }
    catch (...) {
        delete model;
        throw;
    }
    return model;
}