[MOAB-dev] r4628 - MOAB/trunk/itaps/imesh

jvporter at wisc.edu jvporter at wisc.edu
Mon Mar 21 15:57:28 CDT 2011


Author: jvporter
Date: 2011-03-21 15:57:28 -0500 (Mon, 21 Mar 2011)
New Revision: 4628

Modified:
   MOAB/trunk/itaps/imesh/iMesh_MOAB.cpp
   MOAB/trunk/itaps/imesh/iMesh_MOAB.hpp
Log:
Add tag type checking to type-specific get/set data functions


Modified: MOAB/trunk/itaps/imesh/iMesh_MOAB.cpp
===================================================================
--- MOAB/trunk/itaps/imesh/iMesh_MOAB.cpp	2011-03-21 20:55:26 UTC (rev 4627)
+++ MOAB/trunk/itaps/imesh/iMesh_MOAB.cpp	2011-03-21 20:57:28 UTC (rev 4628)
@@ -1839,6 +1839,7 @@
                                /*in*/ const iBase_TagHandle tag_handle,
                                /*in*/ const int tag_value, int *err)
   {
+    CHKTAGTYPE(tag_handle, iBase_INTEGER);
     iMesh_setEntSetData(instance, entity_set, tag_handle,
                         &tag_value,
                         sizeof(int), err);
@@ -1849,6 +1850,7 @@
                                /*in*/ const iBase_TagHandle tag_handle,
                                /*in*/ const double tag_value, int *err)
   {
+    CHKTAGTYPE(tag_handle, iBase_DOUBLE);
     iMesh_setEntSetData(instance, entity_set, tag_handle,
                         &tag_value,
                         sizeof(double), err);
@@ -1869,6 +1871,7 @@
                               /*in*/ const iBase_TagHandle tag_handle,
                               /*in*/ const iBase_EntityHandle tag_value, int *err)
   {
+    CHKTAGTYPE(tag_handle, iBase_ENTITY_HANDLE);
     iMesh_setEntSetData(instance, entity_set, tag_handle,
                         &tag_value,
                         sizeof(iBase_EntityHandle), err);
@@ -1879,6 +1882,7 @@
                                /*in*/ const iBase_TagHandle tag_handle,
                                /*in*/ const iBase_EntitySetHandle tag_value, int *err)
   {
+    CHKTAGTYPE(tag_handle, iBase_ENTITY_SET_HANDLE);
     iMesh_setEntSetData(instance, entity_set, tag_handle,
                         &tag_value,
                         sizeof(iBase_EntitySetHandle), err);
@@ -1915,6 +1919,7 @@
                                /*in*/ const iBase_TagHandle tag_handle,
                                int *out_data, int *err)
   {
+    CHKTAGTYPE(tag_handle, iBase_INTEGER);
     void *tag_ptr = out_data;
     int dum_size = sizeof(int);
     iMesh_getEntSetData(instance, entity_set, tag_handle, &tag_ptr,
@@ -1926,6 +1931,7 @@
                                /*in*/ const iBase_TagHandle tag_handle,
                                double *out_data, int *err)
   {
+    CHKTAGTYPE(tag_handle, iBase_DOUBLE);
     void *tag_ptr = out_data;
     int tag_size = sizeof(double);


More information about the moab-dev mailing list