11 HDFdataset *hdf_dataset;
13 char message[HDF_NAME_MAX_LEN+1] = "MESSAGE";
14 hdf_int32 attribute = 3;
16 system("rm file_ascii.hdf");
20 // a new HDFfile object
21 hdf_file = new HDFfile("file_ascii.hdf");
22 MESSAGE( ">> A HDFfile object is created" );
24 hdf_file->CreateOnDisk();
25 MESSAGE( ">> The HDF file is created on Disk " );
27 // Inside the HDF file
29 // A new HDF group object
30 hdf_group = new HDFgroup("ASCII GROUP",hdf_file);
31 MESSAGE( ">> A HDFgroup object 'ASCII' is created" );
33 hdf_group->CreateOnDisk();
34 MESSAGE( ">> The HDF group is created on Disk " );
36 // Transfert d'un fichier ASCII dans un groupe HDF
37 HDFConvert::FromAscii("ascii.txt",*hdf_group,"ASCII DATASET");
38 MESSAGE( ">> The Ascii file is transfered " );
40 // The HDF group is built, it can be closed
41 hdf_group->CloseOnDisk();
42 MESSAGE( ">> The HDF group is closed on Disk " );
44 // The HDF file is built, it can be closed
45 hdf_file->CloseOnDisk();
46 MESSAGE( ">> The HDF file is closed on disk" );
50 MESSAGE( ">> The HDF group object is deleted" );
52 MESSAGE( ">> The HDF file object is deleted" );
56 MESSAGE( "!!!! HDFexception" )