[cgma-dev] r2573 - in cgm/trunk/itaps: . SIDL SIDL/gserver

kraftche at mcs.anl.gov kraftche at mcs.anl.gov
Mon Jan 26 13:15:36 CST 2009


Author: kraftche
Date: 2009-01-26 13:15:35 -0600 (Mon, 26 Jan 2009)
New Revision: 2573

Modified:
   cgm/trunk/itaps/SIDL/gserver/iGeom_SIDL_GeomSidl_Impl.cc
   cgm/trunk/itaps/SIDL/iGeom.sidl
   cgm/trunk/itaps/iGeom_CGMA.cc
   cgm/trunk/itaps/testgeom.cc
Log:
update iGeom for iBase changes and fix babel parse errors in iGeom_SIDL_GeomSidl_Impl.cc

Modified: cgm/trunk/itaps/SIDL/gserver/iGeom_SIDL_GeomSidl_Impl.cc
===================================================================
--- cgm/trunk/itaps/SIDL/gserver/iGeom_SIDL_GeomSidl_Impl.cc	2009-01-26 18:18:56 UTC (rev 2572)
+++ cgm/trunk/itaps/SIDL/gserver/iGeom_SIDL_GeomSidl_Impl.cc	2009-01-26 19:15:35 UTC (rev 2573)
@@ -2,16 +2,16 @@
 // File:          iGeom_SIDL_GeomSidl_Impl.cc
 // Symbol:        iGeom_SIDL.GeomSidl-v0.1
 // Symbol Type:   class
-// Babel Version: 0.10.12
-// sidl Created:  20070626 21:46:23 CDT
-// Generated:     20070626 21:46:35 CDT
+// Babel Version: 0.10.10
+// sidl Created:  20090126 13:13:24 CST
+// Generated:     20090126 13:13:26 CST
 // Description:   Server-side implementation for iGeom_SIDL.GeomSidl
 // 
 // WARNING: Automatically generated; only changes within splicers preserved
 // 
-// babel-version = 0.10.12
+// babel-version = 0.10.10
 // source-line   = 5
-// source-url    = file:/home/tautges/CGMnew/itaps/SIDL/iGeom_SIDL.sidl
+// source-url    = file:/home/jason/meshkit/cgm/itaps/SIDL/iGeom_SIDL.sidl
 // 
 #include "iGeom_SIDL_GeomSidl_Impl.hh"
 
@@ -952,7 +952,7 @@
 void
 iGeom_SIDL::GeomSidl_impl::addEntToSet (
   /* in */ void* entity_handle,
-  /* inout */ void*& entity_set ) 
+  /* in */ void* entity_set ) 
 throw ( 
   ::iBase::Error
 ){
@@ -971,7 +971,7 @@
 void
 iGeom_SIDL::GeomSidl_impl::rmvEntFromSet (
   /* in */ void* entity_handle,
-  /* inout */ void*& entity_set ) 
+  /* in */ void* entity_set ) 
 throw ( 
   ::iBase::Error
 ){
@@ -991,7 +991,7 @@
 iGeom_SIDL::GeomSidl_impl::addEntArrToSet (
   /* in */ ::sidl::array<void*> entity_handles,
   /* in */ int32_t entity_handles_size,
-  /* inout */ void*& entity_set ) 
+  /* in */ void* entity_set ) 
 throw ( 
   ::iBase::Error
 ){
@@ -1014,7 +1014,7 @@
 iGeom_SIDL::GeomSidl_impl::rmvEntArrFromSet (
   /* in */ ::sidl::array<void*> entity_handles,
   /* in */ int32_t entity_handles_size,
-  /* inout */ void*& entity_set ) 
+  /* in */ void* entity_set ) 
 throw ( 
   ::iBase::Error
 ){
@@ -1032,7 +1032,7 @@
 void
 iGeom_SIDL::GeomSidl_impl::addEntSet (
   /* in */ void* entity_set_to_add,
-  /* inout */ void*& entity_set_handle ) 
+  /* in */ void* entity_set_handle ) 
 throw ( 
   ::iBase::Error
 ){
@@ -1050,7 +1050,7 @@
 void
 iGeom_SIDL::GeomSidl_impl::rmvEntSet (
   /* in */ void* entity_set_to_remove,
-  /* inout */ void*& entity_set_handle ) 
+  /* in */ void* entity_set_handle ) 
 throw ( 
   ::iBase::Error
 ){
@@ -1085,6 +1085,23 @@
 }
 
 /**
+ * Method:  isEntArrContained[]
+ */
+void
+iGeom_SIDL::GeomSidl_impl::isEntArrContained (
+  /* in */ void* containing_set,
+  /* in */ ::sidl::array<void*> entity_handles,
+  /* in */ int32_t entity_handles_size,
+  /* inout */ ::sidl::array<int32_t>& is_contained,
+  /* out */ int32_t& is_contained_size ) 
+throw () 
+{
+  // DO-NOT-DELETE splicer.begin(iGeom_SIDL.GeomSidl.isEntArrContained)
+  // Insert-Code-Here {iGeom_SIDL.GeomSidl.isEntArrContained} (isEntArrContained method)
+  // DO-NOT-DELETE splicer.end(iGeom_SIDL.GeomSidl.isEntArrContained)
+}
+
+/**
  * Method:  isEntSetContained[]
  */
 void
