FiberBundleHDF5  $Id: FiberHDF5.dfg,v 1.8 2006/12/12 12:32:50 werner Exp $
Macros | Functions
Useful extension of the HDF5 API.

Macros

#define H5Gclose(x)   _F5Gclose(x, __FILE__, __LINE__)
 

Functions

F5_API hid_t F5open (const char *filename, int socket)
 
F5_API int F5connect (const char *url)
 
F5_API int F5listen (const char *service)
 
F5_API void F5closesocket (int socket)
 
F5_API void F5socket_init ()
 
F5_API void F5socket_cleanup ()
 
F5_API hid_t F5Gcreate (hid_t loc_id, const char *name, int est_num_entries, int est_name_len)
 
F5_API hid_t F5append (const char *filename)
 
F5_API hid_t F5Gappend (hid_t loc_id, const char *name)
 
F5_API hid_t F5Gappend_hinted_creation (hid_t loc_id, const char *name, int est_num_entries, int est_name_len)
 
F5_API hid_t F5Gappend_external (hid_t loc_id, const char *name, const char *target_file_name, const char *target_obj_name, const char *prefix)
 
F5_API hid_t F5Dappend (hid_t loc_id, const char *name, hid_t type_id, hid_t space_id, hid_t create_plist_id)
 
F5_API hid_t F5Dcreate (hid_t loc_id, const char *name, hid_t type_id, hid_t space_id, hid_t create_plist_id)
 
F5_API int F5Gopen (hid_t location, const char *name)
 
F5_API int F5Gexist (hid_t location, const char *name)
 
F5_API hid_t F5Gtry_to_open (hid_t location, const char *name)
 
F5_API int F5Dexist (hid_t location, const char *name)
 
F5_API hid_t F5Dtry_to_open (hid_t location, const char *name)
 
F5_API herr_t F5Xclose (hid_t obj_id)
 
F5_API herr_t _F5Gclose (hid_t id, const char *filename, int lineno)
 

Detailed Description

These extensions are of general use, not only in conjunction with the fiber bundle concept, but they just happen to sit here in this library.

Function Documentation

◆ _F5Gclose()

F5_API herr_t _F5Gclose ( hid_t  id,
const char *  filename,
int  lineno 
)

Call H5Cclose with a debug message when F5_VERBOSITY is larger then 110

◆ F5append()

F5_API hid_t F5append ( const char *  filename)

Open some file for appending data.

◆ F5closesocket()

F5_API void F5closesocket ( int  socket)

A forwarding call to the platformspecific system call to close a socket.

◆ F5connect()

F5_API int F5connect ( const char *  url)

Open a socket connection to the specified host and port. The URL must be of the form:

HDF5://myhost.com:6666/T=0.000000/

◆ F5Dappend()

F5_API hid_t F5Dappend ( hid_t  loc_id,
const char *  name,
hid_t  type_id,
hid_t  space_id,
hid_t  create_plist_id 
)

Open some dataset if it exists, otherwise create one.

Referenced by F5Cwrite_regular_surface(), and F5write_particle_cartesian3DvU().

◆ F5Dcreate()

F5_API hid_t F5Dcreate ( hid_t  loc_id,
const char *  name,
hid_t  type_id,
hid_t  space_id,
hid_t  create_plist_id 
)

Create a new dataset, possibly deleting an old one if such exists.

Referenced by F5Lcreate().

◆ F5Dexist()

F5_API int F5Dexist ( hid_t  location,
const char *  name 
)

Check if a dataset exists.

Referenced by F5P_has_vertices().

◆ F5Gappend()

F5_API hid_t F5Gappend ( hid_t  loc_id,
const char *  name 
)

◆ F5Gappend_hinted_creation()

F5_API hid_t F5Gappend_hinted_creation ( hid_t  loc_id,
const char *  name,
int  est_num_entries,
int  est_name_len 
)

Open or create a group, if created then with estimated hints about its number of entries and estimated length of its member names.

References F5Gcreate().

Referenced by F5Gappend().

◆ F5Gcreate()

F5_API hid_t F5Gcreate ( hid_t  loc_id,
const char *  name,
int  est_num_entries,
int  est_name_len 
)

Create a group using utf8 encoding for the link name and making use of the estimated group entry and name length properties for optimization. If these values are negative, no such hints will be set.

Referenced by F5Gappend_hinted_creation(), F5Lwrite_linear(), and F5Lwrites().

◆ F5Gexist()

F5_API int F5Gexist ( hid_t  location,
const char *  name 
)

Check if a group exists.

Referenced by F5P_has_vertices().

◆ F5Gopen()

F5_API int F5Gopen ( hid_t  location,
const char *  name 
)

Open a group

◆ F5Gtry_to_open()

F5_API hid_t F5Gtry_to_open ( hid_t  location,
const char *  name 
)

Try to open an HDF5 group, silently return -1 if it does not exist.

Referenced by F5iterate_grids_per_bundle(), F5iterate_representations(), and F5iterate_topology_fields().

◆ F5open()

F5_API hid_t F5open ( const char *  filename,
int  socket 
)

Open some URL for reading data (read-only). Note that this function may well invoke the streaming HDF5 driver when a valid socket descriptor is given. Such might well be created by a call to F5connect(). Note that the socket needs to be closed explicitely.

◆ F5socket_cleanup()

F5_API void F5socket_cleanup ( )

Calling windows socket cleanup on windows

◆ F5socket_init()

F5_API void F5socket_init ( )

Calling windows socket init on windows

◆ F5Xclose()

F5_API herr_t F5Xclose ( hid_t  obj_id)

Close an object regardless of its type.

Use this function to close any HDF5-Object,
if you do not know the type of the object.
This is especially usefull after a call to H5Rdereference().

@remark Normally you shouldn't use this function,
    because you should know the objects you are creating.
Remarks
The function doesn't work for properties, supported are only the following types:
  • H5I_FILE
  • H5I_GROUP
  • H5I_DATATYPE
  • H5I_DATASPACE
  • H5I_DATASET
  • H5I_ATTR
Parameters
ret_type_idA pointer to a storage to take the type of the given object. See H5Iget_type() for a list of types.
obj_idThe ID of the object to be closed.
Returns
Error Code of the closing function. (A non-negative value if successful; otherwise a negative value.)
Todo:
Better Error Value than "-1".
Note
Could/should rename this to F5Dclose(), to denote it as a function to close F5 dataset ID's, which can be HDF5 groups or datasets.

Referenced by F5Fwrite_linear_fraction(), F5LSwrite_fraction(), and F5Lwrite_fraction().