[MOAB-dev] r2748 - MOAB/trunk/tools/iMesh

kraftche at cae.wisc.edu kraftche at cae.wisc.edu
Wed Mar 25 15:11:00 CDT 2009


Author: kraftche
Date: 2009-03-25 15:11:00 -0500 (Wed, 25 Mar 2009)
New Revision: 2748

Modified:
   MOAB/trunk/tools/iMesh/iMesh.h
   MOAB/trunk/tools/iMesh/iMesh_MOAB.cpp
Log:
change to iterator end semantics

Modified: MOAB/trunk/tools/iMesh/iMesh.h
===================================================================
--- MOAB/trunk/tools/iMesh/iMesh.h	2009-03-25 19:06:23 UTC (rev 2747)
+++ MOAB/trunk/tools/iMesh/iMesh.h	2009-03-25 20:11:00 UTC (rev 2748)
@@ -431,8 +431,8 @@
      *        entity_handles array
      * \param *entity_handles_size Pointer to occupied size of entity_handles 
      *        array
-     * \param has_data Pointer to flag; if returned non-zero, next iterator
-     *        has a non-zero number of entities
+     * \param has_data Pointer to flag; zero if no entities returned
+     *        because iterator is at end, one otherwize.
      * \param *err Pointer to error type returned from function
      */
   void iMesh_getNextEntArrIter(iMesh_Instance instance,
@@ -1810,8 +1810,8 @@
      * \param entity_iterator Iterator being queried
      * \param entity_handle Pointer to an entity handle corresponding to the
      *        current value of iterator
-     * \param has_data Pointer to flag; if returned non-zero, next iterator
-     *        has an entity
+     * \param has_data Pointer to flag; if non-zero, value returned in 
+     *          entity_handle is valid. Otherwise, the iteration as at the end.
      * \param *err Pointer to error type returned from function
      */
   void iMesh_getNextEntIter(iMesh_Instance instance,

Modified: MOAB/trunk/tools/iMesh/iMesh_MOAB.cpp
===================================================================
--- MOAB/trunk/tools/iMesh/iMesh_MOAB.cpp	2009-03-25 19:06:23 UTC (rev 2747)
+++ MOAB/trunk/tools/iMesh/iMesh_MOAB.cpp	2009-03-25 20:11:00 UTC (rev 2748)
@@ -583,7 +583,7 @@
       ++(this_it->currentPos);
     }
   
-    *has_data = (this_it->currentPos != this_it->iteratorRange.end());
+    *has_data = !i;
     *entity_handles_size = i;
     RETURN(iBase_SUCCESS);
   }



More information about the moab-dev mailing list