[cgma-dev] r2211 - cgm/trunk/init

kraftche at mcs.anl.gov kraftche at mcs.anl.gov
Wed Nov 5 12:19:29 CST 2008


Author: kraftche
Date: 2008-11-05 12:19:29 -0600 (Wed, 05 Nov 2008)
New Revision: 2211

Modified:
   cgm/trunk/init/InitCGMA.cpp
Log:
Choose default engine if initialize_engine is called with NULL engine string

Modified: cgm/trunk/init/InitCGMA.cpp
===================================================================
--- cgm/trunk/init/InitCGMA.cpp	2008-11-05 15:30:24 UTC (rev 2210)
+++ cgm/trunk/init/InitCGMA.cpp	2008-11-05 18:19:29 UTC (rev 2211)
@@ -57,6 +57,18 @@
 
 CubitStatus InitCGMA::initialize_engine( const char* name )
 {
+  if (!name) {
+#if defined(CUBIT_CGM) || defined(ACIS)
+    name = "ACIS";
+#elif defined (HAVE_OCC)
+    name = "OCC";
+#else
+    PRINT_INFO("No engine to default to in InitCGMA");
+    return CUBIT_FAILURE;
+#endif
+  }
+
+
   if (streq_nocase(name,"ACIS")) {
 #ifdef CUBIT_CGM
     if (!AcisQueryEngine::instance_)
@@ -75,7 +87,7 @@
     VirtualQueryEngine::instance();
   }
 #ifdef HAVE_OCC  
-  else if (streq_nocase(name,"OCC") || streq_nocase(name,"occ")) {
+  else if (streq_nocase(name,"OCC")) {
     OCCQueryEngine::instance();
     OCCModifyEngine::instance();
   }




More information about the cgma-dev mailing list