/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2010,2011,2012,2013, by the GROMACS development team, led by
- * David van der Spoel, Berk Hess, Erik Lindahl, and including many
- * others, as listed in the AUTHORS file in the top-level source
- * directory and at http://www.gromacs.org.
+ * Copyright (c) 2010,2011,2012,2013,2014, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
*
* GROMACS is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* \author Teemu Murtola <teemu.murtola@gmail.com>
* \ingroup module_options
*/
-#include "gromacs/options/abstractoption.h"
+#include "gmxpre.h"
+
+#include "abstractoption.h"
#include "gromacs/options/abstractoptionstorage.h"
#include "gromacs/options/optionflags.h"
return option().isRequired();
}
+int OptionInfo::minValueCount() const
+{
+ if (option().defaultValueIfSetExists())
+ {
+ return 0;
+ }
+ return option().minValueCount();
+}
+
+int OptionInfo::maxValueCount() const
+{
+ return option().maxValueCount();
+}
+
const std::string &OptionInfo::name() const
{
return option().name();
}
-const std::string &OptionInfo::description() const
+std::string OptionInfo::type() const
{
- return option().description();
+ return option().typeString();
}
-const char *OptionInfo::type() const
+std::string OptionInfo::formatDescription() const
{
- return option().typeString();
+ std::string description(option().description());
+ std::string extraDescription(option().formatExtraDescription());
+ if (!extraDescription.empty())
+ {
+ description.append(extraDescription);
+ }
+ return description;
+}
+
+std::string OptionInfo::formatDefaultValueIfSet() const
+{
+ return option().formatDefaultValueIfSet();
}
int OptionInfo::valueCount() const
return option().formatValue(i);
}
-std::string OptionInfo::formatDefaultValueIfSet() const
-{
- return option().formatDefaultValueIfSet();
-}
-
} // namespace gmx