Gromacs  2016.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes

#include <gromacs/selection/selectionfileoption.h>

+ Inheritance diagram for gmx::SelectionFileOption:
+ Collaboration diagram for gmx::SelectionFileOption:

Description

Specifies a special option that provides selections from a file.

This option is used internally by the command-line framework to implement file input for selections. The option takes a file name, and reads it in using SelectionOptionManager::parseRequestedFromFile(). This means that selections from the file are assigned to selection options that have been explicitly provided without values earlier on the command line.

Public methods in this class do not throw.

Public Types

typedef SelectionFileOptionInfo InfoType
 OptionInfo subclass corresponding to this option type.
 

Public Member Functions

 SelectionFileOption (const char *name)
 Initializes an option with the given name.
 

Protected Member Functions

void setDescription (const char *descr)
 Sets the description for the option.
 
void setStoreIsSet (bool *store)
 Sets the storage location for whether the option is set.
 
void setFlag (OptionFlag flag)
 Sets a flag for the option.
 
void setFlag (OptionFlag flag, bool bSet)
 Sets or clears a flag for the option.
 
void clearFlag (OptionFlag flag)
 Clears a flag for the option.
 
bool isVector () const
 Returns true if the option is vector-valued.
 
void setVector ()
 Sets the option to be vector-valued. More...
 
void setValueCount (int count)
 Sets the required number of values for the option.
 

Protected Attributes

int minValueCount_
 Minimum number of values required for the option.
 
int maxValueCount_
 Maximum number of values allowed for the option.
 

Member Function Documentation

void gmx::AbstractOption::setVector ( )
inlineprotectedinherited

Sets the option to be vector-valued.

This method is provided for convenience to make management of value counts easier. In order to implement a vector-valued option, the class derived from AbstractOption should expose a method that calls this method, and the storage object derived from AbstractOptionStorage should check isVector(). If only a single value is provided, the storage object should fill the whole vector with that value.

The length of the vector (the value of maxValueCount_) must be fixed. The default length is 3 elements.


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