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

merge toCharIfClient and toChar

parent d80ede0a
No related branches found
No related tags found
No related merge requests found
...@@ -432,22 +432,13 @@ namespace onelab{ ...@@ -432,22 +432,13 @@ namespace onelab{
if(client.empty() || (*it)->hasClient(client)) if(client.empty() || (*it)->hasClient(client))
(*it)->setChanged(changed); (*it)->setChanged(changed);
} }
std::string toChar() std::string toChar(const std::string &client="")
{
std::string s;
std::set<parameter*> ps;
_getAllParameters(ps);
for(std::set<parameter*>::iterator it = ps.begin(); it != ps.end(); it++)
s += (*it)->toChar() + "\n";
return s;
}
std::string toCharIfClient(const std::string &client="")
{ {
std::string s; std::string s;
std::set<parameter*> ps; std::set<parameter*> ps;
_getAllParameters(ps); _getAllParameters(ps);
for(std::set<parameter*>::iterator it = ps.begin(); it != ps.end(); it++) for(std::set<parameter*>::iterator it = ps.begin(); it != ps.end(); it++)
if ((*it)->hasClient(client)) s += (*it)->toChar() + "\n"; if(client.empty() || (*it)->hasClient(client)) s += (*it)->toChar() + "\n";
return s; return s;
} }
}; };
...@@ -540,9 +531,10 @@ namespace onelab{ ...@@ -540,9 +531,10 @@ namespace onelab{
{ {
return _parameterSpace.getChanged(client); return _parameterSpace.getChanged(client);
} }
std::string toChar(){ return _parameterSpace.toChar(); } std::string toChar(const std::string &client="")
std::string toCharIfClient(const std::string &client="") {
{ return _parameterSpace.toCharIfClient(client); } return _parameterSpace.toChar(client);
}
}; };
class localClient : public client{ class localClient : public client{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment