[MOAB-dev] r4820 - in MOAB/trunk/src/io/mhdf: include src
kraftche at cae.wisc.edu
kraftche at cae.wisc.edu
Thu May 12 10:14:33 CDT 2011
Author: kraftche
Date: 2011-05-12 10:14:33 -0500 (Thu, 12 May 2011)
New Revision: 4820
Modified:
MOAB/trunk/src/io/mhdf/include/mhdf.h
MOAB/trunk/src/io/mhdf/src/file.c
Log:
add utility method to mhdf
Modified: MOAB/trunk/src/io/mhdf/include/mhdf.h
===================================================================
--- MOAB/trunk/src/io/mhdf/include/mhdf.h 2011-05-12 15:14:15 UTC (rev 4819)
+++ MOAB/trunk/src/io/mhdf/include/mhdf.h 2011-05-12 15:14:33 UTC (rev 4820)
@@ -627,6 +627,16 @@
hid_t handle,
mhdf_Status* status );
+/**\brief Get start ID that will be assigned to next created dataset
+ *
+ * Get the first_id parameter that will be returned from the next
+ * call to any of mhdf_createNodeCoords, mhdf_createConnectivity,
+ * mhdf_createPolyConnectivity, or mhdf_createSetMeta
+ */
+void
+mhdf_getNextStartId( mhdf_FileHandle file,
+ mhdf_index_t* start_id_out,
+ mhdf_Status* status );
/** \brief Write the file history as a list of strings.
*
Modified: MOAB/trunk/src/io/mhdf/src/file.c
===================================================================
--- MOAB/trunk/src/io/mhdf/src/file.c 2011-05-12 15:14:15 UTC (rev 4819)
+++ MOAB/trunk/src/io/mhdf/src/file.c 2011-05-12 15:14:33 UTC (rev 4820)
@@ -962,3 +962,18 @@
API_END;
return array;
}
+
+void
+mhdf_getNextStartId( mhdf_FileHandle file,
+ mhdf_index_t* start_id_out,
+ mhdf_Status* status )
+{
+ FileHandle* file_ptr = (FileHandle*)file;
+ API_BEGIN;
+
+ mhdf_setOkay( status );
+ if (mhdf_check_valid_file( file_ptr, status ))
+ *start_id_out = file_ptr->max_id+1;
+
+ API_END;
+}
More information about the moab-dev
mailing list