A DParameterMapKeyChoice can easily be used to store and update any parameter which can be expressed as a selection from two or more options.
Vector<String> myStrings(2);
myStrings(0) = "Ten";
myStrings(1) = "Twenty";
Vector<Int> myInts(2);
myInts(0) = 10;
myInts(1) = 20;
// ...
DParameterMapKeyChoice mchoice("number", "Choose a number of ...",
"Select the number of ... to use for ...",
myStrings, myInts,
myStrings(0), myStrings(0));
// ...
// update the parameter from some Record (String representation);
mchoice.fromRecord(rec);
// examine the value of the parameter
cerr << "You have selected " << mchoice.value() << " things." << endl;
// ...
itsNumberThings = mchoice.keyValue();
(Required) copy constructor.
Destructor.
(Required) copy assignment.
Return the list of all keys for this parameter.
Return the current value of this parameter.
Thise function has very little implementation, it is here so if a user changes the list of options, we can ensure we do not make a mistake when looking up its corresponding key
Set the current value, based on a key.
Set or change the list of allowed options for this parameter.