Rosetta  2020.46
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Macros
option_macros.hh File Reference

macros to define options on a per-application basis at the top of app files (those with main) More...

#include <basic/options/option.hh>
#include <basic/options/keys/OptionKeys.hh>
#include <basic/options/after_opts.hh>
#include <platform/types.hh>
#include <utility/Bound.fwd.hh>
#include <utility/down_cast.hh>
#include <utility/exit.hh>
#include <utility/vector1.fwd.hh>
#include <utility/vectorL.fwd.hh>
#include <utility/file/FileName.fwd.hh>
#include <utility/file/PathName.fwd.hh>
#include <utility/keys/AutoKey.fwd.hh>
#include <utility/keys/Key.fwd.hh>
#include <utility/keys/KeyLess.fwd.hh>
#include <utility/keys/KeyLookup.fwd.hh>
#include <utility/keys/NoClient.fwd.hh>
#include <utility/keys/SmallKeyVector.fwd.hh>
#include <utility/keys/UserKey.fwd.hh>
#include <utility/keys/VariantKey.fwd.hh>
#include <utility/options/AnyOption.fwd.hh>
#include <utility/options/AnyVectorOption.fwd.hh>
#include <utility/options/BooleanOption.fwd.hh>
#include <utility/options/BooleanVectorOption.fwd.hh>
#include <utility/options/FileOption.fwd.hh>
#include <utility/options/FileVectorOption.fwd.hh>
#include <utility/options/IntegerOption.fwd.hh>
#include <utility/options/IntegerVectorOption.fwd.hh>
#include <utility/options/Option.fwd.hh>
#include <utility/options/OptionCollection.fwd.hh>
#include <utility/options/PathOption.fwd.hh>
#include <utility/options/PathVectorOption.fwd.hh>
#include <utility/options/RealOption.fwd.hh>
#include <utility/options/RealVectorOption.fwd.hh>
#include <utility/options/ScalarOption.fwd.hh>
#include <utility/options/ScalarOption_T_.fwd.hh>
#include <utility/options/StringOption.fwd.hh>
#include <utility/options/StringVectorOption.fwd.hh>
#include <utility/options/VariantOption.fwd.hh>
#include <utility/options/VectorOption.fwd.hh>
#include <utility/options/VectorOption_T_.fwd.hh>
#include <utility/options/mpi_stderr.hh>
#include <utility/options/keys/AnyOptionKey.fwd.hh>
#include <utility/options/keys/AnyVectorOptionKey.fwd.hh>
#include <utility/options/keys/BooleanOptionKey.fwd.hh>
#include <utility/options/keys/BooleanVectorOptionKey.fwd.hh>
#include <utility/options/keys/FileOptionKey.fwd.hh>
#include <utility/options/keys/FileVectorOptionKey.fwd.hh>
#include <utility/options/keys/IntegerOptionKey.fwd.hh>
#include <utility/options/keys/IntegerVectorOptionKey.fwd.hh>
#include <utility/options/keys/OptionKey.fwd.hh>
#include <utility/options/keys/PathOptionKey.fwd.hh>
#include <utility/options/keys/PathVectorOptionKey.fwd.hh>
#include <utility/options/keys/RealOptionKey.fwd.hh>
#include <utility/options/keys/RealVectorOptionKey.fwd.hh>
#include <utility/options/keys/ScalarOptionKey.fwd.hh>
#include <utility/options/keys/StringOptionKey.fwd.hh>
#include <utility/options/keys/StringVectorOptionKey.fwd.hh>
#include <utility/options/keys/VectorOptionKey.fwd.hh>
#include <algorithm>
#include <cassert>
#include <cstddef>
#include <cstdlib>
#include <iosfwd>
#include <list>
#include <map>
#include <set>
#include <string>
#include <utility>
#include <vector>

Macros

#define OPT(akey)   basic::options::option.add_relevant( basic::options::OptionKeys::akey )
 
#define NEW_OPT(akey, help, adef)
 
#define NEW_OPT2(akey, help, adef, adef2)
 
#define NEW_OPT3(akey, help, adef, adef2, adef3)
 
#define NEW_OPT4(akey, help, adef, adef2, adef3, adef4)
 
#define NEW_OPT5(akey, help, adef, adef2, adef3, adef4, adef5)
 
#define NEW_OPT6(akey, help, adef, adef2, adef3, adef4, adef5, adef6)
 
