Fixing Boolean CLI parameters

closes #3464

- Explicitly set Boolean CLI types to true if they are presenet
- Simplify logic where these parameters are used
No you don't have to, that's what I'm saying.  The isParamValid() call can
tell you if it's valid (present) if you don't set a default. Otherwise, you
can set a default (most likely false) and then safely retrieve the value of
the bool without verifying that it is in fact valid.  If you really have an
issue with how you could ever explicitly set it false, then go ahead and
suggest another design. I decided to opt out of over-designing by creating
a specialized type because we'd probably end up getting a mix of the new
type and Booleans over time which is arguably worse.  Also, I'd have to add
another specialization to InputParameters.  As it is now with Booleans it
really is clean and natural and matches the file parsing routines.

Sent from my iPhone

On Aug 6, 2014, at 5:27 PM, Derek Gaston <notifications@github.com> wrote:

In framework/src/base/MooseApp.C:

>
>    params.addCommandLineParam<std::string>("dump", "--dump [search_string]", "Shows a dump of available input file syntax.");
>    params.addCommandLineParam<std::string>("yaml", "--yaml", "Dumps input file syntax in YAML format.");
> -  params.addCommandLineParam<bool>("syntax", "--syntax", "Dumps the associated Action syntax paths ONLY");
> +  params.addCommandLineParam<bool>("syntax", "--syntax", false, "Dumps the associated Action syntax paths ONLY");

Are you going to document somewhere that for addCommandLineParam<bool>()
you MUST put false as the default value?

—
Reply to this email directly or view it on GitHub
<https://github.com/idaholab/moose/pull/3655/files#r15910445>.