@@ -1110,8 +1127,8 @@
  */
 void
 iGeom_SIDL::GeomSidl_impl::addPrntChld (
-  /* inout */ void*& parent_entity_set,
-  /* inout */ void*& child_entity_set ) 
+  /* in */ void* parent_entity_set,
+  /* in */ void* child_entity_set ) 
 throw ( 
   ::iBase::Error
 ){
@@ -1127,8 +1144,8 @@
  */
 void
 iGeom_SIDL::GeomSidl_impl::rmvPrntChld (
-  /* inout */ void*& parent_entity_set,
-  /* inout */ void*& child_entity_set ) 
+  /* in */ void* parent_entity_set,
+  /* in */ void* child_entity_set ) 
 throw ( 
   ::iBase::Error
 ){
@@ -2629,34 +2646,6 @@
                        TEMP_ARRAY_INOUT(sense));
   PROCESS_ERROR;
   ASSIGN_ARRAY(sense);
-    // DO-NOT-DELETE splicer.end(iGeom_CGM.CgmGeom.getEgVtxArrSense)
-}
-
-/**
- * Return the arc length / area / volume of the entities
- * @param gentity_handles Entities for which measure is requested
- * @param gentity_handles_size Number of gentities
- * @param measures Arc length / area / volume of the entities
- * @param measures_length Number of entries in measures
- */
-void
-iGeom_CGM::CgmGeom_impl::measure (
-  /* in */ ::sidl::array<void*> gentity_handles,
-  /* in */ int32_t gentity_handles_size,
-  /* inout */ ::sidl::array<double>& measures,
-  /* inout */ int32_t& measures_size ) 
-throw ( 
-  ::iBase::Error
-){
-  // DO-NOT-DELETE splicer.begin(iGeom_CGM.CgmGeom.measure)
-  CREATE_TEMP_ARRAY(double, measures);
-  
-  iGeom_measure(igeomInstance, 
-                       TEMP_ARRAY_IN(gentity_handles),
-                       TEMP_ARRAY_INOUT(measures));
-  PROCESS_ERROR;
-
-  ASSIGN_ARRAY(measures);
   // DO-NOT-DELETE splicer.end(iGeom_SIDL.GeomSidl.getParametric)
 }
 
@@ -2677,55 +2666,10 @@
   iGeom_getFaceType(igeomInstance, gface_handle, &this_type);
   if (NULL != this_type) face_type = this_type;
   PROCESS_ERROR;
-    // DO-NOT-DELETE splicer.end(iGeom_CGM.CgmGeom.getEgVtxArrSense)
+    // DO-NOT-DELETE splicer.end(iGeom_SIDL.GeomSidl.isEntParametric)
 }
 
 /**
- * Return the arc length / area / volume of the entities
- * @param gentity_handles Entities for which measure is requested
- * @param gentity_handles_size Number of gentities
- * @param measures Arc length / area / volume of the entities
- * @param measures_length Number of entries in measures
- */
-void
-iGeom_CGM::CgmGeom_impl::measure (
-  /* in */ ::sidl::array<void*> gentity_handles,
-  /* in */ int32_t gentity_handles_size,
-  /* inout */ ::sidl::array<double>& measures,
-  /* inout */ int32_t& measures_size ) 
-throw ( 
-  ::iBase::Error
-){
-  // DO-NOT-DELETE splicer.begin(iGeom_CGM.CgmGeom.measure)
-  CREATE_TEMP_ARRAY(double, measures);
-  int32_t retval = iGeom_getParametric();
-  PROCESS_ERROR;
-  return retval;
-  // DO-NOT-DELETE splicer.end(iGeom_CGM.CgmGeom.measure)
-}
-
-/**
- * Return the type of surface as a string; if not a surface, an error is returned
- * @param face_handle Face for which the type is requested
- * @param face_type Type of face, returned as a string
- */
-void
-iGeom_CGM::CgmGeom_impl::getFaceType (
-  /* in */ void* gface_handle,
-  /* inout */ ::std::string& face_type ) 
-throw ( 
-  ::iBase::Error
-){
-  // DO-NOT-DELETE splicer.begin(iGeom_CGM.CgmGeom.getFaceType)
-  const char *this_type = NULL;
-  int32_t retval = iGeom_isEntParametric (igeomInstance, 
-                                              gentity_handle);
-  PROCESS_ERROR;
-  return retval;
-  // DO-NOT-DELETE splicer.end(iGeom_SIDL.GeomSidl.isEntParametric)
-}
-
-/**
  * Method:  isArrParametric[]
  */
 void
@@ -4232,7 +4176,7 @@
 // Insert-Code-Here {iGeom_SIDL.GeomSidl._misc} (miscellaneous code)
 // call this function when you want to throw an error
 void
-iGeom_CGM::CgmGeom_impl::processError() throw(::iBase::Error)
+iGeom_SIDL::GeomSidl_impl::processError() throw(::iBase::Error)
 {
   static void *behavior_tag = NULL;
   static ::iBase::ErrorActions action = ::iBase::ErrorActions_THROW_ERROR;
@@ -4265,3 +4209,24 @@
 }
 // DO-NOT-DELETE splicer.end(iGeom_SIDL.GeomSidl._misc)
 
+#error File has unused splicer blocks.
+/**
+ * ================= BEGIN UNREFERENCED METHOD(S) ================
+ * The following code segment(s) belong to unreferenced method(s).
+ * This can result from a method rename/removal in the sidl file.
+ * Move or remove the code in order to compile cleanly.
+ */
+  // DO-NOT-DELETE splicer.begin(iGeom_SIDL.GeomSidl_impl.getFaceType)
+  const char *this_type = NULL;
+  int32_t retval = iGeom_isEntParametric (igeomInstance, 
+                                              gentity_handle);
+  PROCESS_ERROR;
+  return retval;
+  // DO-NOT-DELETE splicer.end(iGeom_SIDL.GeomSidl_impl.getFaceType)
+  // DO-NOT-DELETE splicer.begin(iGeom_SIDL.GeomSidl_impl.measure)
+  CREATE_TEMP_ARRAY(double, measures);
+  int32_t retval = iGeom_getParametric();
+  PROCESS_ERROR;
+  return retval;
+  // DO-NOT-DELETE splicer.end(iGeom_SIDL.GeomSidl_impl.measure)
+// ================== END UNREFERENCED METHOD(S) =================

Modified: cgm/trunk/itaps/SIDL/iGeom.sidl
===================================================================
--- cgm/trunk/itaps/SIDL/iGeom.sidl	2009-01-26 18:18:56 UTC (rev 2572)
+++ cgm/trunk/itaps/SIDL/iGeom.sidl	2009-01-26 19:15:35 UTC (rev 2573)
@@ -1,4 +1,4 @@
-import iBase version 0.7;
+import iBase version 0.8;
 package iGeom version 0.6.99
 {
 

Modified: cgm/trunk/itaps/iGeom_CGMA.cc
===================================================================
--- cgm/trunk/itaps/iGeom_CGMA.cc	2009-01-26 18:18:56 UTC (rev 2572)
+++ cgm/trunk/itaps/iGeom_CGMA.cc	2009-01-26 19:15:35 UTC (rev 2573)
@@ -276,7 +276,7 @@
     RETURN (iBase_FAILURE);
 
     // return the tagmanager as the instance
-  *instance_out = &CGMTagManager::instance();
+  *instance_out = reinterpret_cast<iGeom_Instance>(&CGMTagManager::instance());
   RETURN(iBase_SUCCESS);
 }
 
@@ -443,7 +443,9 @@
                          iGeom_EntityIterator *iterator,
                          int* err)
 {
-  iGeom_initEntArrIter( instance, entity_set_handle, dimension, 1, iterator, err );
+  iGeom_initEntArrIter( instance, entity_set_handle, dimension, 1, 
+                        reinterpret_cast<iGeom_EntityArrIterator*>(iterator), 
+                        err );
 }
 
 void
@@ -451,7 +453,7 @@
                       /*in*/ iBase_EntitySetHandle entity_set_handle,
                       /*in*/ int type,
                       /*in*/ int requested_array_size,
-                      /*out*/ iGeom_EntityIterator* entArr_iterator,
+                      /*out*/ iGeom_EntityArrIterator* entArr_iterator,
                       int* err)
 {
   DLIList<RefEntity*> entities;
@@ -488,7 +490,7 @@
       entities, CUBIT_FALSE);
   
   CGMAIterator* iter = new CGMAIterator(entities, requested_array_size);
-  *entArr_iterator = reinterpret_cast<iGeom_EntityIterator>(iter);
+  *entArr_iterator = reinterpret_cast<iGeom_EntityArrIterator>(iter);
   RETURN(iBase_SUCCESS);
 }
 