#define NEW_OPT7(akey, help, adef, adef2, adef3, adef4, adef5, adef6, adef7)
 
#define NEW_OPT8(akey, help, adef, adef2, adef3, adef4, adef5, adef6, adef7, adef8)
 
#define NEW_OPT9(akey, help, adef, adef2, adef3, adef4, adef5, adef6, adef7, adef8, adef9)
 
#define NEW_OPT10(akey, help, adef, adef2, adef3, adef4, adef5, adef6, adef7, adef8, adef9, adef10)
 
#define OPT_KEY(type, key)
 
#define OPT_1GRP_KEY(type, grp, key)
 
#define OPT_2GRP_KEY(type, grp1, grp2, key)
 
#define OPT_3GRP_KEY(type, grp1, grp2, grp3, key)
 
#define EXTERN_OPT_KEY(type, key)
 
#define EXTERN_OPT_1GRP_KEY(type, grp, key)
 
#define EXTERN_OPT_2GRP_KEY(type, grp1, grp2, key)
 
#define EXTERN_OPT_3GRP_KEY(type, grp1, grp2, grp3, key)
 

Detailed Description

macros to define options on a per-application basis at the top of app files (those with main)

macros to define options on a per-application basis at the top of app files (those with main). Used in place of putting the options in the option system proper for single-use / silly / testing stuff

Author
Oliver Lange

Macro Definition Documentation

#define EXTERN_OPT_1GRP_KEY (   type,
  grp,
  key 
)
Value:
namespace basic { namespace options { namespace OptionKeys { namespace grp { \
}}}}
string type
Definition: DRRAFTER.py:977
utility::options::OptionKey OptionKey
Definition: after_opts.hh:35
OptionKey const & key(std::string const &str)
Get key for an option name.
Definition: after_opts.cc:42
rule< Scanner, options_closure::context_t > options
Definition: Tag.cc:612
#define EXTERN_OPT_2GRP_KEY (   type,
  grp1,
  grp2,
  key 
)
Value:
namespace basic { namespace options { namespace OptionKeys { namespace grp1 { namespace grp2 { \
}}}}}
string type
Definition: DRRAFTER.py:977
utility::options::OptionKey OptionKey
Definition: after_opts.hh:35
OptionKey const & key(std::string const &str)
Get key for an option name.
Definition: after_opts.cc:42
rule< Scanner, options_closure::context_t > options
Definition: Tag.cc:612
#define EXTERN_OPT_3GRP_KEY (   type,
  grp1,
  grp2,
  grp3,
  key 
)
Value:
namespace basic { namespace options { namespace OptionKeys { namespace grp1 { namespace grp2 { namespace grp3 { \
}}}}}}
string type
Definition: DRRAFTER.py:977
utility::options::OptionKey OptionKey
Definition: after_opts.hh:35
OptionKey const & key(std::string const &str)
Get key for an option name.
Definition: after_opts.cc:42
rule< Scanner, options_closure::context_t > options
Definition: Tag.cc:612
#define EXTERN_OPT_KEY (   type,
  key 
)
Value:
namespace basic { namespace options { namespace OptionKeys { \
}}}
string type
Definition: DRRAFTER.py:977
utility::options::OptionKey OptionKey
Definition: after_opts.hh:35
OptionKey const & key(std::string const &str)
Get key for an option name.
Definition: after_opts.cc:42
rule< Scanner, options_closure::context_t > options
Definition: Tag.cc:612
#define NEW_OPT (   akey,
  help,
  adef 
)
Value:
basic::options::option.add( basic::options::OptionKeys::akey , help ).def( adef ); \
OPT( akey )
string help
Definition: DRRAFTER.py:973
virtual ScalarOption_T_ & def(Value const &value_a)
Default value assignment.
Definition: ScalarOption_T_.hh:377
BooleanOption & add(BooleanOptionKey const &key, std::string const &description)
Add a BooleanOption.
Definition: OptionCollection.hh:146
utility::options::OptionCollection option
OptionCollection global.
Definition: option.cc:47
#define OPT(akey)
Definition: option_macros.hh:147

Referenced by main(), and register_options().

