Sort all includes in src/gromacs
[alexxy/gromacs.git] / src / gromacs / options / optionflags.h
1 /*
2  * This file is part of the GROMACS molecular simulation package.
3  *
4  * Copyright (c) 2010,2011,2012,2014, by the GROMACS development team, led by
5  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
6  * and including many others, as listed in the AUTHORS file in the
7  * top-level source directory and at http://www.gromacs.org.
8  *
9  * GROMACS is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Lesser General Public License
11  * as published by the Free Software Foundation; either version 2.1
12  * of the License, or (at your option) any later version.
13  *
14  * GROMACS is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17  * Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public
20  * License along with GROMACS; if not, see
21  * http://www.gnu.org/licenses, or write to the Free Software Foundation,
22  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
23  *
24  * If you want to redistribute modifications to GROMACS, please
25  * consider that scientific software is very special. Version
26  * control is crucial - bugs must be traceable. We will be happy to
27  * consider code for inclusion in the official distribution, but
28  * derived work must not be called official GROMACS. Details are found
29  * in the README & COPYING files - if they are missing, get the
30  * official version at http://www.gromacs.org.
31  *
32  * To help us fund GROMACS development, we humbly ask that you cite
33  * the research papers on the package. Check out http://www.gromacs.org.
34  */
35 /*! \file
36  * \brief
37  * Defines flags used in option implementation.
38  *
39  * Symbols in this header are considered an implementation detail, and should
40  * not be accessed outside the module.
41  * Because of details in the implementation, it is still installed.
42  *
43  * \author Teemu Murtola <teemu.murtola@gmail.com>
44  * \ingroup module_options
45  */
46 #ifndef GMX_OPTIONS_OPTIONFLAGS_H
47 #define GMX_OPTIONS_OPTIONFLAGS_H
48
49 #include "gromacs/utility/flags.h"
50
51 namespace gmx
52 {
53
54 /*! \cond libapi */
55 /*! \libinternal \brief
56  * Flags for options.
57  *
58  * These flags are not part of the public interface, even though they are in an
59  * installed header.  They are needed in a few template class implementations.
60  *
61  * \todo
62  * The flags related to default values are confusing, consider reorganizing
63  * them.
64  */
65 enum OptionFlag
66 {
67     //! %Option has been set.
68     efOption_Set                        = 1<<0,
69     //! The current value of the option is a programmatic default value.
70     efOption_HasDefaultValue            = 1<<1,
71     //! An explicit default value has been provided for the option.
72     efOption_ExplicitDefaultValue       = 1<<2,
73     /*! \brief
74      * Next assignment to the option clears old values.
75      *
76      * This flag is set when a new option source starts, such that values
77      * from the new source will overwrite old ones.
78      */
79     efOption_ClearOnNextSet             = 1<<3,
80     //! %Option is required to be set.
81     efOption_Required                   = 1<<4,
82     //! %Option can be specified multiple times.
83     efOption_MultipleTimes              = 1<<5,
84     //! %Option is hidden from standard help.
85     efOption_Hidden                     = 1<<6,
86     /*! \brief
87      * %Option value is a vector, but a single value is also accepted.
88      *
89      * \see AbstractOption::setVector()
90      */
91     efOption_Vector                     = 1<<8,
92     //! %Option has a defaultValueIfSet() specified.
93     efOption_DefaultValueIfSetExists    = 1<<11,
94     //! %Option does not support default values.
95     efOption_NoDefaultValue             = 1<<9,
96     /*! \brief
97      * Storage object does its custom checking for minimum value count.
98      *
99      * If this flag is set, the class derived from OptionStorageTemplate should
100      * implement processSetValues(), processAll(), and possible other functions
101      * it provides such that it always fails if not enough values are provided.
102      * This is useful to override the default check, which is done in
103      * OptionStorageTemplate::processSet().
104      */
105     efOption_DontCheckMinimumCount      = 1<<10
106 };
107
108 //! \libinternal Holds a combination of ::OptionFlag values.
109 typedef FlagsTemplate<OptionFlag> OptionFlags;
110 //! \endcond
111
112 } // namespace gmx
113
114 #endif