[MOAB-dev] r4578 - MOAB/trunk/itaps/imesh
kraftche at cae.wisc.edu
kraftche at cae.wisc.edu
Thu Mar 10 18:44:48 CST 2011
Author: kraftche
Date: 2011-03-10 18:44:48 -0600 (Thu, 10 Mar 2011)
New Revision: 4578
Modified:
MOAB/trunk/itaps/imesh/iMesh_MOAB.cpp
Log:
fix size returned via iMesh API for bit tags
Modified: MOAB/trunk/itaps/imesh/iMesh_MOAB.cpp
===================================================================
--- MOAB/trunk/itaps/imesh/iMesh_MOAB.cpp 2011-03-10 22:38:23 UTC (rev 4577)
+++ MOAB/trunk/itaps/imesh/iMesh_MOAB.cpp 2011-03-11 00:44:48 UTC (rev 4578)
@@ -1680,9 +1680,11 @@
case MB_TYPE_HANDLE:
*tag_size_val /= sizeof(EntityHandle);
break;
- case MB_TYPE_OPAQUE:
case MB_TYPE_BIT:
+ *tag_size_val = 1;
break;
+ case MB_TYPE_OPAQUE:
+ break;
}
RETURN(iBase_SUCCESS);
@@ -1692,8 +1694,16 @@
/*in*/ const iBase_TagHandle tag_handle,
int *tag_size_bytes, int *err)
{
- ErrorCode result = MOABI->tag_get_size(TAG_HANDLE(tag_handle), *tag_size_bytes);
- CHKERR(result, "iMesh_getTagSize: problem getting size.");
+ DataType this_type;
+ ErrorCode result = MOABI->tag_get_data_type(TAG_HANDLE(tag_handle), this_type);
+ CHKERR(result, "iMesh_getTagSize: problem getting type.");
+
+ if (MB_TYPE_BIT == this_type)
+ *tag_size_bytes = 1;
+ else {
+ result = MOABI->tag_get_size(TAG_HANDLE(tag_handle), *tag_size_bytes);
+ CHKERR(result, "iMesh_getTagSize: problem getting size.");
+ }
RETURN(iBase_SUCCESS);
}
More information about the moab-dev
mailing list