diff --git a/Common/onelab.h b/Common/onelab.h index 8f49f54bacb0788a7452208e791f6eeed8421bea..1c8a0c23da47e7b4d485f5067370604448ac7323 100644 --- a/Common/onelab.h +++ b/Common/onelab.h @@ -312,15 +312,18 @@ namespace onelab{ // regions will include union, intersection, etc. class region : public parameter{ private: - std::string _value; // TODO: change this into std::set<std::string> - std::vector<std::string> _choices; + std::set<std::string> _value; + std::vector<std::set<std::string> > _choices; + // optional geometrical dimension + int _dimension; 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="") : 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"; } - const std::string &getValue() const { return _value; } + const std::set<std::string> &getValue() const { return _value; } void update(const region &p) { addClients(p.getClients()); @@ -334,12 +337,15 @@ namespace onelab{ } std::string toChar() const { + /* std::ostringstream sstream; sstream << parameter::toChar() << _value << charSep() << _choices.size() << charSep(); for(unsigned int i = 0; i < _choices.size(); i++) sstream << sanitize(_choices[i]) << charSep(); return sstream.str(); + */ + return ""; } }; diff --git a/Fltk/onelabWindow.cpp b/Fltk/onelabWindow.cpp index 194458d553fa8a68697a183f788aa4afc077d9d7..0c7359dc196627a13a76f9a1ed6d8820f8e29f92 100644 --- a/Fltk/onelabWindow.cpp +++ b/Fltk/onelabWindow.cpp @@ -655,7 +655,9 @@ void onelab_cb(Fl_Widget *w, void *data) c->getName() == "GmshRemote") // distant post-processing Gmsh client continue; 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 // variable to "check" or "compute", and letting the client decide what to // do) @@ -1055,6 +1057,7 @@ void solver_cb(Fl_Widget *w, void *data) int num = (intptr_t)data; if(num >= 0){ + // FIXME: unregister any non-local clients from the onelab::server std::string name = opt_solver_name(num, GMSH_GET, ""); std::string exe = opt_solver_executable(num, GMSH_GET, ""); FlGui::instance()->onelab->addSolver(name, exe, num);