@@ -517,7 +519,7 @@
 
 void
 iGeom_getNextEntArrIter(iGeom_Instance instance,
-                        /*in*/ iGeom_EntityIterator entArr_iterator,
+                        /*in*/ iGeom_EntityArrIterator entArr_iterator,
                         /*inout*/ iBase_EntityHandle **entity_handles,
                         int *entity_handles_allocated,
                         int *entity_handles_size,
@@ -547,7 +549,7 @@
 
 void
 iGeom_resetEntArrIter(iGeom_Instance instance,
-                      /*in*/ iGeom_EntityIterator gentity_iterator,
+                      /*in*/ iGeom_EntityArrIterator gentity_iterator,
                       int* err
                       )
 {
@@ -572,7 +574,7 @@
 
 void
 iGeom_endEntArrIter (iGeom_Instance instance,
-                     /*in*/ iGeom_EntityIterator gentity_iterator,
+                     /*in*/ iGeom_EntityArrIterator gentity_iterator,
                      int* err)
 {
   CGMAIterator* iterator = reinterpret_cast<CGMAIterator*>(gentity_iterator);
@@ -629,10 +631,11 @@
   std::vector<RefGroup*> group_ptrs;
   const RefGroup *this_grp = SET_HANDLE(from_entity_set);
   TM->get_pc_groups(const_cast<RefGroup*>(this_grp), 1, num_hops, group_ptrs);
-  CHECK_SIZE(*entity_set_handles, iBase_EntityHandle, 
+  CHECK_SIZE(*entity_set_handles, iBase_EntitySetHandle, 
              (int)group_ptrs.size());
 
-  std::copy(group_ptrs.begin(), group_ptrs.end(), *entity_set_handles);
+  iBase_EntitySetHandle* ent_arr = reinterpret_cast<iBase_EntitySetHandle*>(&group_ptrs[0]);
+  std::copy( ent_arr, ent_arr + group_ptrs.size(), *entity_set_handles);
   
   RETURN(iBase_SUCCESS);
 }
@@ -653,10 +656,11 @@
   std::vector<RefGroup*> group_ptrs;
   const RefGroup *this_grp = SET_HANDLE(from_entity_set);
   TM->get_pc_groups(const_cast<RefGroup*>(this_grp), 0, num_hops, group_ptrs);
-  CHECK_SIZE(*entity_set_handles, iBase_EntityHandle, 
+  CHECK_SIZE(*entity_set_handles, iBase_EntitySetHandle, 
              (int)group_ptrs.size());
 
-  std::copy(group_ptrs.begin(), group_ptrs.end(), *entity_set_handles);
+  iBase_EntitySetHandle* ent_arr = reinterpret_cast<iBase_EntitySetHandle*>(&group_ptrs[0]);
+  std::copy( ent_arr, ent_arr + group_ptrs.size(), *entity_set_handles);
   RETURN(iBase_SUCCESS);
 }
 
@@ -707,16 +711,16 @@
  */
 void
 iGeom_addPrntChld (iGeom_Instance instance,
-                   /*inout*/ iBase_EntitySetHandle *parent_entity_set,
-                   /*inout*/ iBase_EntitySetHandle *child_entity_set,
+                   /*inout*/ iBase_EntitySetHandle parent_entity_set,
+                   /*inout*/ iBase_EntitySetHandle child_entity_set,
                    int* err)
 {
   std::vector<RefGroup*> *my_parents = 
-    TM->pc_list(SET_HANDLE(*child_entity_set), 0, true);
+    TM->pc_list(SET_HANDLE(child_entity_set), 0, true);
   std::vector<RefGroup*> *my_children = 
-    TM->pc_list(SET_HANDLE(*parent_entity_set), 1, true);
-  RefGroup *par_group = SET_HANDLE(*parent_entity_set);
-  RefGroup *child_group = SET_HANDLE(*child_entity_set);
+    TM->pc_list(SET_HANDLE(parent_entity_set), 1, true);
+  RefGroup *par_group = SET_HANDLE(parent_entity_set);
+  RefGroup *child_group = SET_HANDLE(child_entity_set);
   my_parents->push_back(par_group);
   my_children->push_back(child_group);
   RETURN(iBase_SUCCESS);
@@ -727,12 +731,12 @@
  */
 void
 iGeom_rmvPrntChld (iGeom_Instance instance,
-                   /*inout*/ iBase_EntitySetHandle *parent_entity_set,
-                   /*inout*/ iBase_EntitySetHandle *child_entity_set,
+                   /*inout*/ iBase_EntitySetHandle parent_entity_set,
+                   /*inout*/ iBase_EntitySetHandle child_entity_set,
                    int* err)
 {
-  RefGroup *parent = reinterpret_cast<RefGroup *>(*parent_entity_set);
-  RefGroup *child = reinterpret_cast<RefGroup *>(*child_entity_set);
+  RefGroup *parent = reinterpret_cast<RefGroup *>(parent_entity_set);
+  RefGroup *child = reinterpret_cast<RefGroup *>(child_entity_set);
   std::vector<RefGroup*> *children = TM->pc_list(parent, 1, false),
     *parents = TM->pc_list(child, 0, false);
   if (NULL == children || NULL == parents) {
@@ -1252,7 +1256,7 @@
     // make sure string is null-terminated
   std::string tag_name_buf( tag_name, tag_name_len );
   tag_name = tag_name_buf.c_str();
-  *tag_handle = reinterpret_cast<void*>(static_cast<size_t>(TM->getTagHandle( tag_name )));
+  *tag_handle = reinterpret_cast<iBase_TagHandle>(static_cast<size_t>(TM->getTagHandle( tag_name )));
   RETURN(iBase_SUCCESS);
 }
 
@@ -1369,7 +1373,7 @@
                     /*in*/ iBase_EntityHandle const *entity_handles,
                     int entity_handles_size,
                     /*in*/ iBase_TagHandle tag_handle,
-                    /*inout*/ void* **tag_value,
+                    /*inout*/ iBase_EntityHandle **tag_value,
                     int *tag_value_allocated,
                     int *tag_value_size,
                     int* err)
@@ -1625,7 +1629,7 @@
 
 void
 iGeom_getEntSetIntData (iGeom_Instance instance,
-                        /*in*/ iBase_EntityHandle entity_set,
+                        /*in*/ iBase_EntitySetHandle entity_set,
                         /*in*/ iBase_TagHandle tag_handle,
                         int* tag_ptr,
                         int* err ) 
@@ -1638,7 +1642,7 @@
 
 void
 iGeom_getEntSetDblData (iGeom_Instance instance,
-                        /*in*/ iBase_EntityHandle entity_set,
+                        /*in*/ iBase_EntitySetHandle entity_set,
                         /*in*/ iBase_TagHandle tag_handle,
                         double* tag_ptr,
                         int* err ) 
@@ -1650,7 +1654,7 @@
 }
 void
 iGeom_getEntSetEHData (iGeom_Instance instance,
-                       /*in*/ iBase_EntityHandle entity_set,
+                       /*in*/ iBase_EntitySetHandle entity_set,
                        /*in*/ iBase_TagHandle tag_handle,
                        iBase_EntityHandle* tag_ptr,
                        int* err ) 
@@ -1682,7 +1686,7 @@
 
 void
 iGeom_setEntSetIntData (iGeom_Instance instance,
-                        /*in*/ iBase_EntityHandle entity_set,
+                        /*in*/ iBase_EntitySetHandle entity_set,
                         /*in*/ iBase_TagHandle tag_handle,
                         /*in*/ int tag_value,
                         int* err ) 
@@ -1695,7 +1699,7 @@
 
 void
 iGeom_setEntSetDblData (iGeom_Instance instance,
-                        /*in*/ iBase_EntityHandle entity_set,
+                        /*in*/ iBase_EntitySetHandle entity_set,
                         /*in*/ iBase_TagHandle tag_handle,
                         /*in*/ double tag_value,
                         int* err ) 
@@ -3483,7 +3487,8 @@
                     /*out*/ iBase_EntitySetHandle *entity_set,
                     int* err)
 {
-  *entity_set = RefEntityFactory::instance()->construct_RefGroup();
+  RefGroup* grp = RefEntityFactory::instance()->construct_RefGroup();
+  *entity_set = reinterpret_cast<iBase_EntitySetHandle>(grp);
     // need to set a tag denoting multiset or not...
   if (*entity_set == NULL) {
     RETURN(iBase_FAILURE);
@@ -3541,10 +3546,10 @@
 void
 iGeom_addEntSet (iGeom_Instance instance,
                  /*in*/ iBase_EntitySetHandle entity_set_to_add,
-                 /*inout*/ iBase_EntitySetHandle *entity_set_handle,
+                 /*inout*/ iBase_EntitySetHandle entity_set_handle,
                  int* err)
 {
-  iGeom_addEntToSet(instance, entity_set_to_add, entity_set_handle, err);
+  iGeom_addEntToSet(instance, reinterpret_cast<iBase_EntityHandle>(entity_set_to_add), entity_set_handle, err);
 }
 
 /**
@@ -3558,10 +3563,10 @@
 void
 iGeom_rmvEntSet (iGeom_Instance instance,
                  /*in*/ iBase_EntitySetHandle entity_set_to_remove,
-                 /*inout*/ iBase_EntitySetHandle *entity_set_handle,
+                 /*inout*/ iBase_EntitySetHandle entity_set_handle,
                  int* err)
 {
-  iGeom_rmvEntFromSet(instance, entity_set_to_remove, entity_set_handle, err);
+  iGeom_rmvEntFromSet(instance, reinterpret_cast<iBase_EntityHandle>(entity_set_to_remove), entity_set_handle, err);
 }
 
 /**
@@ -3576,12 +3581,12 @@
 void
 iGeom_addEntToSet (iGeom_Instance instance,
                    /*in*/ iBase_EntityHandle entity_to_add,
-                   /*inout*/ iBase_EntitySetHandle *entity_set_handle,
+                   /*inout*/ iBase_EntitySetHandle entity_set_handle,
                    int* err)
 {
   if (NULL == entity_to_add) RETURN(iBase_INVALID_ARGUMENT);
   
-  CubitStatus status = SET_HANDLE(*entity_set_handle)->
+  CubitStatus status = SET_HANDLE(entity_set_handle)->
     add_ref_entity(const_cast<RefEntity*>(ENTITY_HANDLE(entity_to_add)));
   
   if (CUBIT_SUCCESS != status) {
@@ -3602,12 +3607,12 @@
 void
 iGeom_rmvEntFromSet (iGeom_Instance instance,
                      /*in*/ iBase_EntityHandle entity_to_remove,
-                     /*inout*/ iBase_EntitySetHandle *entity_set_handle,
+                     /*inout*/ iBase_EntitySetHandle entity_set_handle,
                      int* err)
 {
-  if (NULL == *entity_set_handle) RETURN(iBase_INVALID_ARGUMENT);
+  if (NULL == entity_set_handle) RETURN(iBase_INVALID_ARGUMENT);
   
-  CubitStatus status = SET_HANDLE(*entity_set_handle)->
+  CubitStatus status = SET_HANDLE(entity_set_handle)->
     remove_ref_entity(const_cast<RefEntity*>(ENTITY_HANDLE(entity_to_remove)));
   if (CUBIT_SUCCESS != status) {
     ERROR(iBase_FAILURE, "Problem removing entity from a set.");
@@ -3645,7 +3650,9 @@
                          int* is_contained,
                          int* err) 
 {
-  iGeom_isEntContained( instance, containing_entity_set, contained_entity_set, is_contained, err);
+  iGeom_isEntContained( instance, containing_entity_set, 
+                        reinterpret_cast<iBase_EntityHandle>(contained_entity_set),
+                        is_contained, err);
 }
 
 /**
@@ -3660,12 +3667,12 @@
 iGeom_addEntArrToSet (iGeom_Instance instance,
                       /*in*/ iBase_EntityHandle const* entity_handles,
                       int entity_handles_size,
-                      /*inout*/ iBase_EntitySetHandle *entity_set,
+                      /*inout*/ iBase_EntitySetHandle entity_set,
                       int* err)
 {
   if (NULL == entity_set) RETURN(iBase_INVALID_ARGUMENT);
 
-  RefGroup *this_set = SET_HANDLE(*entity_set);
+  RefGroup *this_set = SET_HANDLE(entity_set);
   RefEntity **ent_array = (RefEntity**)(entity_handles);
   CubitStatus status = CUBIT_SUCCESS, tmp_status;
   for (int i = 0; i < entity_handles_size; i++) {
@@ -3689,12 +3696,12 @@
 iGeom_rmvEntArrFromSet (iGeom_Instance instance,
                         /*in*/ iBase_EntityHandle const* entity_handles,
                         int entity_handles_size,
-                        /*inout*/ iBase_EntitySetHandle *entity_set,
+                        /*inout*/ iBase_EntitySetHandle entity_set,
                         int* err)
 {
   if (NULL == entity_set) RETURN(iBase_INVALID_ARGUMENT);
 
-  RefGroup *this_set = SET_HANDLE(*entity_set);
+  RefGroup *this_set = SET_HANDLE(entity_set);
   RefEntity **ent_array = (RefEntity**)(entity_handles);
   CubitStatus status = CUBIT_SUCCESS, tmp_status;
   for (int i = 0; i < entity_handles_size; i++) {
@@ -4987,7 +4994,7 @@
   RefGroup *set3 = SET_HANDLE(*result_entity_set);
   if (NULL == set3) {
     set3 = RefEntityFactory::instance()->construct_RefGroup();
-    *result_entity_set = set3;
+    *result_entity_set = reinterpret_cast<iBase_EntitySetHandle>(set3);
   }
     
   set3->subtract(const_cast<RefGroup*>(set2), const_cast<RefGroup*>(set1));
@@ -5011,7 +5018,7 @@
   RefGroup *set3 = SET_HANDLE(*result_entity_set);
   if (NULL == set3) {
     set3 = RefEntityFactory::instance()->construct_RefGroup();
-    *result_entity_set = set3;
+    *result_entity_set = reinterpret_cast<iBase_EntitySetHandle>(set3);
   }
 
   set3->intersect(const_cast<RefGroup*>(set2), const_cast<RefGroup*>(set1));
@@ -5035,7 +5042,7 @@
   RefGroup *set3 = SET_HANDLE(*result_entity_set);
   if (NULL == set3) {
     set3 = RefEntityFactory::instance()->construct_RefGroup();
-    *result_entity_set = set3;
+    *result_entity_set = reinterpret_cast<iBase_EntitySetHandle>(set3);
   }
 
   set3->unite(const_cast<RefGroup*>(set2), const_cast<RefGroup*>(set1));
@@ -5061,12 +5068,12 @@
     }
 
     RefEntity *temp_entity = gmt->copy_body(this_body);
-    *geom_entity2 = temp_entity;
+    *geom_entity2 = reinterpret_cast<iBase_EntityHandle>(temp_entity);
   }
   else {
     RefEntity *this_ent = ENTITY_HANDLE(geom_entity);
     RefEntity *temp_entity = gmt->copy_refentity(this_ent);
-    *geom_entity2 = temp_entity;
+    *geom_entity2 = reinterpret_cast<iBase_EntityHandle>(temp_entity);
   }
 
   if (NULL == *geom_entity2) {
@@ -5115,7 +5122,7 @@
       // HACK to get last entity created, because cgm doesn't return
       // body created by sweep
     RefEntity *new_body = RefEntityFactory::instance()->get_last_body();
-    *geom_entity2 = new_body;
+    *geom_entity2 = reinterpret_cast<iBase_EntityHandle>(new_body);
 
       // now we know it's succeeded, delete original body
     Body *this_body = dynamic_cast<TopologyEntity*>(this_ent)->body();
@@ -5175,7 +5182,7 @@
   }
   
   RefEntity* tmp_body = gmt->sphere( radius );
-  *geom_entity = tmp_body;
+  *geom_entity = reinterpret_cast<iBase_EntityHandle>(tmp_body);
   RETURN ((tmp_body ? iBase_SUCCESS : iBase_FAILURE));
 }
 
@@ -5196,7 +5203,7 @@
   }
   
   RefEntity* tmp_body = gmt->prism( height, n_sides, major_rad, minor_rad );
-  *geom_entity = tmp_body;
+  *geom_entity = reinterpret_cast<iBase_EntityHandle>(tmp_body);
   RETURN ((tmp_body ? iBase_SUCCESS :iBase_FAILURE));
 }
 
@@ -5223,7 +5230,7 @@
   }
     
   RefEntity *temp_body = gmt->brick(tmp_x, tmp_y, tmp_z);
-  *geom_entity = temp_body;
+  *geom_entity = reinterpret_cast<iBase_EntityHandle>(temp_body);
 
   if (NULL == *geom_entity) {
     RETURN(iBase_FAILURE);
@@ -5243,7 +5250,7 @@
   double tmp_minor = (0.0 == minor_rad ? major_rad : minor_rad);
   RefEntity *temp_body = 
     gmt->cylinder(height, major_rad, tmp_minor, major_rad);
-  *geom_entity = temp_body;
+  *geom_entity = reinterpret_cast<iBase_EntityHandle>(temp_body);
 
 
   if (NULL == *geom_entity) {
@@ -5265,7 +5272,7 @@
   }
   
   RefEntity *temp_body = gmt->torus(major_rad, minor_rad);
-  *geom_entity = temp_body;
+  *geom_entity = reinterpret_cast<iBase_EntityHandle>(temp_body);
    
   if (NULL == *geom_entity) {
     RETURN(iBase_FAILURE);
@@ -5492,7 +5499,7 @@
   }
     
   else {
-    *geom_entity = dynamic_cast<RefEntity*>(new_bods.get());
+    *geom_entity = reinterpret_cast<iBase_EntityHandle>(dynamic_cast<RefEntity*>(new_bods.get()));
     for (int i = orig_bods.size(); i > 0; i--)
       gqt->delete_RefEntity(orig_bods.get_and_step());
   }
@@ -5530,7 +5537,7 @@
   }
   else {
     new_body = new_body_list.get();
-    *geom_entity = new_body;
+    *geom_entity = reinterpret_cast<iBase_EntityHandle>(new_body);
     gqt->delete_RefEntity(this_blank);
     gqt->delete_RefEntity(this_tool);
   }
@@ -5568,7 +5575,7 @@
   }
   else {
     new_body = new_body_list.get();
-    *geom_entity = new_body;
+    *geom_entity = reinterpret_cast<iBase_EntityHandle>(new_body);
     gqt->delete_RefEntity(this_ent2);
     gqt->delete_RefEntity(this_ent1);
   }
@@ -5631,7 +5638,7 @@
   else {
       // need to assign it to a RE* first so the void cast gets done right
     RefEntity *new_body = new_body_list.get();
-    *geom_entity2 = new_body;
+    *geom_entity2 = reinterpret_cast<iBase_EntityHandle>(new_body);
       // also, delete the original body, now that the section worked
     gqt->delete_RefEntity(this_body);
   }

Modified: cgm/trunk/itaps/testgeom.cc
===================================================================
--- cgm/trunk/itaps/testgeom.cc	2009-01-26 18:18:56 UTC (rev 2572)
+++ cgm/trunk/itaps/testgeom.cc	2009-01-26 19:15:35 UTC (rev 2573)
@@ -269,7 +269,7 @@
   iGeom_load( geom, &filename[0], 0, &err, filename.length(), 0 );
   CHECK( "ERROR : can not load a geometry" );
   
-  iBase_EntityHandle root_set;
+  iBase_EntitySetHandle root_set;
   iGeom_getRootSet( geom, &root_set, &err );
   CHECK( "ERROR : getRootSet failed!" );
   
@@ -308,7 +308,7 @@
 {
   int err;
   
-  iBase_EntityHandle root_set;
+  iBase_EntitySetHandle root_set;
   iGeom_getRootSet( geom, &root_set, &err );
   CHECK( "ERROR : getRootSet failed!" );
 
@@ -405,7 +405,7 @@
   iGeom_createTag( geom, &tag_name[0], sizeof(int), iBase_BYTES, &this_tag, &err, tag_name.length() );
   CHECK( "ERROR : can not create a tag for get_set test." );
   
-  iBase_EntityHandle root_set;
+  iBase_EntitySetHandle root_set;
   iGeom_getRootSet( geom, &root_set, &err );
   CHECK( "ERROR : getRootSet failed!" );
   
@@ -471,7 +471,7 @@
   int ent_type = iBase_VERTEX;
 
   int err;
-  iBase_EntityHandle root_set;
+  iBase_EntitySetHandle root_set;
   iGeom_getRootSet( geom, &root_set, &err );
   CHECK( "ERROR : getRootSet failed!" );
   
@@ -492,7 +492,7 @@
     CHECK( "Failed to get gentities by type in gentityset_test." );
     
       // add gentities into gentity set
-    iGeom_addEntArrToSet( geom, ARRAY_IN( gentities ), &ges_array[ent_type], &err );
+    iGeom_addEntArrToSet( geom, ARRAY_IN( gentities ), ges_array[ent_type], &err );
     CHECK( "Failed to add gentities in entityset_test." );
     
       // Check to make sure entity set really has correct number of entities in it
@@ -519,7 +519,7 @@
   CHECK( "Failed to create a super set in gentityset_test." );
 
   for (int i = 0; i < num_type; i++) {
-    iGeom_addEntSet( geom, ges_array[i], &super_set, &err );
+    iGeom_addEntSet( geom, ges_array[i], super_set, &err );
     CHECK( "Failed to create a super set in gentityset_test." );
   }
 
@@ -537,7 +537,7 @@
   CHECK( "Failed to get gedge gentities in gentityset_test." );
 
     // add EDGEs to ges1
-  iGeom_addEntArrToSet( geom, ARRAY_IN(gedges), &temp_ges1, &err );
+  iGeom_addEntArrToSet( geom, ARRAY_IN(gedges), temp_ges1, &err );
   CHECK( "Failed to add gedge gentities in gentityset_test." );
 
     // get all FACE gentities
@@ -545,7 +545,7 @@
   CHECK( "Failed to get gface gentities in gentityset_test." );
 
     // add FACEs to es1
-  iGeom_addEntArrToSet( geom, ARRAY_IN(gfaces), &temp_ges1, &err );
+  iGeom_addEntArrToSet( geom, ARRAY_IN(gfaces), temp_ges1, &err );
   CHECK( "Failed to add gface gentities in gentityset_test." );
 
     // subtract EDGEs
@@ -574,7 +574,7 @@
     //
 
     // clean out the temp_ges1
-  iGeom_rmvEntArrFromSet( geom, ARRAY_IN(gfaces), &temp_ges1, &err );
+  iGeom_rmvEntArrFromSet( geom, ARRAY_IN(gfaces), temp_ges1, &err );
   CHECK( "Failed to remove gface gentities in gentityset_test." );
 
     // check if it is really cleaned out
@@ -587,11 +587,11 @@
   }
   
     // add EDGEs to temp ges1
-  iGeom_addEntArrToSet( geom, ARRAY_IN(gedges), &temp_ges1, &err );
+  iGeom_addEntArrToSet( geom, ARRAY_IN(gedges), temp_ges1, &err );
   CHECK( "Failed to add gedge gentities in gentityset_test." );
 
     // add FACEs to temp ges1
-  iGeom_addEntArrToSet( geom, ARRAY_IN(gfaces), &temp_ges1, &err );
+  iGeom_addEntArrToSet( geom, ARRAY_IN(gfaces), temp_ges1, &err );
   CHECK( "Failed to add gface gentities in gentityset_test." );
 
     // intersect temp_ges1 with gedges set 
@@ -622,7 +622,7 @@
   CHECK( "Failed to get gregion gentities in gentityset_test." );
   
     // add REGIONs to temp es2
-  iGeom_addEntArrToSet( geom, ARRAY_IN(gregions), &temp_ges2, &err );
+  iGeom_addEntArrToSet( geom, ARRAY_IN(gregions), temp_ges2, &err );
   CHECK( "Failed to add gregion gentities in gentityset_test." );
 
     // unite temp_ges1 and temp_ges2
@@ -647,7 +647,7 @@
   iGeom_createEntSet( geom, true, &parent_child, &err );
   CHECK( "Problem creating gentityset in gentityset_test." );
 
-  iGeom_addPrntChld( geom, &ges_array[iBase_VERTEX], &parent_child, &err );
+  iGeom_addPrntChld( geom, ges_array[iBase_VERTEX], parent_child, &err );
   CHECK( "Problem add parent in gentityset_test." );
 
     // check if parent is really added
@@ -668,17 +668,17 @@
   //int num_temp_gedge_array;
   //parent_child_array.set(0, parent_child);
   //temp_gedge_array.set(0, ges_array[TSTTG::EntityType_EDGE]);
-  iGeom_addPrntChld( geom, &ges_array[iBase_EDGE], &parent_child, &err );
+  iGeom_addPrntChld( geom, ges_array[iBase_EDGE], parent_child, &err );
   CHECK( "Problem adding parent and child in gentityset_test." );
 
   //sidl::array<void*> temp_gface_array = sidl::array<void*>::create1d(1);
   //int num_temp_gface_array;
   //temp_gface_array.set(0, ges_array[TSTTG::EntityType_FACE]);
-  iGeom_addPrntChld( geom, &parent_child, &ges_array[iBase_FACE], &err );
+  iGeom_addPrntChld( geom, parent_child, ges_array[iBase_FACE], &err );
   CHECK( "Problem adding parent and child in gentityset_test." );
 
     // add child
-  iGeom_addPrntChld( geom, &parent_child, &ges_array[iBase_REGION], &err );
+  iGeom_addPrntChld( geom, parent_child, ges_array[iBase_REGION], &err );
   CHECK( "Problem adding child in gentityset_test." );
 
     // get the number of parent gentitysets
@@ -714,7 +714,7 @@
   }
 
     // remove children
