Back to index

salome-kernel  6.5.0
Functions
HDFobjectType.c File Reference
#include "hdfi.h"

Go to the source code of this file.

Functions

hdf_err HDFobjectType (hdf_idt id, char *name, hdf_object_type *type)

Function Documentation

hdf_err HDFobjectType ( hdf_idt  id,
char *  name,
hdf_object_type type 
)

Definition at line 32 of file HDFobjectType.c.

{
  hdf_bool follow = 1;
  H5G_stat_t buf;
  hdf_err ret;

  if ((ret = H5Gget_objinfo(id,name,follow,&buf) < 0))
    return -1; 
  
  switch(buf.type)
    {
    case H5G_GROUP :
      *type = HDF_GROUP;
      break;

    case H5G_DATASET :
      *type = HDF_DATASET;
      break;
     
    default :
      return -1;
    }

  return 0;
}