*/
CommandLineHelpWriter::Impl::Impl(const Options &options)
- : options_(options)
+ : options_(options), bShowDescriptions_(false), bShowHidden_(false)
{
}
bool isBoolean() const;
//! Returns true if the option is a hidden option.
bool isHidden() const { return hasFlag(efHidden); }
+ //! Returns true if the option is required.
+ bool isRequired() const { return hasFlag(efRequired); }
//! Returns the name of the option.
const std::string &name() const { return _name; }
//! Returns the description of the option.
bool isSet() const;
//! Returns true if the option is a hidden option.
bool isHidden() const;
+ //! Returns true if the option is required.
+ bool isRequired() const;
//! Returns the name of the option.
const std::string &name() const;
//! Returns the description of the option.
// TODO: This is a bit hairy, as it indirectly calls a virtual function.
commitValues();
}
- else if (_ownedValues.get() == NULL && _store != NULL)
+ else if (_ownedValues.get() != NULL && _store != NULL)
{
_values->clear();
int count = (settings.isVector() ?
return _option.isHidden();
}
+bool OptionInfo::isRequired() const
+{
+ return _option.isRequired();
+}
+
const std::string &OptionInfo::name() const
{
return _option.name();
void SelectionOptionStorage::processAll()
{
- if ((hasFlag(efRequired) || hasFlag(efSet)) && valueCount() == 0)
+ if ((isRequired() || isSet()) && valueCount() == 0)
{
GMX_RELEASE_ASSERT(_sc != NULL, "Selection collection is not set");