Skip to content
Snippets Groups Projects
Commit 86d9ce52 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

onelab communicates :-)

parent 4a35b97d
No related branches found
No related tags found
No related merge requests found
...@@ -375,8 +375,8 @@ namespace onelab{ ...@@ -375,8 +375,8 @@ namespace onelab{
client(const std::string &name) : _name(name){} client(const std::string &name) : _name(name){}
virtual ~client(){} virtual ~client(){}
std::string getName(){ return _name; } std::string getName(){ return _name; }
virtual bool run(const std::string &what) = 0; virtual bool run(const std::string &what){ return false; }
virtual bool kill() = 0; virtual bool kill(){ return false; }
}; };
// The onelab server: a singleton that stores the parameter space // The onelab server: a singleton that stores the parameter space
...@@ -445,8 +445,6 @@ namespace onelab{ ...@@ -445,8 +445,6 @@ namespace onelab{
_server->get(parameters, name); _server->get(parameters, name);
return true; return true;
} }
virtual bool run(const std::string &what){ return false; }
virtual bool kill(){ return false; }
}; };
class localNetworkClient : public localClient{ class localNetworkClient : public localClient{
...@@ -540,6 +538,12 @@ namespace onelab{ ...@@ -540,6 +538,12 @@ namespace onelab{
} }
return true; 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()); }
}; };
} }
......
...@@ -64,7 +64,7 @@ bool onelab::localNetworkClient::run(const std::string &what) ...@@ -64,7 +64,7 @@ bool onelab::localNetworkClient::run(const std::string &what)
onelabGmshServer *server = new onelabGmshServer(this); onelabGmshServer *server = new onelabGmshServer(this);
std::string sockname = "localhost:1631"; std::string sockname = "localhost:1631";
std::string command = "getdp -onelab -socket localhost:1631 test.pro &"; std::string command = _commandLine + " " + what + " -onelab " + sockname + " &";
int sock; int sock;
try{ try{
...@@ -164,6 +164,7 @@ void onelab_cb(Fl_Widget *w, void *data) ...@@ -164,6 +164,7 @@ void onelab_cb(Fl_Widget *w, void *data)
it != onelab::server::instance()->lastClient(); it++){ it != onelab::server::instance()->lastClient(); it++){
onelab::client *c = it->second; onelab::client *c = it->second;
printf("client name = %s\n", c->getName().c_str()); printf("client name = %s\n", c->getName().c_str());
c->run("/Users/geuzaine/src/getdp/demos/test.pro");
} }
FlGui::instance()->onelab->show(); FlGui::instance()->onelab->show();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment