timeSelector: Rename option zeroTime -> withZero for consistency with the noZero option

This commit is contained in:
Henry
2015-04-25 15:12:08 +01:00
parent dcdc7a2265
commit 82c0cc5312
5 changed files with 21 additions and 21 deletions

View File

@ -113,7 +113,7 @@ void Foam::timeSelector::inplaceSelect(instantList& Times) const
void Foam::timeSelector::addOptions
(
const bool constant,
const bool zeroTime
const bool withZero
)
{
if (constant)
@ -124,11 +124,11 @@ void Foam::timeSelector::addOptions
"include the 'constant/' dir in the times list"
);
}
if (zeroTime)
if (withZero)
{
argList::addBoolOption
(
"zeroTime",
"withZero",
"include the '0/' dir in the times list"
);
}
@ -136,7 +136,7 @@ void Foam::timeSelector::addOptions
(
"noZero",
"exclude the '0/' dir from the times list, "
"has precedence over the -zeroTime option"
"has precedence over the -withZero option"
);
argList::addBoolOption
(
@ -228,10 +228,10 @@ Foam::List<Foam::instant> Foam::timeSelector::select
// Exclude 0/ if specifically requested
selectTimes[zeroIdx] = false;
}
else if (argList::validOptions.found("zeroTime"))
else if (argList::validOptions.found("withZero"))
{
// With -zeroTime enabled, drop 0/ unless specifically requested
selectTimes[zeroIdx] = args.optionFound("zeroTime");
// With -withZero enabled, drop 0/ unless specifically requested
selectTimes[zeroIdx] = args.optionFound("withZero");
}
}
@ -284,7 +284,7 @@ Foam::List<Foam::instant> Foam::timeSelector::selectIfPresent
|| args.optionFound("time")
|| args.optionFound("constant")
|| args.optionFound("noZero")
|| args.optionFound("zeroTime")
|| args.optionFound("withZero")
)
{
return select0(runTime, args);

View File

@ -59,7 +59,7 @@ Description
\endverbatim
The first argument avoids adding the \b -constant option. The second
argument adds an additional \b -zeroTime option and also prevents the
argument adds an additional \b -withZero option and also prevents the
\c 0/ directory from being included in the default time range and in the
\b -latestTime selection.
@ -122,16 +122,16 @@ public:
// \param constant
// Add the \b -constant option to include the \c constant/ directory
//
// \param zeroTime
// Enable the \b -zeroTime option and alter the normal time selection
// \param withZero
// Enable the \b -withZero option and alter the normal time selection
// behaviour (and \b -latestTime behaviour) to exclude the \c 0/
// directory. The \c 0/ directory will only be included when
// \b -zeroTime is specified.
// The \b -noZero option has precedence over the @b -zeroTime option.
// \b -withZero is specified.
// The \b -noZero option has precedence over the @b -withZero option.
static void addOptions
(
const bool constant=true,
const bool zeroTime=false
const bool withZero=false
);
//- Return the set of times selected based on the argList options