[MOAB-dev] r4445 - MOAB/trunk/itaps/igeom

iulian at mcs.anl.gov iulian at mcs.anl.gov
Fri Jan 14 16:20:17 CST 2011


Author: iulian
Date: 2011-01-14 16:20:17 -0600 (Fri, 14 Jan 2011)
New Revision: 4445

Modified:
   MOAB/trunk/itaps/igeom/iGeom_MOAB.cpp
   MOAB/trunk/itaps/igeom/iGeom_MOAB.hpp
Log:
casting for the right interface


Modified: MOAB/trunk/itaps/igeom/iGeom_MOAB.cpp
===================================================================
--- MOAB/trunk/itaps/igeom/iGeom_MOAB.cpp	2011-01-14 20:50:28 UTC (rev 4444)
+++ MOAB/trunk/itaps/igeom/iGeom_MOAB.cpp	2011-01-14 22:20:17 UTC (rev 4445)
@@ -244,9 +244,9 @@
 
 void iGeom_newGeom(char const* options, iGeom_Instance* instance_out, int* err,
       int options_len) {
-   if (*instance_out && !(reinterpret_cast<Interface*> (instance_out))) {
+   if (*instance_out && !(reinterpret_cast<iMesh_Instance*> (instance_out))) {
       *err = iBase_INVALID_ENTITY_TYPE;
-      ERRORR("Passed in instance must be an Interface*.");
+      ERRORR("Passed in instance must be an iMesh_Instance*.");
    }
 
    // make a new imesh instance

Modified: MOAB/trunk/itaps/igeom/iGeom_MOAB.hpp
===================================================================
--- MOAB/trunk/itaps/igeom/iGeom_MOAB.hpp	2011-01-14 20:50:28 UTC (rev 4444)
+++ MOAB/trunk/itaps/igeom/iGeom_MOAB.hpp	2011-01-14 22:20:17 UTC (rev 4445)
@@ -3,6 +3,7 @@
 
 #include "iGeom.h"
 #include "moab/Forward.hpp"
+#include "MBiMesh.hpp"
 
 namespace moab { class GeomTopoTool; }
 
@@ -27,7 +28,7 @@
 
 /* Define macro for quick reference to MBInterface instance */
 static inline moab::Interface* MBI_cast( iGeom_Instance i )  
-  { return reinterpret_cast<moab::Interface*>(i); }         
+  { return reinterpret_cast<MBiMesh*>(i)->mbImpl; }
 #define MBI MBI_cast(instance)
 
 /* Define macro for quick reference to moab::Interface instance */
@@ -35,7 +36,7 @@
   { return reinterpret_cast<moab::EntityHandle>(h); }         
 
 #define GETGTT(a) {if (_my_geomTopoTool == NULL) _my_geomTopoTool =	\
-	new GeomTopoTool(reinterpret_cast<moab::Interface*>(a));}
+	new GeomTopoTool(reinterpret_cast<MBiMesh*>(a)->mbImpl);}
 
 /* Most recently returned error code */
 //extern "C" iBase_Error iGeom_LAST_ERROR;






More information about the moab-dev mailing list