From 8ecde4094333311d28bf66fdc60c81ffa5f2e26e Mon Sep 17 00:00:00 2001
From: Francois Henrotte <francois.henrotte@ulg.ac.be>
Date: Fri, 4 Nov 2011 15:30:08 +0000
Subject: [PATCH] added function toCharIfClient

---
 Common/onelab.h | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/Common/onelab.h b/Common/onelab.h
index 4f35d1bf12..0fdea84efd 100644
--- a/Common/onelab.h
+++ b/Common/onelab.h
@@ -441,6 +441,15 @@ namespace onelab{
         s += (*it)->toChar() + "\n";
       return s;
     }
+    std::string toCharIfClient(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++)
+        if ((*it)->hasClient(client)) s += (*it)->toChar() + "\n";
+      return s;
+    }
   };
 
   // The onelab client: a class that communicates with the onelab
@@ -532,6 +541,8 @@ namespace onelab{
       return _parameterSpace.getChanged(client);
     }
     std::string toChar(){ return _parameterSpace.toChar(); }
+    std::string toCharIfClient(const std::string &client="")
+      { return _parameterSpace.toCharIfClient(client); }
   };
     
   class localClient : public client{
-- 
GitLab