#include <iostream>
using namespace std;
int main(int argc, char* argv[])
{
if (argc != 3)
{
cout << "Usage: " << argv[0] << " <odimh5filesorgente> <odimh5filedestinazione>" << endl;
return -1;
}
OdimFactory* factory = NULL;
PolarVolume* volume1 = NULL;
PolarVolume* volume2 = NULL;
try
{
factory = new OdimFactory();
volume1 = factory->openPolarVolume(argv[1]);
volume2 = factory->createPolarVolume(argv[2]);
volume2->getWhat()->import( volume1->getWhat() );
volume2->getWhere()->import( volume1->getWhere() );
volume2->getHow()->import( volume1->getHow() );
cout << "Copia eseguita!" << endl;
}
catch (std::exception& stde)
{
cerr << "Errore di esecuzione: " << stde.what() << endl;
}
catch (...)
{
cerr << "Errore di esecuzione sconosciuto" << endl;
}
delete volume1;
delete volume2;
delete factory;
return 0;
}
Namespace related to ODIMH5 version 2.0.
Definition: odimh5v20.hpp:46
Main header file of the library.