#include <gromacs/options/basicoptions.h>
Wrapper class for accessing string option information.
|
| StringOptionInfo (StringOptionStorage *option) |
| Creates an option info object for the given option.
|
|
bool | isEnumerated () const |
| Whether this option accepts an enumerated set of values. More...
|
|
const std::vector< std::string > & | allowedValues () const |
| Returns the set of allowed values for this option. More...
|
|
template<class InfoType > |
bool | isType () const |
| Test whether the option is of a particular type. More...
|
|
template<class InfoType > |
InfoType * | toType () |
| Convert the info object to a particular type if the type is correct. More...
|
|
template<class InfoType > |
const InfoType * | toType () const |
| Convert the info object to a particular type if the type is correct. More...
|
|
bool | isSet () const |
| Returns true if the option has been set.
|
|
bool | isHidden () const |
| Returns true if the option is a hidden option.
|
|
bool | isRequired () const |
| Returns true if the option is required.
|
|
int | minValueCount () const |
| Returns the minimum number of values that this option accepts.
|
|
int | maxValueCount () const |
| Returns the maximum number of values that this option accepts.
|
|
const std::string & | name () const |
| Returns the name of the option.
|
|
std::string | type () const |
| Returns the type of the option as a string.
|
|
std::string | formatDescription () const |
| Returns the description of the option.
|
|
std::string | formatDefaultValueIfSet () const |
| Returns the default value if set for the option as a string. More...
|
|
int | valueCount () const |
| Returns the number of values given for the option.
|
|
std::string | formatValue (int i) const |
| Returns the i'th value of the option as a string.
|
|
const std::vector< std::string > & gmx::StringOptionInfo::allowedValues |
( |
| ) |
const |
Returns the set of allowed values for this option.
Returns an empty vector if isEnumerated() returns false.
std::string gmx::OptionInfo::formatDefaultValueIfSet |
( |
| ) |
const |
|
inherited |
bool gmx::StringOptionInfo::isEnumerated |
( |
| ) |
const |
Whether this option accepts an enumerated set of values.
Returns true if StringOption::enumValues() was used when creating this option.
template<class InfoType >
bool gmx::OptionInfo::isType |
( |
| ) |
const |
|
inlineinherited |
Test whether the option is of a particular type.
- Template Parameters
-
InfoType | Option type to test for. Should be a class derived from OptionInfo. |
template<class InfoType >
InfoType* gmx::OptionInfo::toType |
( |
| ) |
|
|
inlineinherited |
Convert the info object to a particular type if the type is correct.
- Template Parameters
-
InfoType | Option type to convert to. Should be a class derived from OptionInfo. |
- Return values
-
this | converted to a pointer to InfoType , or NULL if the conversion is not possible. |
template<class InfoType >
const InfoType* gmx::OptionInfo::toType |
( |
| ) |
const |
|
inlineinherited |
Convert the info object to a particular type if the type is correct.
- Template Parameters
-
InfoType | Option type to convert to. Should be a class derived from OptionInfo. |
- Return values
-
this | converted to a pointer to InfoType , or NULL if the conversion is not possible. |
The documentation for this class was generated from the following files:
- src/gromacs/options/basicoptions.h
- src/gromacs/options/basicoptions.cpp