Gromacs  2016.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
List of all members | Public Types | Public Member Functions
gmx::FileNameOptionInfo Class Reference

#include <gromacs/options/filenameoption.h>

+ Inheritance diagram for gmx::FileNameOptionInfo:
+ Collaboration diagram for gmx::FileNameOptionInfo:

Description

Wrapper class for accessing file name option information.

Public Types

typedef std::vector< const char * > ExtensionList
 Shorthand for a list of extensions.
 

Public Member Functions

 FileNameOptionInfo (FileNameOptionStorage *option)
 Creates an option info object for the given option.
 
bool isInputFile () const
 Whether the option specifies an input file.
 
bool isOutputFile () const
 Whether the option specifies an output file.
 
bool isInputOutputFile () const
 Whether the option specifies a file used for both input and output.
 
bool isLibraryFile () const
 Whether the option specifies a library file. More...
 
bool allowMissing () const
 Whether the (input) option allows missing files to be provided.
 
bool isDirectoryOption () const
 Whether the option specifies directories.
 
bool isTrajectoryOption () const
 Whether the option specifies a generic trajectory file.
 
const char * defaultExtension () const
 Returns the default extension for this option.
 
ExtensionList extensions () const
 Returns the list of extensions this option accepts.
 
bool isValidType (int fileType) const
 Returns whether fileType (from filetypes.h) is accepted for this option.
 
ConstArrayRef< int > fileTypes () const
 Returns the list of file types this option accepts.
 
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.
 

Member Function Documentation

std::string gmx::OptionInfo::formatDefaultValueIfSet ( ) const
inherited

Returns the default value if set for the option as a string.

See Also
OptionTemplate::defaultValueIfSet()
bool gmx::FileNameOptionInfo::isLibraryFile ( ) const

Whether the option specifies a library file.

See Also
FileNameOption::libraryFile()
template<class InfoType >
bool gmx::OptionInfo::isType ( ) const
inlineinherited

Test whether the option is of a particular type.

Template Parameters
InfoTypeOption 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
InfoTypeOption type to convert to. Should be a class derived from OptionInfo.
Return values
thisconverted 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
InfoTypeOption type to convert to. Should be a class derived from OptionInfo.
Return values
thisconverted to a pointer to InfoType, or NULL if the conversion is not possible.

The documentation for this class was generated from the following files: