42 key( std::string
const & str )
59 std::cout <<
"[T/F OPT]New TRUE value for [-" << key.
id() <<
']' << std::endl;
62 std::cout <<
"[T/F OPT]Default FALSE value for [-" << key.
id() <<
']' << std::endl;
70 std::string
const & str
74 std::cerr <<
"realafteroption: missing a required argument: " << str << std::endl;
85 std::string
const & str,
86 double const opt_default
97 std::string
const & str,
98 double const opt_default,
109 double const opt_default,
116 std::cout <<
"[REAL OPT]New value for [-" << key.
id() <<
"] " <<
SS( rnum ) << std::endl;
119 std::cout <<
"[REAL OPT]Default value for [-" << key.
id() <<
"] " <<
SS( rnum ) << std::endl;
126 std::string
const & str,
127 double const default1,
129 double const default2,
140 double const default1,
142 double const default2,
149 if ( opt.
size() < 2 ) {
150 std::cerr <<
"real2afteroption: option specified with < 2 values: -" << key.
id() << std::endl;
155 std::cout <<
"[REAL OPT]New values for [-" << key.
id() <<
"] " <<
SS( rnum1 ) <<
SS( rnum2 ) << std::endl;
159 std::cout <<
"[REAL OPT]Default value for [-" << key.
id() <<
"] " <<
SS( rnum1 ) <<
SS( rnum2 ) << std::endl;
166 std::string
const & str,
167 double const default1,
169 double const default2,
171 double const default3,
182 double const default1,
184 double const default2,
186 double const default3,
193 if ( opt.
size() < 3 ) {
194 std::cerr <<
"real3afteroption: option specified with < 3 values: -" << key.
id() << std::endl;
200 std::cout <<
"[REAL OPT]New values for [-" << key.
id() <<
"] " <<
SS( rnum1 ) <<
SS( rnum2 ) <<
SS( rnum3 ) << std::endl;
205 std::cout <<
"[REAL OPT]Default value for [-" << key.
id() <<
"] " <<
SS( rnum1 ) <<
SS( rnum2 ) <<
SS( rnum3 ) << std::endl;
212 std::string
const & str
216 std::cout <<
"intafteroption: missing required arg: " << str << std::endl;
227 std::string
const & str,
228 int const opt_default
239 std::string
const & str,
240 int const opt_default,
251 int const opt_default,
258 std::cout <<
"[INT OPT]New value for [-" << key.
id() <<
"] " <<
SS( inum ) << std::endl;
261 std::cout <<
"[INT OPT]Default value for [-" << key.
id() <<
"] " <<
SS( inum ) << std::endl;
268 std::string
const & str,
269 int const opt_default,
280 int const opt_default,
287 if ( opt.
size() >= 1 ) {
289 std::cout <<
"[INT OPT]New value for [-" << key.
id() <<
"] " <<
SS( inum ) << std::endl;
292 std::cout <<
"[INT OPT]Default value for [-" << key.
id() <<
"] " <<
SS( inum ) << std::endl;
296 std::cout <<
"[INT OPT]Default value for [-" << key.
id() <<
"] " <<
SS( inum ) << std::endl;
303 std::string
const & str,
304 int const opt_default,
306 int const opt_default2,
317 int const opt_default,
319 int const opt_default2,
326 if ( opt.
size() < 2 ) {
327 std::cerr <<
"int2afteroption: option specified with < 2 values: -" << key.
id() << std::endl;
332 std::cout <<
"[INT OPT]New values for [-" << key.
id() <<
"] " <<
SS( inum ) <<
SS( inum2 ) << std::endl;
335 inum2 = opt_default2;
336 std::cout <<
"[INT OPT]Default values for [-" << key.
id() <<
"] " <<
SS( inum ) <<
SS( inum2 ) << std::endl;
345 std::string
const & str
349 std::cout <<
"STOP:: stringafteroption: missing a required argument: " << str << std::endl;
360 std::string
const & str,
361 std::string
const & opt_default
372 std::string
const & str,
373 std::string
const & opt_default,
384 std::string
const & opt_default,
390 std::cout <<
"[STR OPT]New value for [-" << key.
id() <<
"] " << cval <<
'.' << std::endl;
393 std::cout <<
"[STR OPT]Default value for [-" << key.
id() <<
"] " << cval <<
'.' << std::endl;
400 std::string
const & str,
401 char const opt_default,
412 char const opt_default,
418 cval = ( opt().length() > 0 ? opt()[ 0 ] :
' ' );
419 std::cout <<
"[STR OPT]New value for [-" << key.
id() <<
"] " << cval <<
'.' << std::endl;
422 std::cout <<
"[STR OPT]Default value for [-" << key.
id() <<
"] " << cval <<
'.' << std::endl;
ocstream cerr(std::cerr)
Wrapper around std::cerr.
Program real option class.
Program integer vector option class.
std::string stringafteroption(std::string const &str)
BooleanOptionKey const user("options:user")
Program string option class.
Program vector-valued option abstract base class.
Abstract automatic hidden index key for options.
Program scalar-valued option abstract base class.
Key lookup map and collection and functors.
utility::options::OptionKey OptionKey
Program option interface class.
OptionKey const & key(std::string const &str)
Get key for an option name.
static std::string find_key_cl(std::string const &key_string, std::string const &cid, bool const top)
Find a user-specified option key in a command line context.
void real3afteroption(std::string const &str, double const default1, double &rnum1, double const default2, double &rnum2, double const default3, double &rnum3)
Program exit functions and macros.
basic::options::OptionKeys collection
#define utility_exit()
Macro function wrappers for utility::exit.
rule< Scanner, options_closure::context_t > options
BooleanOption const & option(BooleanOptionKey const &key) const
Option by BooleanOptionKey.
utility::options::OptionCollection option
OptionCollection global.
Program real option class.
Program string option class.
Option lookup functions emulating Rosetta++ equivalents for transitional use.
Program real vector option class.
int intafteroption(std::string const &str)
void optional_positive_intafteroption(std::string const &str, int const opt_default, int &inum)
Program integer option class.
double realafteroption(std::string const &str)
ocstream cout(std::cout)
Wrapper around std::cout.
bool truefalseoption(std::string const &str)
Program integer option class.
Program options global and initialization function.
void real2afteroption(std::string const &str, double const default1, double &rnum1, double const default2, double &rnum2)
Automatic hidden index key abstract base class.
void int2afteroption(std::string const &str, int const opt_default, int &inum, int const opt_default2, int &inum2)
std::string const & id() const
ID.
Size size() const
Size (number of values)