-  iGeom_rmvPrntChld( geom, &parent_child, &ges_array[iBase_FACE], &err );
+  iGeom_rmvPrntChld( geom, parent_child, ges_array[iBase_FACE], &err );
   CHECK( "Problem removing parent child in gentityset_test." );
 
     // get the number of child gentitysets
@@ -775,7 +775,7 @@
   }
 
     // get all entities in super set
-  SimpleArray<iBase_EntityHandle> all_gentities;
+  SimpleArray<iBase_EntitySetHandle> all_gentities;
   iGeom_getEntSets( geom, super_set, 1, ARRAY_INOUT( all_gentities ), &err );
   CHECK( "Problem to get all gentities in super set." );
   
@@ -795,7 +795,7 @@
     iBase_EntitySetHandle ges_k = ges_array1[k];
 
     for (int a = 0; a < ges_array1.size(); a++) {
-      iGeom_addEntSet( geom, ges_array1[a], &ges_k, &err );
+      iGeom_addEntSet( geom, ges_array1[a], ges_k, &err );
       CHECK( "Problem to add entity set." );
     }
     
@@ -805,7 +805,7 @@
     //superset_array.set(0, super_set);
     //int num_superset_array;
     
-    iGeom_addEntSet( geom, super_set, &ges_k, &err );
+    iGeom_addEntSet( geom, super_set, ges_k, &err );
     CHECK( "Problem to add super set to gentitysets." );
 
       // add one gentity sets multiple times
@@ -816,7 +816,7 @@
     //temp_array1.set(0, temp_ges1);
 
     //for (int l = 0; l < 3; l++) {
-    iGeom_addEntSet( geom, temp_ges1, &ges_k, &err );
+    iGeom_addEntSet( geom, temp_ges1, ges_k, &err );
     CHECK( "Problem to add temp set to gentitysets." );
       //}
   }
@@ -835,7 +835,7 @@
 bool topology_adjacencies_test(iGeom_Instance geom)
 {
   int i, err;
-  iBase_EntityHandle root_set;
+  iBase_EntitySetHandle root_set;
   iGeom_getRootSet( geom, &root_set, &err );
   CHECK( "ERROR : getRootSet failed!" );
 



More information about the cgma-dev mailing list