The virtual base of pecotmr's *Param() records –
CredibleSetParam, SusieRssParam,
PanelFilterParam and the rest. Each one holds settings
pecotmr itself reads, declared as typed slots and checked when
the record is built.
This is the counterpart to MethodOptions, which carries
arguments bound for an external engine. The distinction is
deliberate and visible in the name: a *Param() is a pecotmr
setting whose meaning and type pecotmr defines, so pecotmr validates it;
a *Options() is somebody else's argument list, so pecotmr checks
only that each name exists in that engine's live formals and otherwise
does not attempt to mirror its semantics.
Value
$ returns that setting's value, NULL when it is
unset.
[[ returns that setting's value.
names returns the settings that are set.
length returns how many settings are set.
as.list returns the settings that are set, as a named list.
show is called for its side effect and returns
invisible(NULL).
List interface
A MethodParam reads like a list: $ and [[ fetch a
field, and names(), length() and as.list() describe
it.
Those last three report only the fields that are set. A slot
holding NULL is absent from all three, while $ and
[[ still return NULL for it. This is not cosmetic:
as.list() on one of these records is spliced into an engine call,
and an engine that distinguishes an explicit NULL argument from an
omitted one would otherwise see a different call.
Unlike a list, $ on a name that is not a field is an error rather
than NULL. Silently reading a misspelled setting as "unset" is the
failure these classes exist to prevent.