X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcreaDevManagerLib%2FCDMUtilities.cpp;h=ae37bb57aa195aa63480aa8a06abd330f14d329c;hb=de76ec742d17da9747b691dd168a8d832a64168e;hp=cc64ee3e96acfa6376010b08e7adc64afc5b29bd;hpb=96c6ccdac4c0db2047e0a7302dcb14fbfb091e3c;p=crea.git diff --git a/lib/creaDevManagerLib/CDMUtilities.cpp b/lib/creaDevManagerLib/CDMUtilities.cpp index cc64ee3..ae37bb5 100644 --- a/lib/creaDevManagerLib/CDMUtilities.cpp +++ b/lib/creaDevManagerLib/CDMUtilities.cpp @@ -46,37 +46,6 @@ namespace CDMUtilities { - template - Container& splitter::split - ( - Container& result, - const typename Container::value_type& s, - const typename Container::value_type& delimiters, - empties_t empties - ) - { - result.clear(); - size_t current; - size_t next = -1; - do - { - if (empties == no_empties) - { - next = s.find_first_not_of(delimiters, next + 1); - if (next == Container::value_type::npos) - { - break; - } - next -= 1; - } - current = next + 1; - next = s.find_first_of(delimiters, current); - result.push_back(s.substr(current, next - current)); - } - while (next != Container::value_type::npos); - return result; - } - const std::string fixPath(const std::string& path) { std::string pathFixed = ""; @@ -148,18 +117,19 @@ namespace CDMUtilities return system(command.c_str()); } - int openFileWithCommand(const std::string& file, const std::string& command) + int openFileWithCommand(const std::string& file, const std::string& command, const std::string& parameters) { #ifdef _WIN32 std::string comm = "start " + command; if(file != "") - comm += " \"" + file + "\""; + comm += " \"" + file + "\" " + parameters; #else std::string comm = command; if(file != "") - comm += " \"" + file + "\""; + comm += " \"" + file + "\" " + parameters; comm += " &"; #endif + std::cout << "executing: " << comm << std::endl; return system(comm.c_str()); }