3 * This source code is part of
7 * GROningen MAchine for Chemical Simulations
9 * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
10 * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
11 * Copyright (c) 2001-2009, The GROMACS development team,
12 * check out http://www.gromacs.org for more information.
14 * This program is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU General Public License
16 * as published by the Free Software Foundation; either version 2
17 * of the License, or (at your option) any later version.
19 * If you want to redistribute modifications, please consider that
20 * scientific software is very special. Version control is crucial -
21 * bugs must be traceable. We will be happy to consider code for
22 * inclusion in the official distribution, but derived work must not
23 * be called official GROMACS. Details are found in the README & COPYING
24 * files - if they are missing, get the official version at www.gromacs.org.
26 * To help us fund GROMACS development, we humbly ask that you cite
27 * the papers on the package - you can find them in the top README file.
29 * For more info, check our website at http://www.gromacs.org
33 * Defines flags used in option implementation.
35 * Symbols in this header are considered an implementation detail, and should
36 * not be accessed outside the module.
37 * Because of details in the implementation, it is still installed.
39 * \author Teemu Murtola <teemu.murtola@cbr.su.se>
40 * \ingroup module_options
42 #ifndef GMX_OPTIONS_OPTIONFLAGS_H
43 #define GMX_OPTIONS_OPTIONFLAGS_H
45 #include "../utility/flags.h"
51 /*! \libinternal \brief
54 * These flags are not part of the public interface, even though they are in an
55 * installed header. They are needed in a few template class implementations.
58 * The flags related to default values are confusing, consider reorganizing
63 //! %Option has been set.
65 //! The current value of the option is a programmatic default value.
66 efOption_HasDefaultValue = 1<<1,
67 //! An explicit default value has been provided for the option.
68 efOption_ExplicitDefaultValue = 1<<2,
70 * Next assignment to the option clears old values.
72 * This flag is set when a new option source starts, such that values
73 * from the new source will overwrite old ones.
75 efOption_ClearOnNextSet = 1<<3,
76 //! %Option is required to be set.
77 efOption_Required = 1<<4,
78 //! %Option can be specified multiple times.
79 efOption_MultipleTimes = 1<<5,
80 //! %Option is hidden from standard help.
81 efOption_Hidden = 1<<6,
83 * %Option value is a vector, but a single value is also accepted.
85 * \see AbstractOption::setVector()
87 efOption_Vector = 1<<8,
88 //! %Option does not support default values.
89 efOption_NoDefaultValue = 1<<9,
91 * Storage object does its custom checking for minimum value count.
93 * If this flag is set, the class derived from OptionStorageTemplate should
94 * implement processSetValues(), processAll(), and possible other functions
95 * it provides such that it always fails if not enough values are provided.
96 * This is useful to override the default check, which is done in
97 * OptionStorageTemplate::processSet().
99 efOption_DontCheckMinimumCount = 1<<10
102 //! \libinternal Holds a combination of ::OptionFlag values.
103 typedef FlagsTemplate<OptionFlag> OptionFlags;