/*-------------------------------------------------------------------------
 * Function: Test_Obj_Copy
 *
 * Purpose: Testing with various objects
 *
 *------------------------------------------------------------------------*/
static void Test_Obj_Copy(void)
{
    hid_t fid=0;

    /* Create source file */
    fid = H5Fcreate(HDF_FILE1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
    if (fid < 0)
    {
        fprintf(stderr, "Error: %s> H5Fcreate failed.\n", HDF_FILE1);
        goto out;
    }

    gent_datasets(fid);
    gent_empty_group(fid);
    gent_nested_datasets(fid);
    gent_nested_group(fid);
    gent_att_compound_vlstr(fid);

out:
    /*-----------------------------------------------------------------------
    * Close
    *------------------------------------------------------------------------*/
    if(fid > 0)
        H5Fclose(fid);
}
Esempio n. 2
0
/*-------------------------------------------------------------------------
 * Function: gent_nested_datasets
 *
 * Purpose: Generate a group in a location and populate it with the "standard"
 *    datasets
 *
 *-------------------------------------------------------------------------
 */
static void gent_nested_datasets(hid_t loc_id)
{
    hid_t   gid;

    /* Create group in location */
    gid = H5Gcreate2(loc_id, GROUP_DATASETS, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);

    /* Add datasets to group created */
    gent_datasets(gid);

    /* Release resources */
    H5Gclose(gid);
}
Esempio n. 3
0
int main(void)
{
    hid_t fid;

    /* Create source file */
    fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
    gent_datasets(fid);
    gent_empty_group(fid);
    gent_nested_datasets(fid);
    gent_nested_group(fid);
    H5Fclose(fid);

    return 0;
}