Skip to content
Snippets Groups Projects
Commit db15e323 authored by Ger van Diepen's avatar Ger van Diepen
Browse files

Task #3116

Had to change expand function too
parent 129db03f
No related branches found
No related tags found
No related merge requests found
...@@ -47,6 +47,10 @@ class parametervalue(PyParameterValue): ...@@ -47,6 +47,10 @@ class parametervalue(PyParameterValue):
"""Get the full parameter value.""" """Get the full parameter value."""
return self.get() return self.get()
def expand(self):
"""Expand the value."""
return parametervalue(self._expand(), _copyObj=True)
def getVector(self): def getVector(self):
"""Get the value as a vector of values.""" """Get the value as a vector of values."""
return [parametervalue(v, _copyObj=True) for v in self._getVector()] return [parametervalue(v, _copyObj=True) for v in self._getVector()]
......
...@@ -55,6 +55,8 @@ namespace LOFAR { ...@@ -55,6 +55,8 @@ namespace LOFAR {
PyParameterValue (const ParameterValue& pvalue) PyParameterValue (const ParameterValue& pvalue)
: ParameterValue (pvalue) : ParameterValue (pvalue)
{} {}
PyParameterValue expand() const
{ return ParameterValue::expand(); }
vector<PyParameterValue> getVector() const vector<PyParameterValue> getVector() const
{ return convertPVVector (ParameterValue::getVector()); } { return convertPVVector (ParameterValue::getVector()); }
PyParameterSet getRecord() const; PyParameterSet getRecord() const;
...@@ -181,7 +183,7 @@ namespace LOFAR { ...@@ -181,7 +183,7 @@ namespace LOFAR {
.def ("get", &ParameterValue::get, .def ("get", &ParameterValue::get,
return_value_policy < copy_const_reference> (), return_value_policy < copy_const_reference> (),
"Get the original value.") "Get the original value.")
.def ("expand", &ParameterValue::expand, .def ("_expand", &PyParameterValue::expand,
"Expand possible range and repeat values (using .. and *)") "Expand possible range and repeat values (using .. and *)")
.def ("isVector", &ParameterValue::isVector, .def ("isVector", &ParameterValue::isVector,
"Test if the value contains a vector (if enclosed in [])") "Test if the value contains a vector (if enclosed in [])")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment