X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FRENUMBER%2FRenumberingFactory.cxx;h=fd4410e9011414fd75113b222c24ad15f9958c1c;hb=a787799e3bcf19598227996617e5113e68ff36fb;hp=18f29f1f7112acf58da35a5f68d61d273761d0bc;hpb=f1a947b32a36d8dc8e3079b25305bb50e8cb59a0;p=tools%2Fmedcoupling.git diff --git a/src/RENUMBER/RenumberingFactory.cxx b/src/RENUMBER/RenumberingFactory.cxx index 18f29f1f7..fd4410e90 100644 --- a/src/RENUMBER/RenumberingFactory.cxx +++ b/src/RENUMBER/RenumberingFactory.cxx @@ -1,9 +1,9 @@ -// Copyright (C) 2007-2013 CEA/DEN, EDF R&D +// Copyright (C) 2007-2016 CEA/DEN, EDF R&D // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either -// version 2.1 of the License. +// version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -31,16 +31,16 @@ 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 AllRenumberMethods() + { + std::vector ret; + ret.push_back(std::string(BOOST_ALG)); + ret.push_back(std::string(METIS_ALG)); + return ret; + } + + std::vector RenumberAvailableMethods() + { + std::vector 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; + } }