[MOAB-dev] r4765 - in MOAB/trunk/itaps: . imesh
jvporter at wisc.edu
jvporter at wisc.edu
Thu Apr 21 15:05:23 CDT 2011
Author: jvporter
Date: 2011-04-21 15:05:23 -0500 (Thu, 21 Apr 2011)
New Revision: 4765
Modified:
MOAB/trunk/itaps/iBase.h
MOAB/trunk/itaps/imesh/iMesh_MOAB.cpp
MOAB/trunk/itaps/imesh/iMesh_MOAB.hpp
Log:
Fix compliance with iMesh unit tests for tagging
Modified: MOAB/trunk/itaps/iBase.h
===================================================================
--- MOAB/trunk/itaps/iBase.h 2011-04-21 18:26:52 UTC (rev 4764)
+++ MOAB/trunk/itaps/iBase.h 2011-04-21 20:05:23 UTC (rev 4765)
@@ -88,7 +88,6 @@
iBase_ErrorType_MIN = 0,
iBase_SUCCESS = iBase_ErrorType_MIN,
iBase_MESH_ALREADY_LOADED,
- iBase_NO_MESH_DATA,
iBase_FILE_NOT_FOUND,
iBase_FILE_WRITE_ERROR,
iBase_NIL_ARRAY,
Modified: MOAB/trunk/itaps/imesh/iMesh_MOAB.cpp
===================================================================
--- MOAB/trunk/itaps/imesh/iMesh_MOAB.cpp 2011-04-21 18:26:52 UTC (rev 4764)
+++ MOAB/trunk/itaps/imesh/iMesh_MOAB.cpp 2011-04-21 20:05:23 UTC (rev 4765)
@@ -1809,6 +1809,8 @@
/*in*/ const iBase_TagHandle tag_handle,
/*in*/ const iBase_EntityHandle tag_value, int *err)
{
+ // XXX: decide how best to handle validating entity handles as tag data
+ CHKNONEMPTY();
CHKTAGTYPE(tag_handle, iBase_ENTITY_HANDLE);
iMesh_setEntSetData(instance, entity_set, tag_handle,
&tag_value,
@@ -2019,6 +2021,10 @@
/*inout*/int* tag_values_allocated,
/*out*/ int* tag_values_size, int *err)
{
+ if (0 == entity_handles_size)
+ RETURN(iBase_SUCCESS);
+ CHKNONEMPTY();
+
const EntityHandle *ents = reinterpret_cast<const EntityHandle *>(entity_handles);
Tag tag = TAG_HANDLE(tag_handle);
@@ -2032,10 +2038,6 @@
ERROR(result, msg);
}
- if (0 == entity_handles_size) {
- RETURN(iBase_SUCCESS);
- }
-
ALLOC_CHECK_TAG_ARRAY(tag_values, tag_size * entity_handles_size);
result = MOABI->tag_get_data(tag, ents, entity_handles_size,
@@ -2147,9 +2149,9 @@
/*in*/ const void* tag_values,
/*in*/ const int tag_values_size, int *err)
More information about the moab-dev
mailing list