From 90e1b2a58ebaa51e779054eda7a613e445624d85 Mon Sep 17 00:00:00 2001 From: Ger van Diepen <diepen@astron.nl> Date: Mon, 19 Mar 2012 08:01:04 +0000 Subject: [PATCH] Task #514 Added function adoptCollection --- LCS/pyparameterset/src/pyparameterset.cc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/LCS/pyparameterset/src/pyparameterset.cc b/LCS/pyparameterset/src/pyparameterset.cc index c486682ddb2..aa854e19e9f 100644 --- a/LCS/pyparameterset/src/pyparameterset.cc +++ b/LCS/pyparameterset/src/pyparameterset.cc @@ -84,6 +84,9 @@ namespace LOFAR { PyParameterSet makeSubset (const string& baseKey, const string& prefix) { return ParameterSet::makeSubset (baseKey, prefix); } + void adoptCollection (const PyParameterSet& parset, const string& prefix) + { return ParameterSet::adoptCollection (parset, prefix); } + PyParameterValue get (const string& key) const { return ParameterSet::get (key); } @@ -238,7 +241,13 @@ namespace LOFAR { .def ("adoptFile", &ParameterSet::adoptFile, (boost::python::arg("filename"), boost::python::arg("prefix")=""), - "Add the parameters in the parset file with the given prefix.") + "Add the parameters from a parset file and prefix their names " + "with the given prefix.") + .def ("adoptCollection", &PyParameterSet::adoptCollection, + (boost::python::arg("parameterset"), + boost::python::arg("prefix")=""), + "Add the parameters from a parset object and prefix their names " + "with the given prefix.") .def ("writeFile", &ParameterSet::writeFile, (boost::python::arg("filename"), boost::python::arg("append")=false), -- GitLab