TF++, Miscellaneous classes and modules in C++:

◆ check_index()

void tfxx::cmdline::Commandline::check_index ( const int &  iopt) const
inlineprivate

Check requested index before query.

Definition at line 248 of file commandline.h.

References Mnopt, and TFXX_abort.

Referenced by bool_arg(), double_arg(), float_arg(), int_arg(), long_arg(), and string_arg().

249  {
250  if ((iopt < 0) || (iopt >= Mnopt))
251  {
252  std::cerr << "Commandline: illegal option index '"
253  << iopt << "' on query" << std::endl;
254  TFXX_abort("bailing out...");
255  }
256  }
int Mnopt
Total number of options evaluated ot Mresult.
Definition: commandline.h:273
#define TFXX_abort(M)
Abort and give a message.
Definition: error.h:183
Here is the caller graph for this function: