const std::string getPluginFunctionName(const std::string& s) { std::string res; if ((s.find("\n", 0) != std::string::npos) || (s.find("\t", 0) != std::string::npos) || (s.find(" ", 0) != std::string::npos)) { //raise an exception throw SiconosSharedLibraryException("% SharedLibrary managment - getPluginFunctionName - The 'string' which contains the plugin function name contains '\\n' or '\\t' or ' '"); } else if ((s.find(":", 0) == std::string::npos) && (s.rfind(":", 0) != s.rfind(":", 0))) { //raise an exception throw SiconosSharedLibraryException("% SharedLibrary managment - getPluginFunctionName - The 'string' which contains the plugin name is not well formed. It must be like : plugin_name:plugin_function_name"); } else { // return the plugin function name int pos = s.find(":", 0); res = s.substr(pos + 1, s.length()); return res; } }
void SiconosSharedLibraryException::selfThrow(const std::string& report) { throw SiconosSharedLibraryException(report); }
void SiconosSharedLibraryException::selfThrow() { throw SiconosSharedLibraryException(); }