Beispiel #1
0
/*-------------------------------------------------------------------------
 * Function: trav_info_visit_lnk
 *
 * Purpose: Callback for visiting link, with 'info' structure
 *
 * Return: 0 on success, -1 on failure
 *
 * Programmer: Quincey Koziol, [email protected]
 *
 * Date: September 1, 2007
 *
 *-------------------------------------------------------------------------
 */
int
trav_info_visit_lnk(const char *path, const H5L_info_t *linfo, void *udata)
{
    /* Add the link to the 'info' struct */
    trav_info_add((trav_info_t *)udata, path, ((linfo->type == H5L_TYPE_SOFT) ? H5TRAV_TYPE_LINK : H5TRAV_TYPE_UDLINK));

    return(0);
} /* end trav_info_visit_lnk() */
Beispiel #2
0
/*-------------------------------------------------------------------------
 * Function: trav_info_visit_obj
 *
 * Purpose: Callback for visiting object, with 'info' structure
 *
 * Return: 0 on success, -1 on failure
 *
 * Programmer: Quincey Koziol, [email protected]
 *
 * Date: September 1, 2007
 *
 *-------------------------------------------------------------------------
 */
static int
trav_info_visit_obj(const char *path, const H5O_info_t *oinfo,
    const char UNUSED *already_visited, void *udata)
{
    /* Add the object to the 'info' struct */
    /* (object types map directly to "traversal" types) */
    trav_info_add((trav_info_t *)udata, path, (h5trav_type_t)oinfo->type);

    return(0);
} /* end trav_info_visit_obj() */
Beispiel #3
0
/*-------------------------------------------------------------------------
 * Function: trav_info_visit_obj
 *
 * Purpose: Callback for visiting object, with 'info' structure
 *
 * Return: 0 on success, -1 on failure
 *
 * Programmer: Quincey Koziol, [email protected]
 *
 * Date: September 1, 2007
 *
 *-------------------------------------------------------------------------
 */
int
trav_info_visit_obj(const char *path, const H5O_info_t *oinfo,
    const char UNUSED *already_visited, void *udata)
{
    size_t idx;
    trav_info_t *info_p;
    /* Add the object to the 'info' struct */
    /* (object types map directly to "traversal" types) */
    trav_info_add((trav_info_t *)udata, path, (h5trav_type_t)oinfo->type);

    /* set object addr and fileno. These are for checking same object */
    info_p = (trav_info_t *) udata;
    idx = info_p->nused - 1;
    info_p->paths[idx].objno = oinfo->addr;
    info_p->paths[idx].fileno = oinfo->fileno;

    return(0);
} /* end trav_info_visit_obj() */