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

onelab

parent 4cfccbad
No related branches found
No related tags found
No related merge requests found
...@@ -312,15 +312,18 @@ namespace onelab{ ...@@ -312,15 +312,18 @@ namespace onelab{
// regions will include union, intersection, etc. // regions will include union, intersection, etc.
class region : public parameter{ class region : public parameter{
private: private:
std::string _value; // TODO: change this into std::set<std::string> std::set<std::string> _value;
std::vector<std::string> _choices; std::vector<std::set<std::string> > _choices;
// optional geometrical dimension
int _dimension;
public: public:
region(const std::string &name="", const std::string &value="", region(const std::string &name="",
const std::set<std::string> &value = std::set<std::string>(),
const std::string &shortHelp="", const std::string &help="") const std::string &shortHelp="", const std::string &help="")
: parameter(name, shortHelp, help), _value(value) {} : parameter(name, shortHelp, help), _value(value) {}
void setValue(const std::string &value){ _value = value; } void setValue(const std::set<std::string> &value){ _value = value; }
std::string getType() const { return "region"; } std::string getType() const { return "region"; }
const std::string &getValue() const { return _value; } const std::set<std::string> &getValue() const { return _value; }
void update(const region &p) void update(const region &p)
{ {
addClients(p.getClients()); addClients(p.getClients());
...@@ -334,12 +337,15 @@ namespace onelab{ ...@@ -334,12 +337,15 @@ namespace onelab{
} }
std::string toChar() const std::string toChar() const
{ {
/*
std::ostringstream sstream; std::ostringstream sstream;
sstream << parameter::toChar() << _value << charSep() sstream << parameter::toChar() << _value << charSep()
<< _choices.size() << charSep(); << _choices.size() << charSep();
for(unsigned int i = 0; i < _choices.size(); i++) for(unsigned int i = 0; i < _choices.size(); i++)
sstream << sanitize(_choices[i]) << charSep(); sstream << sanitize(_choices[i]) << charSep();
return sstream.str(); return sstream.str();
*/
return "";
} }
}; };
......
...@@ -655,7 +655,9 @@ void onelab_cb(Fl_Widget *w, void *data) ...@@ -655,7 +655,9 @@ void onelab_cb(Fl_Widget *w, void *data)
c->getName() == "GmshRemote") // distant post-processing Gmsh client c->getName() == "GmshRemote") // distant post-processing Gmsh client
continue; continue;
std::string what = getModelName(c); std::string what = getModelName(c);
//onelab::string o(c->getName() + "/action", action);
//o.setVisible(false);
//onelab::server::instance()->set(o);
// FIXME this should be uniformized (probably just be setting a onelab // FIXME this should be uniformized (probably just be setting a onelab
// variable to "check" or "compute", and letting the client decide what to // variable to "check" or "compute", and letting the client decide what to
// do) // do)
...@@ -1055,6 +1057,7 @@ void solver_cb(Fl_Widget *w, void *data) ...@@ -1055,6 +1057,7 @@ void solver_cb(Fl_Widget *w, void *data)
int num = (intptr_t)data; int num = (intptr_t)data;
if(num >= 0){ if(num >= 0){
// FIXME: unregister any non-local clients from the onelab::server
std::string name = opt_solver_name(num, GMSH_GET, ""); std::string name = opt_solver_name(num, GMSH_GET, "");
std::string exe = opt_solver_executable(num, GMSH_GET, ""); std::string exe = opt_solver_executable(num, GMSH_GET, "");
FlGui::instance()->onelab->addSolver(name, exe, num); FlGui::instance()->onelab->addSolver(name, exe, num);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment