Other than this, all parameters share these common elements:
DisplayParameter makes use of the
Derived classes should also add utility functions which return the
various aspects of the DisplayParameter to the programmer. Most
importantly, a value() function should be provided to
enable the user to easily retrieve the current value of the
parameter.
Parse record, and update this parameter if a field
exists whose name matches that of this parameter. Return
True if the parameter is changed, otherwise return
False.
Place a record describing this parameter in a sub-field of
record with name matching that of this parameter. If
overwrite is True, then any existing field
with matching name will be overwritten. If fullrecord
is True, then a complete description of the parameter
is given, otherwise just its current value is stored in
record.
Return the name of this parameter.
Return the description of this parameter.
Return the help for this parameter.
Return the context of this parameter.
Return whether this parameter can be unset.
Return whether this parameter is editable.
Set or change the name of this parameter to that specified.
Set or change the description of this parameter to what is
specified.
Set or change the help for this parameter to what is specified.
Set or change the context of this parameter to what is specified.
Set or change whether this parameter may be unset, according to
the function argument value.
Set or change whether this parameter is editable according to
the function argument.
Copy constructor using copy semantics.
Default constructor yielding a useless DisplayParameter.
Copy assignment.
Return a basic description of this parameter; used by virtual
implementations of toRecord method to fill out
a Record describing this DisplayParameter.
Return the DisplayOptions to use for parsing Records.
Motivation
To avoid littering many of the display classes with code fragments
for constructing and parsing Records.
Thrown Exceptions
To Do
Member Description
virtual ~DisplayParameter()
Destructor.
virtual Bool fromRecord(const RecordInterface &record) = 0
virtual void toRecord(RecordInterface &record, const Bool fullrecord = True, const Bool overwrite = False) = 0
String name() const
String description() const
String help() const
String context() const
Bool allowUnset() const
Bool editable() const
void setName(const String name)
void setDescription(const String description)
void setHelp(const String help)
void setContext(const String context)
void setAllowUnset(const Bool allowunset)
void setEditable(const Bool editable)
DisplayParameter(const String name, const String description, const String help, const String context = "", const Bool allowunset = False, const Bool editable = True)
Constructor taking the name of the parameter, a short
description, some help text, and flags indicating whether the
parameter can be unset and is editable.
DisplayParameter(const DisplayParameter &other)
DisplayParameter()
DisplayParameter &operator=(const DisplayParameter &other)
Record baseDescription()
const DisplayOptions &displayOptions() const