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

jvporter at wisc.edu jvporter at wisc.edu
Tue Mar 22 00:39:07 CDT 2011


Author: jvporter
Date: 2011-03-22 00:39:07 -0500 (Tue, 22 Mar 2011)
New Revision: 4631

Modified:
   MOAB/trunk/itaps/imesh/iMesh_MOAB.hpp
Log:
Treat entity handle tags as compatible with entity set tags and vice versa.


Modified: MOAB/trunk/itaps/imesh/iMesh_MOAB.hpp
===================================================================
--- MOAB/trunk/itaps/imesh/iMesh_MOAB.hpp	2011-03-21 21:50:53 UTC (rev 4630)
+++ MOAB/trunk/itaps/imesh/iMesh_MOAB.hpp	2011-03-22 05:39:07 UTC (rev 4631)
@@ -80,12 +80,19 @@
     ERROR((ERR), "Invalid enumeration value");                  \
   } while(false)
 
+// Ensure that a tag's data type matches the expected data type (entity handle
+// and entity set handle tags are compatible with one another).
 #define CHKTAGTYPE(TAG,TYPE)                                            \
   do {                                                                  \
-    DataType type;                                                      \
-    ErrorCode result = MOABI->tag_get_data_type(TAG_HANDLE(TAG), type); \
+    int type, result;                                                   \
+    iMesh_getTagType(instance, (TAG), &type, &result);                  \
     CHKERR(result, "Couldn't get tag data type");                       \
-    if (tstt_data_type_table[type] != (TYPE))                           \
+    if ((type == iBase_ENTITY_HANDLE &&                                 \
+         (TYPE) == iBase_ENTITY_SET_HANDLE) ||                          \
+        (type == iBase_ENTITY_SET_HANDLE &&                             \
+         (TYPE) == iBase_ENTITY_HANDLE))                                \
+      break;                                                            \
+    if (type != (TYPE))                                                 \
       ERROR(iBase_INVALID_TAG_HANDLE, "Invalid tag data type");         \
   } while(false)
 


























More information about the moab-dev mailing list