#define NEW_OPT10 (   akey,
  help,
  adef,
  adef2,
  adef3,
  adef4,
  adef5,
  adef6,
  adef7,
  adef8,
  adef9,
  adef10 
)
Value:
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); \
OPT( akey )
string help
Definition: DRRAFTER.py:973
virtual ScalarOption_T_ & def(Value const &value_a)
Default value assignment.
Definition: ScalarOption_T_.hh:377
BooleanOption & add(BooleanOptionKey const &key, std::string const &description)
Add a BooleanOption.
Definition: OptionCollection.hh:146
utility::options::OptionCollection option
OptionCollection global.
Definition: option.cc:47
#define OPT(akey)
Definition: option_macros.hh:147
#define NEW_OPT2 (   akey,
  help,
  adef,
  adef2 
)
Value:
basic::options::option.add( basic::options::OptionKeys::akey , help ).def( adef ).def( adef2 ); \
OPT( akey )
string help
Definition: DRRAFTER.py:973
virtual ScalarOption_T_ & def(Value const &value_a)
Default value assignment.
Definition: ScalarOption_T_.hh:377
BooleanOption & add(BooleanOptionKey const &key, std::string const &description)
Add a BooleanOption.
Definition: OptionCollection.hh:146
utility::options::OptionCollection option
OptionCollection global.
Definition: option.cc:47
#define OPT(akey)
Definition: option_macros.hh:147
#define NEW_OPT3 (   akey,
  help,
  adef,
  adef2,
  adef3 
)
Value:
basic::options::option.add( basic::options::OptionKeys::akey , help ).def( adef ).def( adef2 ).def(adef3); \
OPT( akey )
string help
Definition: DRRAFTER.py:973
virtual ScalarOption_T_ & def(Value const &value_a)
Default value assignment.
Definition: ScalarOption_T_.hh:377
BooleanOption & add(BooleanOptionKey const &key, std::string const &description)
Add a BooleanOption.
Definition: OptionCollection.hh:146
utility::options::OptionCollection option
OptionCollection global.
Definition: option.cc:47
#define OPT(akey)
Definition: option_macros.hh:147
#define NEW_OPT4 (   akey,
  help,
  adef,
  adef2,
  adef3,
  adef4 
)
Value:
basic::options::option.add( basic::options::OptionKeys::akey , help ).def( adef ).def( adef2 ).def(adef3).def(adef4); \
OPT( akey )
string help
Definition: DRRAFTER.py:973
virtual ScalarOption_T_ & def(Value const &value_a)
Default value assignment.
Definition: ScalarOption_T_.hh:377
BooleanOption & add(BooleanOptionKey const &key, std::string const &description)
Add a BooleanOption.
Definition: OptionCollection.hh:146
utility::options::OptionCollection option
OptionCollection global.
Definition: option.cc:47
#define OPT(akey)
Definition: option_macros.hh:147
#define NEW_OPT5 (   akey,
  help,
  adef,
  adef2,
  adef3,
  adef4,
  adef5 
)
Value:
basic::options::option.add( basic::options::OptionKeys::akey , help ).def( adef ).def( adef2 ).def(adef3).def(adef4).def(adef5); \
OPT( akey )
string help
Definition: DRRAFTER.py:973
virtual ScalarOption_T_ & def(Value const &value_a)
Default value assignment.
Definition: ScalarOption_T_.hh:377
BooleanOption & add(BooleanOptionKey const &key, std::string const &description)
Add a BooleanOption.
Definition: OptionCollection.hh:146
utility::options::OptionCollection option
OptionCollection global.
Definition: option.cc:47
#define OPT(akey)
Definition: option_macros.hh:147
#define NEW_OPT6 (   akey,
  help,
  adef,
  adef2,
  adef3,
  adef4,
  adef5,
  adef6 
)
Value:
basic::options::option.add( basic::options::OptionKeys::akey , help ).def( adef ).def( adef2 ).def(adef3).def(adef4).def(adef5).def(adef6); \
OPT( akey )
string help
Definition: DRRAFTER.py:973
virtual ScalarOption_T_ & def(Value const &value_a)
Default value assignment.
Definition: ScalarOption_T_.hh:377
BooleanOption & add(BooleanOptionKey const &key, std::string const &description)
Add a BooleanOption.
Definition: OptionCollection.hh:146
utility::options::OptionCollection option
OptionCollection global.
Definition: option.cc:47
#define OPT(akey)
Definition: option_macros.hh:147
#define NEW_OPT7 (   akey,
  help,
  adef,
  adef2,
  adef3,
  adef4,
  adef5,
  adef6,
  adef7 
)
Value:
basic::options::option.add( basic::options::OptionKeys::akey , help ).def( adef ).def( adef2 ).def(adef3).def(adef4).def(adef5).def(adef6).def(adef7); \
OPT( akey )
string help
Definition: DRRAFTER.py:973
virtual ScalarOption_T_ & def(Value const &value_a)
Default value assignment.
Definition: ScalarOption_T_.hh:377
BooleanOption & add(BooleanOptionKey const &key, std::string const &description)
Add a BooleanOption.
Definition: OptionCollection.hh:146
utility::options::OptionCollection option
OptionCollection global.
Definition: option.cc:47
#define OPT(akey)
Definition: option_macros.hh:147
#define NEW_OPT8 (   akey,
  help,
  adef,
  adef2,
  adef3,
  adef4,
  adef5,
  adef6,
  adef7,
  adef8 
)
Value:
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); \
OPT( akey )
string help
Definition: DRRAFTER.py:973
virtual ScalarOption_T_ & def(Value const &value_a)
Default value assignment.
Definition: ScalarOption_T_.hh:377
BooleanOption & add(BooleanOptionKey const &key, std::string const &description)
Add a BooleanOption.
Definition: OptionCollection.hh:146
utility::options::OptionCollection option
OptionCollection global.
Definition: option.cc:47
#define OPT(akey)
Definition: option_macros.hh:147
#define NEW_OPT9 (   akey,
  help,
  adef,
  adef2,
  adef3,
  adef4,
  adef5,
  adef6,
  adef7,
  adef8,
  adef9 
)
Value:
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); \
OPT( akey )
string help
Definition: DRRAFTER.py:973
virtual ScalarOption_T_ & def(Value const &value_a)
Default value assignment.
Definition: ScalarOption_T_.hh:377
BooleanOption & add(BooleanOptionKey const &key, std::string const &description)
Add a BooleanOption.
Definition: OptionCollection.hh:146
utility::options::OptionCollection option
OptionCollection global.
Definition: option.cc:47
#define OPT(akey)
Definition: option_macros.hh:147
#define OPT (   akey)    basic::options::option.add_relevant( basic::options::OptionKeys::akey )

