Rosetta
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
option_macros.hh
Go to the documentation of this file.
1 // -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*-
2 // vi: set ts=2 noet:
3 //
4 // (c) Copyright Rosetta Commons Member Institutions.
5 // (c) This file is part of the Rosetta software suite and is made available under license.
6 // (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
7 // (c) For more information, see http://www.rosettacommons.org. Questions about this can be
8 // (c) addressed to University of Washington UW TechTransfer, email: license@u.washington.edu.
9 
10 /// @file relax_initialization_protocols
11 /// @brief initialization protocols for relax
12 /// @details
13 /// Contains currently: Classic Abinitio
14 ///
15 ///
16 /// @author Oliver Lange
17 
18 #ifndef INCLUDED_basic_options_option_macros_hh
19 #define INCLUDED_basic_options_option_macros_hh
20 
21 #include <basic/options/option.hh>
24 
25 #include <platform/types.hh>
26 #include <utility/Bound.fwd.hh>
27 #include <utility/Bound.hh>
28 #include <utility/down_cast.hh>
29 #include <utility/exit.hh>
30 #include <utility/vector1.fwd.hh>
31 #include <utility/vector1.hh>
32 #include <utility/vector1_bool.hh>
33 #include <utility/vectorL.fwd.hh>
34 #include <utility/vectorL.hh>
36 #include <utility/vectorL_bool.hh>
38 #include <utility/file/FileName.hh>
40 #include <utility/file/PathName.hh>
42 #include <utility/keys/AutoKey.hh>
43 #include <utility/keys/Key.fwd.hh>
44 #include <utility/keys/Key.hh>
49 #include <utility/keys/NoClient.hh>
134 #include <ObjexxFCL/TypeTraits.hh>
137 #include <algorithm>
138 #include <cassert>
139 #include <cstddef>
140 #include <cstdlib>
141 #include <iomanip>
142 #include <iosfwd>
143 #include <iostream>
144 #include <list>
145 #include <map>
146 #include <set>
147 #include <sstream>
148 #include <string>
149 #include <utility>
150 #include <vector>
151 
152 
153 #define OPT(akey) \
154  basic::options::option.add_relevant( basic::options::OptionKeys::akey )
155 
156 #define NEW_OPT(akey,help,adef) \
157  basic::options::option.add( basic::options::OptionKeys::akey , help ).def( adef ); \
158  OPT( akey )
159 
160 // option macros for Vector options with multiple default values...
161 #define NEW_OPT2(akey,help,adef,adef2) \
162  basic::options::option.add( basic::options::OptionKeys::akey , help ).def( adef ).def( adef2 ); \
163  OPT( akey )
164 
165 #define NEW_OPT3(akey,help,adef,adef2,adef3) \
166  basic::options::option.add( basic::options::OptionKeys::akey , help ).def( adef ).def( adef2 ).def(adef3); \
167  OPT( akey )
168 
169 #define NEW_OPT4(akey,help,adef,adef2,adef3,adef4) \
170  basic::options::option.add( basic::options::OptionKeys::akey , help ).def( adef ).def( adef2 ).def(adef3).def(adef4); \
171  OPT( akey )
172 
173 #define NEW_OPT5(akey,help,adef,adef2,adef3,adef4,adef5) \
174  basic::options::option.add( basic::options::OptionKeys::akey , help ).def( adef ).def( adef2 ).def(adef3).def(adef4).def(adef5); \
175  OPT( akey )
176 
177 #define NEW_OPT6(akey,help,adef,adef2,adef3,adef4,adef5,adef6) \
178  basic::options::option.add( basic::options::OptionKeys::akey , help ).def( adef ).def( adef2 ).def(adef3).def(adef4).def(adef5).def(adef6); \
179  OPT( akey )
180 
181 #define NEW_OPT7(akey,help,adef,adef2,adef3,adef4,adef5,adef6,adef7) \
182  basic::options::option.add( basic::options::OptionKeys::akey , help ).def( adef ).def( adef2 ).def(adef3).def(adef4).def(adef5).def(adef6).def(adef7); \
183  OPT( akey )
184 
185 #define NEW_OPT8(akey,help,adef,adef2,adef3,adef4,adef5,adef6,adef7,adef8) \
186  basic::options::option.add( basic::options::OptionKeys::akey , help ).def( adef ).def( adef2 ).def(adef3).def(adef4).def(adef5).def(adef6).def(adef7).def(adef8); \
187  OPT( akey )
188 
189 #define NEW_OPT9(akey,help,adef,adef2,adef3,adef4,adef5,adef6,adef7,adef8,adef9) \
190  basic::options::option.add( basic::options::OptionKeys::akey , help ).def( adef ).def( adef2 ).def(adef3).def(adef4).def(adef5).def(adef6).def(adef7).def(adef8).def(adef9); \
191  OPT( akey )
192 
193 #define NEW_OPT10(akey,help,adef,adef2,adef3,adef4,adef5,adef6,adef7,adef8,adef9,adef10) \
194  basic::options::option.add( basic::options::OptionKeys::akey , help ).def( adef ).def( adef2 ).def(adef3).def(adef4).def(adef5).def(adef6).def(adef7).def(adef8).def(adef9).def(adef10); \
195  OPT( akey )
196 
197 #define OPT_KEY( type, key ) \
198  namespace basic { namespace options { namespace OptionKeys { \
199  basic::options::type##OptionKey const key( #key ); \
200  }}}
201 
202 #define OPT_1GRP_KEY( type, grp, key ) \
203  namespace basic { namespace options { namespace OptionKeys { namespace grp { \
204  basic::options::type##OptionKey const key( #grp":"#key ); \
205  }}}}
206 
207 
208 #define OPT_2GRP_KEY( type, grp1, grp2, key ) \
209  namespace basic { namespace options { namespace OptionKeys { namespace grp1 { namespace grp2 { \
210  basic::options::type##OptionKey const key( #grp1":"#grp2":"#key ); \
211  }}}}}
212 
213 #define OPT_3GRP_KEY( type, grp1, grp2, grp3, key ) \
214  namespace basic { namespace options { namespace OptionKeys { namespace grp1 { namespace grp2 { namespace grp3 { \
215  basic::options::type##OptionKey const key( #grp1":"#grp2":"#grp3":"#key ); \
216  }}}}}}
217 
218 
219 #define EXTERN_OPT_KEY( type, key ) \
220  namespace basic { namespace options { namespace OptionKeys { \
221  extern basic::options::type##OptionKey const key; \
222  }}}
223 
224 #define EXTERN_OPT_1GRP_KEY( type, grp, key ) \
225  namespace basic { namespace options { namespace OptionKeys { namespace grp { \
226  extern basic::options::type##OptionKey const key; \
227  }}}}
228 
229 #define EXTERN_OPT_2GRP_KEY( type, grp1, grp2, key ) \
230  namespace basic { namespace options { namespace OptionKeys { namespace grp1 { namespace grp2 { \
231  extern basic::options::type##OptionKey const key; \
232  }}}}}
233 
234 #define EXTERN_OPT_3GRP_KEY( type, grp1, grp2, grp3, key ) \
235  namespace basic { namespace options { namespace OptionKeys { namespace grp1 { namespace grp2 { namespace grp3 { \
236  extern basic::options::type##OptionKey const key; \
237  }}}}}}
238 
239 
240 #endif
Program file option class.
utility::options::IntegerOption forward declarations
Automatic hidden index key for file options.
Automatic hidden index key for integer options.
Automatic hidden index key for file options.
Program path option class.
Fast polymorphic down-casting functions.
utility::vectorL forward declarations
utility::options::AnyOptionKey forward declarations
Keyed-access vector with key subset map.
utility::options::StringVectorOption forward declarations
utility::options::BooleanOption forward declarations
utility::keys::NoClient forward declarations
utility::file::FileName forward declarations
vector1: std::vector with 1-based indexing: bool specialization
utility::options::OptionKeys collection
utility::options::OptionKey forward declarations
utility::options::RealVectorOptionKey forward declarations
Automatic hidden index key for string options.
utility::options::FileOptionKey forward declarations
Program file vector option class.
utility::options::RealOption forward declarations
Program real option class.
utility::options::IntegerOptionKey forward declarations
Program options collection.
Automatic hidden index key for any vector-valued options.
utility::keys::KeyLookup forward declarations
Program scalar-valued option interface class.
Program string vector option class.
utility::options::PathOptionKey forward declarations
utility::file::PathName forward declarations
Variant option class.
Automatic hidden index key for real options.
Program string option class.
Program vector-valued option abstract base class.
utility::options::BooleanVectorOption forward declarations
utility::keys::SmallKeyVector forward declarations
utility::options::VectorOption forward declarations
Abstract automatic hidden index key for scalar-valued options.
Automatic hidden index key for integer options.
utility::options::ScalarOption forward declarations
Program boolean option class.
Program scalar-valued option abstract base class.
utility::options::PathOption forward declarations
Key lookup map and collection and functors.
Abstract automatic hidden index key for options.
Program option interface class.
Variant key class.
utility::options::FileVectorOptionKey forward declarations
utility::options::FileVectorOption forward declarations
utility::options::AnyVectorOption forward declarations
utility::options::BooleanVectorOptionKey forward declarations
utility::keys::VariantKey forward declarations
utility::options::AnyOption forward declarations
utility::options::StringOption forward declarations
utility::options::Option forward declarations
Automatic hidden index key for boolean options.
Program path vector option class.
Bound value class.
Program any vector-valued option abstract base class.
Abstract automatic hidden index key for vector-valued options.
Program exit functions and macros.
utility::options::ScalarOptionKey forward declarations
basic::options::OptionKeys collection
vectorL: std::vector with L-based indexing
vectorL: std::vector with L-based indexing: bool specialization
Program boolean vector option class.
utility::options::StringVectorOptionKey forward declarations
File name class supporting Windows and UN*X/Linux format names.
utility::keys::KeyLess forward declarations
utility::options::PathVectorOption forward declarations
vectorL lower index selectors
utility::options::VectorOptionKey forward declarations
utility::keys::UserKey forward declarations
Automatic hidden index key for boolean options.
utility::keys::Key forward declarations
Automatic hidden index key for string options.
Program real vector option class.
utility::options::RealOptionKey forward declarations
Option lookup functions emulating Rosetta++ equivalents for transitional use.
utility::Bound forward declarations
utility::options::IntegerVectorOption forward declarations
Program any scalar-valued option abstract base class.
utility::options::BooleanOptionKey forward declarations
Program integer option class.
utility::options::IntegerVectorOptionKey forward declarations
utility::options::FileOption forward declarations
utility::options::StringOptionKey forward declarations
Path name class supporting Windows and UN*X/Linux format names.
utility::options::PathVectorOptionKey forward declarations
vector1: std::vector with 1-based indexing
Program integer vector option class.
utility::options::ScalarOption_T_ forward declarations
utility::options::RealVectorOption forward declarations
Hidden index key interface class.
utility::options::AnyVectorOptionKey forward declarations
utility::options::VariantOption forward declarations
utility::options::VectorOption_T_ forward declarations
Default key policy class when no client is needed to distinguish key type.
Program options global and initialization function.
Program vector-valued option interface class.
Automatic hidden index key abstract base class.
utility::vector1 forward declarations
Automatic hidden index key for real options.
Automatic hidden index key for path options.
utility::options package keys declarations
utility::options::OptionCollection forward declarations
utility::keys::AutoKey forward declarations
Automatic hidden index key for any scalar-valued options.
Automatic hidden index key for path options.