diff --git a/Common/onelab.h b/Common/onelab.h index 431f6fb47cb6348393f0b58e76f840ba1834d998..2ea399228191c758a55af62bd3c954107ed7445f 100644 --- a/Common/onelab.h +++ b/Common/onelab.h @@ -375,8 +375,8 @@ namespace onelab{ client(const std::string &name) : _name(name){} virtual ~client(){} std::string getName(){ return _name; } - virtual bool run(const std::string &what) = 0; - virtual bool kill() = 0; + virtual bool run(const std::string &what){ return false; } + virtual bool kill(){ return false; } }; // The onelab server: a singleton that stores the parameter space @@ -445,8 +445,6 @@ namespace onelab{ _server->get(parameters, name); return true; } - virtual bool run(const std::string &what){ return false; } - virtual bool kill(){ return false; } }; class localNetworkClient : public localClient{ @@ -540,6 +538,12 @@ namespace onelab{ } return true; } + void sendInfo(const std::string &msg){ _gmshClient->Info(msg.c_str()); } + void sendWarning(const std::string &msg){ _gmshClient->Warning(msg.c_str()); } + void sendError(const std::string &msg){ _gmshClient->Error(msg.c_str()); } + void sendProgress(const std::string &msg){ _gmshClient->Progress(msg.c_str()); } + void sendMergeFileRequest(const std::string &msg){ _gmshClient->MergeFile(msg.c_str()); } + void sendParseStringRequest(const std::string &msg){ _gmshClient->ParseString(msg.c_str()); } }; } diff --git a/Fltk/onelabWindow.cpp b/Fltk/onelabWindow.cpp index 7aa28c2860fd72db6d81820aee269bb53466f748..0d5991cc09be00301505fe9f2e1597847642839a 100644 --- a/Fltk/onelabWindow.cpp +++ b/Fltk/onelabWindow.cpp @@ -64,7 +64,7 @@ bool onelab::localNetworkClient::run(const std::string &what) onelabGmshServer *server = new onelabGmshServer(this); std::string sockname = "localhost:1631"; - std::string command = "getdp -onelab -socket localhost:1631 test.pro &"; + std::string command = _commandLine + " " + what + " -onelab " + sockname + " &"; int sock; try{ @@ -164,6 +164,7 @@ void onelab_cb(Fl_Widget *w, void *data) it != onelab::server::instance()->lastClient(); it++){ onelab::client *c = it->second; printf("client name = %s\n", c->getName().c_str()); + c->run("/Users/geuzaine/src/getdp/demos/test.pro"); } FlGui::instance()->onelab->show(); }