Referenced by main(), and register_options().

#define OPT_1GRP_KEY (   type,
  grp,
  key 
)
Value:
namespace basic { namespace options { namespace OptionKeys { namespace grp { \
basic::options::type##OptionKey const key( #grp":"#key ); \
}}}}
string type
Definition: DRRAFTER.py:977
utility::options::OptionKey OptionKey
Definition: after_opts.hh:35
OptionKey const & key(std::string const &str)
Get key for an option name.
Definition: after_opts.cc:42
rule< Scanner, options_closure::context_t > options
Definition: Tag.cc:612
#define OPT_2GRP_KEY (   type,
  grp1,
  grp2,
  key 
)
Value:
namespace basic { namespace options { namespace OptionKeys { namespace grp1 { namespace grp2 { \
basic::options::type##OptionKey const key( #grp1":"#grp2":"#key ); \
}}}}}
string type
Definition: DRRAFTER.py:977
utility::options::OptionKey OptionKey
Definition: after_opts.hh:35
OptionKey const & key(std::string const &str)
Get key for an option name.
Definition: after_opts.cc:42
rule< Scanner, options_closure::context_t > options
Definition: Tag.cc:612
#define OPT_3GRP_KEY (   type,
  grp1,
  grp2,
  grp3,
  key 
)
Value:
namespace basic { namespace options { namespace OptionKeys { namespace grp1 { namespace grp2 { namespace grp3 { \
basic::options::type##OptionKey const key( #grp1":"#grp2":"#grp3":"#key ); \
}}}}}}
string type
Definition: DRRAFTER.py:977
utility::options::OptionKey OptionKey
Definition: after_opts.hh:35
OptionKey const & key(std::string const &str)
Get key for an option name.
Definition: after_opts.cc:42
rule< Scanner, options_closure::context_t > options
Definition: Tag.cc:612
#define OPT_KEY (   type,
  key 
)
Value:
namespace basic { namespace options { namespace OptionKeys { \
}}}
string type
Definition: DRRAFTER.py:977
utility::options::OptionKey OptionKey
Definition: after_opts.hh:35
OptionKey const & key(std::string const &str)
Get key for an option name.
Definition: after_opts.cc:42
rule< Scanner, options_closure::context_t > options
Definition: Tag.cc:612