Salome HOME
Bug correction
[tools/medcoupling.git] / src / RENUMBER / RenumberingFactory.cxx
index 93b5ad3e646f9d0e699fdc43a6240d4a43444070..fd4410e9011414fd75113b222c24ad15f9958c1c 100644 (file)
 using namespace std;
 
 namespace MED_RENUMBER
-{
+{ 
   Renumbering* RenumberingFactory(const string &s)
   {
 #ifdef MED_ENABLE_METIS
 #ifdef ENABLE_BOOST
-    if (s=="METIS")
+    if (s==METIS_ALG)
       {
         return new METISRenumbering;
       }
-    else if(s=="BOOST")
+    else if(s==BOOST_ALG)
       {
         return new BOOSTRenumbering;
       }
@@ -51,7 +51,7 @@ namespace MED_RENUMBER
       }
 #endif
 #ifndef ENABLE_BOOST
-    if (s=="METIS")
+    if (s==METIS_ALG)
       {
         return new METISRenumbering;
       }
@@ -64,7 +64,7 @@ namespace MED_RENUMBER
 #endif
 #ifndef MED_ENABLE_METIS
 #ifdef ENABLE_BOOST
-    if (s=="BOOST")
+    if (s==BOOST_ALG)
       {
         return new BOOSTRenumbering;
       }
@@ -80,4 +80,24 @@ namespace MED_RENUMBER
 #endif
 #endif
   }
+
+  std::vector<std::string> AllRenumberMethods()
+  {
+    std::vector<std::string> ret;
+    ret.push_back(std::string(BOOST_ALG));
+    ret.push_back(std::string(METIS_ALG));
+    return ret;
+  }
+  
+  std::vector<std::string> RenumberAvailableMethods()
+  {
+    std::vector<std::string> ret;
+#ifdef ENABLE_BOOST
+    ret.push_back(std::string(BOOST_ALG));
+#endif
+#ifdef MED_ENABLE_METIS
+    ret.push_back(std::string(METIS_ALG));
+#endif
+    return ret;
+  }
 }