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

jvporter at wisc.edu jvporter at wisc.edu
Wed Sep 28 11:10:44 CDT 2011


Author: jvporter
Date: 2011-09-28 11:10:44 -0500 (Wed, 28 Sep 2011)
New Revision: 5173

Modified:
   MOAB/trunk/itaps/imesh/iMesh_MOAB.cpp
   MOAB/trunk/itaps/imesh/iMesh_extensions.h
Log:
Add iMesh_getAllIfaceTags to iMesh_extensions


Modified: MOAB/trunk/itaps/imesh/iMesh_MOAB.cpp
===================================================================
--- MOAB/trunk/itaps/imesh/iMesh_MOAB.cpp	2011-09-26 16:05:19 UTC (rev 5172)
+++ MOAB/trunk/itaps/imesh/iMesh_MOAB.cpp	2011-09-28 16:10:44 UTC (rev 5173)
@@ -1691,6 +1691,26 @@
     RETURN(iBase_SUCCESS);
   }
 
+  void iMesh_getAllIfaceTags (iMesh_Instance instance,
+                              /*inout*/ iBase_TagHandle** tag_handles,
+                              /*inout*/ int* tag_handles_allocated,
+                              /*out*/ int* tag_handles_size, int *err)
+  {
+    std::vector<Tag> all_tags;
+
+    ErrorCode result = MOABI->tag_get_tags(all_tags);
+    CHKERR(result, "iMesh_getAllIfaceTags failed.");
+
+    remove_var_len_tags( MOABI, all_tags );
+
+      // now put those tag handles into sidl array
+    ALLOC_CHECK_ARRAY_NOFAIL(tag_handles, all_tags.size());
+    memcpy(*tag_handles, &all_tags[0], all_tags.size()*sizeof(Tag));
+    *tag_handles_size = all_tags.size();
+
+    RETURN(iBase_SUCCESS);
+  }
+
   void iMesh_setEntSetData (iMesh_Instance instance,
                             /*in*/ iBase_EntitySetHandle entity_set_handle,
                             /*in*/ const iBase_TagHandle tag_handle,

Modified: MOAB/trunk/itaps/imesh/iMesh_extensions.h
===================================================================
--- MOAB/trunk/itaps/imesh/iMesh_extensions.h	2011-09-26 16:05:19 UTC (rev 5172)
+++ MOAB/trunk/itaps/imesh/iMesh_extensions.h	2011-09-28 16:10:44 UTC (rev 5173)
@@ -214,6 +214,19 @@
 );
 
 /***************************************************************************//**
+ * \ingroup  Tags 
+ * \brief  Get all the tags associated with the entire interface
+ *
+ * Get all the tags associated with the entire interface
+ ******************************************************************************/
+
+void iMesh_getAllIfaceTags(iMesh_Instance instance,
+                           /*inout*/ iBase_TagHandle **tag_handles,
+                           /*inout*/ int *tag_handles_allocated,
+                           /*out*/ int *tag_handles_size,
+                           /*out*/ int *err);


More information about the moab-dev mailing list