|
ROOT
Reference Guide |
|
Go to the documentation of this file.
231 #ifndef OPTIONPARSER_H_
232 #define OPTIONPARSER_H_
241 #pragma intrinsic(_BitScanReverse)
242 struct MSC_Builtin_CLZ
244 static int builtin_clz(
unsigned x)
247 _BitScanReverse(&index,
x);
251 #define __builtin_clz(x) MSC_Builtin_CLZ::builtin_clz(x)
572 int c = (
desc == 0 ? 0 : 1);
717 f->prev_ =
tag(new_last);
738 return desc ? this : 0;
759 return desc ? this : 0;
783 init(desc_, name_, arg_);
836 return (
Option*) ((
unsigned long long) ptr | 1);
841 return (
Option*) ((
unsigned long long) ptr & ~1ull);
846 return ((
unsigned long long) ptr & 1);
974 Stats(
bool gnu,
const Descriptor usage[],
int argc,
const char** argv,
int min_abbr_len = 0,
975 bool single_minus_longopt =
false) :
978 add(gnu, usage, argc, argv, min_abbr_len, single_minus_longopt);
982 Stats(
bool gnu,
const Descriptor usage[],
int argc,
char** argv,
int min_abbr_len = 0,
983 bool single_minus_longopt =
false) :
986 add(gnu, usage, argc,
const_cast<const char**
>(argv), min_abbr_len, single_minus_longopt);
991 bool single_minus_longopt =
false) :
994 add(
false, usage, argc, argv, min_abbr_len, single_minus_longopt);
999 bool single_minus_longopt =
false) :
1002 add(
false, usage, argc,
const_cast<const char**
>(argv), min_abbr_len, single_minus_longopt);
1014 void add(
bool gnu,
const Descriptor usage[],
int argc,
const char** argv,
int min_abbr_len = 0,
1015 bool single_minus_longopt =
false);
1018 void add(
bool gnu,
const Descriptor usage[],
int argc,
char** argv,
int min_abbr_len = 0,
1019 bool single_minus_longopt =
false)
1021 add(gnu, usage, argc,
const_cast<const char**
>(argv), min_abbr_len, single_minus_longopt);
1025 void add(
const Descriptor usage[],
int argc,
const char** argv,
int min_abbr_len = 0,
1026 bool single_minus_longopt =
false)
1028 add(
false, usage, argc, argv, min_abbr_len, single_minus_longopt);
1033 bool single_minus_longopt =
false)
1035 add(
false, usage, argc,
const_cast<const char**
>(argv), min_abbr_len, single_minus_longopt);
1038 class CountOptionsAction;
1082 int min_abbr_len = 0,
bool single_minus_longopt =
false,
int bufmax = -1) :
1085 parse(gnu, usage, argc, argv, options, buffer, min_abbr_len, single_minus_longopt, bufmax);
1090 int min_abbr_len = 0,
bool single_minus_longopt =
false,
int bufmax = -1) :
1093 parse(gnu, usage, argc,
const_cast<const char**
>(argv), options, buffer, min_abbr_len, single_minus_longopt, bufmax);
1098 bool single_minus_longopt =
false,
int bufmax = -1) :
1101 parse(
false, usage, argc, argv, options, buffer, min_abbr_len, single_minus_longopt, bufmax);
1106 bool single_minus_longopt =
false,
int bufmax = -1) :
1109 parse(
false, usage, argc,
const_cast<const char**
>(argv), options, buffer, min_abbr_len, single_minus_longopt, bufmax);
1169 int min_abbr_len = 0,
bool single_minus_longopt =
false,
int bufmax = -1);
1173 int min_abbr_len = 0,
bool single_minus_longopt =
false,
int bufmax = -1)
1175 parse(gnu, usage, argc,
const_cast<const char**
>(argv), options, buffer, min_abbr_len, single_minus_longopt, bufmax);
1180 int min_abbr_len = 0,
bool single_minus_longopt =
false,
int bufmax = -1)
1182 parse(
false, usage, argc, argv, options, buffer, min_abbr_len, single_minus_longopt, bufmax);
1187 bool single_minus_longopt =
false,
int bufmax = -1)
1189 parse(
false, usage, argc,
const_cast<const char**
>(argv), options, buffer, min_abbr_len, single_minus_longopt, bufmax);
1280 bool single_minus_longopt,
bool print_errors,
int min_abbr_len);
1296 static bool streq(
const char* st1,
const char* st2)
1299 if (*st1++ != *st2++)
1301 return (*st2 == 0 || *st2 ==
'=');
1328 static bool streqabbr(
const char* st1,
const char* st2,
long long min)
1330 const char* st1start = st1;
1331 while (*st1 != 0 && (*st1 == *st2))
1337 return (*st1 == 0 || (min > 0 && (st1 - st1start) >= min)) && (*st2 == 0 || *st2 ==
'=');
1346 static bool instr(
char ch,
const char* st)
1348 while (*st != 0 && *st != ch)
1358 static void shift(
const char** args,
int count)
1360 for (
int i = 0; i > -count; --i)
1362 const char* temp = args[i];
1363 args[i] = args[i - 1];
1501 Option buffer[],
int min_abbr_len,
bool single_minus_longopt,
int bufmax)
1504 err = !
workhorse(gnu, usage, argc, argv, action, single_minus_longopt,
true, min_abbr_len);
1508 bool single_minus_longopt)
1512 while (usage[i].shortopt != 0)
1521 Parser::workhorse(gnu, usage, argc, argv, action, single_minus_longopt,
false, min_abbr_len);
1525 bool single_minus_longopt,
bool print_errors,
int min_abbr_len)
1533 while (numargs != 0 && *args != 0)
1535 const char* param = *args;
1539 if (param[0] !=
'-' || param[1] == 0)
1554 if (param[1] ==
'-' && param[2] == 0)
1556 shift(args, nonops);
1563 bool handle_short_options;
1564 const char* longopt_name;
1565 if (param[1] ==
'-')
1567 handle_short_options =
false;
1568 longopt_name = param + 2;
1572 handle_short_options =
true;
1573 longopt_name = param + 1;
1576 bool try_single_minus_longopt = single_minus_longopt;
1577 bool have_more_args = (numargs > 1 || numargs < 0);
1583 const char* optarg=
nullptr;
1586 if (handle_short_options ==
false || try_single_minus_longopt)
1589 while (usage[idx].longopt != 0 && !
streq(usage[idx].longopt, longopt_name))
1592 if (usage[idx].longopt == 0 && min_abbr_len > 0)
1595 while (usage[i1].longopt != 0 && !
streqabbr(usage[i1].longopt, longopt_name, min_abbr_len))
1597 if (usage[i1].longopt != 0)
1600 while (usage[i2].longopt != 0 && !
streqabbr(usage[i2].longopt, longopt_name, min_abbr_len))
1603 if (usage[i2].longopt == 0)
1609 if (usage[idx].longopt != 0)
1610 handle_short_options =
false;
1612 try_single_minus_longopt =
false;
1614 optarg = longopt_name;
1615 while (*optarg != 0 && *optarg !=
'=')
1621 optarg = (have_more_args ? args[1] : 0);
1625 if (handle_short_options)
1631 while (usage[idx].shortopt != 0 && !
instr(*param, usage[idx].shortopt))
1635 optarg = (have_more_args ? args[1] : 0);
1647 while (usage[idx].shortopt != 0 && (usage[idx].shortopt[0] != 0 || usage[idx].longopt[0] != 0))
1649 descriptor = (usage[idx].
shortopt == 0 ? 0 : &usage[idx]);
1652 if (descriptor != 0)
1654 Option option(descriptor, param, optarg);
1655 switch (descriptor->
check_arg(option, print_errors))
1661 if (optarg != 0 && have_more_args && optarg == args[1])
1663 shift(args, nonops);
1670 handle_short_options =
false;
1683 }
while (handle_short_options);
1685 shift(args, nonops);
1692 if (numargs > 0 && *args == 0)
1698 while (args[numargs] != 0)
1702 return action.
finished(numargs + nonops, args - nonops);
1732 template<
typename Function>
1739 (*write)(str, size);
1753 template<
typename OStream>
1774 template<
typename Temporary>
1796 template<
typename Syscall>
1804 (*write)(
fd, str, size);
1817 template<
typename Function,
typename Stream>
1825 (*fwrite)(str, size, 1,
stream);
1840 i1 = (i1 >= i2 ? i1 : i2);
1866 for (
int i = 0; i <
indent; ++i)
1895 return ((0x1100 <= ch && ch <= 0x115F) || (0x2329 <= ch && ch <= 0x232A) || (0x2E80 <= ch && ch <= 0xA4C6)
1896 || (0xA960 <= ch && ch <= 0xA97C) || (0xAC00 <= ch && ch <= 0xD7FB) || (0xF900 <= ch && ch <= 0xFAFF)
1897 || (0xFE10 <= ch && ch <= 0xFE6B) || (0xFF01 <= ch && ch <= 0xFF60) || (0xFFE0 <= ch && ch <= 0xFFE6)
1898 || (0x1B000 <= ch));
1961 unsigned ch = (
unsigned char)
ptr[
len];
1966 unsigned mask = (unsigned) -1 >> __builtin_clz(ch ^ 0xff);
1968 while (((
unsigned char)
ptr[
len + 1] ^ 0x80) <= 0x3F)
1970 ch = (ch << 6) ^ (
unsigned char)
ptr[
len + 1] ^ 0x80;
2034 while (*
ptr != 0 && *
ptr !=
'\n')
2346 output(write, data, len);
2353 while (maxi < len && utf8width <
width)
2356 unsigned ch = (
unsigned char) data[maxi];
2361 unsigned mask = (unsigned) -1 >> __builtin_clz(ch ^ 0xff);
2363 while ((maxi + charbytes < len) &&
2364 (((
unsigned char) data[maxi + charbytes] ^ 0x80) <= 0x3F))
2366 ch = (ch << 6) ^ (
unsigned char) data[maxi + charbytes] ^ 0x80;
2372 if (utf8width + 2 >
width)
2386 output(write, data, len);
2392 for (i = maxi; i >= 0; --i)
2404 output(write, data, maxi);
2435 int last_column_min_percent = 50,
int last_column_own_line_max_percent = 75)
2443 int last_column_min_width = ((
width * last_column_min_percent) + 50) / 100;
2444 int last_column_own_line_max_width = ((
width * last_column_own_line_max_percent) + 50) / 100;
2445 if (last_column_own_line_max_width == 0)
2446 last_column_own_line_max_width = 1;
2454 const int maxcolumns = 8;
2455 int col_width[maxcolumns];
2458 int overlong_column_threshold = 10000;
2462 for (
int i = 0; i < maxcolumns; ++i)
2470 if (part.
column() < maxcolumns)
2496 overlong_column_threshold = 0;
2497 for (
int i = 0; i < lastcolumn; ++i)
2499 leftwidth += col_width[i];
2500 upmax(overlong_column_threshold, col_width[i]);
2503 }
while (leftwidth >
width);
2507 int tabstop[maxcolumns];
2509 for (
int i = 1; i < maxcolumns; ++i)
2510 tabstop[i] = tabstop[i - 1] + col_width[i - 1];
2512 int rightwidth =
width - tabstop[lastcolumn];
2513 bool print_last_column_on_own_line =
false;
2514 if (rightwidth < last_column_min_width && rightwidth < col_width[lastcolumn])
2516 print_last_column_on_own_line =
true;
2517 rightwidth = last_column_own_line_max_width;
2528 if (lastcolumn == 0)
2529 print_last_column_on_own_line =
false;
2543 if (part.
column() > lastcolumn)
2555 if ((part.
column() < lastcolumn)
2568 LineWrapper& lineWrapper = (part.
column() == 0) ? interjectionLineWrapper : lastColumnLineWrapper;
2570 if (!print_last_column_on_own_line)
2575 if (print_last_column_on_own_line)
2580 if (part.
column() == lastcolumn)
2591 lastColumnLineWrapper.
flush(write);
2592 interjectionLineWrapper.
flush(write);
2797 template<
typename OStream>
2799 int last_column_own_line_max_percent = 75)
2805 template<
typename Function>
2807 int last_column_own_line_max_percent = 75)
2813 template<
typename Temporary>
2815 int last_column_own_line_max_percent = 75)
2821 template<
typename Syscall>
2823 int last_column_own_line_max_percent = 75)
2829 template<
typename Function,
typename Stream>
2832 int last_column_own_line_max_percent = 75)
2842 fprintf(stderr,
"%s", msg1);
2844 fprintf(stderr,
"%s", msg2);
2849 if (msg)
printError(
"Unknown option '", option,
"'\n");
2855 if (option.
arg != 0)
2858 if (msg)
printError(
"Option '", option,
"' requires an argument\n");
2864 if (option.
arg != 0 && option.
arg[0] != 0)
2867 if (msg)
printError(
"Option '", option,
"' requires a non-empty argument\n");
2874 if (option.
arg != 0 && strtol(option.
arg, &endptr, 10)){};
2875 if (endptr != option.
arg && *endptr == 0)
2878 if (msg)
printError(
"Option '", option,
"' requires a numeric argument\n");
void process(IStringWriter &write, const char *data, int len)
Process, wrap and output the next piece of data.
virtual void operator()(const char *str, int size)
Writes the given number of chars beginning at the given pointer somewhere.
void flush(IStringWriter &write)
Writes out all remaining data from the LineWrapper using write.
void restartTable()
Reset iteration to the beginning of the current table.
void parse(bool gnu, const Descriptor usage[], int argc, const char **argv, Option options[], Option buffer[], int min_abbr_len=0, bool single_minus_longopt=false, int bufmax=-1)
Parses the given argument vector.
static void shift(const char **args, int count)
static bool isTagged(Option *ptr)
Option(const Descriptor *desc_, const char *name_, const char *arg_)
Creates a new Option that is a one-element linked list and has the given values for desc,...
@ ARG_ILLEGAL
The argument is not acceptable and that's fatal.
static bool streq(const char *st1, const char *st2)
void restartRow()
Reset iteration to the beginning of the current row.
Option * prev()
Returns a pointer to the previous element of the linked list or NULL if called on first().
@ ARG_IGNORE
The argument is not acceptable but that's non-fatal because the option's argument is optional.
const char * data()
Returns the current part of the iteration.
void init(const Descriptor *desc_, const char *name_, const char *arg_)
bool perform(Option &option)
Called by Parser::workhorse() for each Option that has been successfully parsed (including unknown op...
static option::ArgStatus Unknown(const option::Option &option, bool msg)
virtual ~IStringWriter()=default
static void printUsage(IStringWriter &write, const Descriptor usage[], int width=80, int last_column_min_percent=50, int last_column_own_line_max_percent=75)
@ ARG_NONE
The option does not take an argument.
void output(IStringWriter &write, const char *data, int len)
Writes (data,len) into the ring buffer.
Stats(const Descriptor usage[], int argc, char **argv, int min_abbr_len=0, bool single_minus_longopt=false)
POSIX Stats(...) (gnu==false) with non-const argv.
SyscallWriter(Syscall *w, int f)
bool hit_target_line
Flag whether we encountered a part with line index target_line_in_block in the current cell.
void buf_next()
Call BEFORE reading ...buf[tail].
int col
Index of current column.
bool wrote_something
Multiple methods of LineWrapper may decide to flush part of the buffer to free up space.
static ArgStatus None(const Option &, bool)
For options that don't take an argument: Returns ARG_NONE.
virtual void operator()(const char *str, int size)
Writes the given number of chars beginning at the given pointer somewhere.
const char * arg
Pointer to this Option's argument (if any).
void update_length()
Determines the byte and character lengths of the part at ptr and stores them in len and screenlen res...
unsigned options_max
Number of elements needed for an options[] array to be used for parsing the same argument vectors tha...
Option * nextwrap()
Returns a pointer to the next element of the linked list with wrap-around from last() to first().
const Descriptor * desc
Pointer to this Option's Descriptor.
void buf_store(const char *data, int len)
include TDocParser_001 C image html pict1_TDocParser_001 png width
void append(Option *new_last)
Makes new_last the new last() by chaining it into the list after last().
void add(const Descriptor usage[], int argc, char **argv, int min_abbr_len=0, bool single_minus_longopt=false)
POSIX add() (gnu==false) with non-const argv.
static constexpr double s
StreamWriter(Function *w, Stream *s)
const unsigned index
Index of this option's linked list in the array filled in by the parser.
bool nextRow()
Moves iteration to the next row (if any).
void write_one_line(IStringWriter &write)
Writes a single line of output from the buffer to write.
const char * ptr
Ptr to current part within the current row.
Stats(bool gnu, const Descriptor usage[], int argc, char **argv, int min_abbr_len=0, bool single_minus_longopt=false)
Stats(...) with non-const argv.
Option * first()
Returns a pointer to the first element of the linked list.
Determines the minimum lengths of the buffer and options arrays used for Parser.
virtual void operator()(const char *str, int size)
Writes the given number of chars beginning at the given pointer somewhere.
StoreOptionAction(Parser &parser_, Option options_[], Option buffer_[], int bufmax_)
Number of slots in buffer. -1 means "large enough".
virtual void operator()(const char *str, int size)
Writes the given number of chars beginning at the given pointer somewhere.
int x
The indentation of the column to which the LineBuffer outputs.
bool isFirst() const
Returns true iff this is the first element of the linked list.
Double_t(* Function)(Double_t)
int nonOptionsCount()
Returns the number of non-option arguments that remained at the end of the most recent parse() that a...
@ ARG_OK
The argument is acceptable for the option.
const char *const shortopt
Each char in this string will be accepted as a short option character.
static void upmax(int &i1, int i2)
virtual bool perform(Option &)
Called by Parser::workhorse() for each Option that has been successfully parsed (including unknown op...
ArgStatus
Possible results when checking if an argument is valid for a certain option.
int width
The width of the column to line wrap.
const char *const longopt
The long option name (without the leading – ).
const char * datbuf[bufmask+1]
Ring buffer for data component of pair (data, length).
A parsed option from the command line together with its argument if it has one.
Parser(const Descriptor usage[], int argc, char **argv, Option options[], Option buffer[], int min_abbr_len=0, bool single_minus_longopt=false, int bufmax=-1)
POSIX Parser(...) (gnu==false) with non-const argv.
static Option * tag(Option *ptr)
static const double x1[5]
int tail
index for next read - 1 (i.e.
static bool isWideChar(unsigned ch)
Returns true if ch is the unicode code point of a wide character.
bool next()
Moves iteration to the next part (if any).
LineWrapper(int x1, int x2)
Constructs a LineWrapper that wraps its output to fit into screen columns x1 (incl....
bool nextTable()
Moves iteration to the next table (if any).
static bool streqabbr(const char *st1, const char *st2, long long min)
bool perform(Option &)
Called by Parser::workhorse() for each Option that has been successfully parsed (including unknown op...
Stats(bool gnu, const Descriptor usage[], int argc, const char **argv, int min_abbr_len=0, bool single_minus_longopt=false)
Creates a new Stats object and immediately updates it for the given usage and argument vector.
int index() const
Returns Descriptor::index of this Option's Descriptor, or -1 if this Option is invalid (unused).
int lenbuf[bufmask+1]
Ring buffer for length component of pair (data, length).
void parse(const Descriptor usage[], int argc, const char **argv, Option options[], Option buffer[], int min_abbr_len=0, bool single_minus_longopt=false, int bufmax=-1)
POSIX parse() (gnu==false).
CountOptionsAction(unsigned *buffer_max_)
Creates a new CountOptionsAction that will increase *buffer_max_ for each parsed Option.
TemporaryWriter(const Temporary &u)
static bool instr(char ch, const char *st)
int namelen
The length of the option name.
bool isLast() const
Returns true iff this is the last element of the linked list.
int optionsCount()
Returns the number of valid Option objects in buffer[].
const Descriptor * tablestart
The 1st descriptor of the current table.
int max_line_in_block
Greatest index of a line within the block.
Option * prevwrap()
Returns a pointer to the previous element of the linked list with wrap-around from first() to last().
Parser(const Descriptor usage[], int argc, const char **argv, Option options[], Option buffer[], int min_abbr_len=0, bool single_minus_longopt=false, int bufmax=-1)
POSIX Parser(...) (gnu==false).
Option & operator=(const Option &orig)
Makes *this a copy of orig except for the linked list pointers.
Stats(const Descriptor usage[], int argc, const char **argv, int min_abbr_len=0, bool single_minus_longopt=false)
POSIX Stats(...) (gnu==false).
FunctionWriter(Function *w)
static const int bufmask
Must be a power of 2 minus 1.
Checks argument vectors for validity and parses them into data structures that are easier to work wit...
Option(const Option &orig)
Makes *this a copy of orig except for the linked list pointers.
int line_in_block
Line index within the current cell of the current part.
const Temporary & userstream
Stats()
Creates a Stats object with counts set to 1 (for the sentinel element).
void add(const Descriptor usage[], int argc, const char **argv, int min_abbr_len=0, bool single_minus_longopt=false)
POSIX add() (gnu==false).
int screenlen
Length of the current part in screen columns (taking narrow/wide chars into account).
int target_line_in_block
Line index of the parts we should return to the user on this iteration.
const char ** nonOptions()
Returns a pointer to an array of non-option arguments (only valid if nonOptionsCount() >0 ).
const Descriptor * rowdesc
The Descriptor that contains the current row.
void add(bool gnu, const Descriptor usage[], int argc, const char **argv, int min_abbr_len=0, bool single_minus_longopt=false)
Updates this Stats object for the given usage and argument vector.
int count()
Returns the number of times this Option (or others with the same Descriptor::index) occurs in the arg...
Functions for checking the validity of option arguments.
Option()
Creates a new Option that is a one-element linked list and has NULL desc, name, arg and namelen.
void parse(bool gnu, const Descriptor usage[], int argc, char **argv, Option options[], Option buffer[], int min_abbr_len=0, bool single_minus_longopt=false, int bufmax=-1)
parse() with non-const argv.
typedef void((*Func_t)())
unsigned buffer_max
Number of elements needed for a buffer[] array to be used for parsing the same argument vectors that ...
void parse(const Descriptor usage[], int argc, char **argv, Option options[], Option buffer[], int min_abbr_len=0, bool single_minus_longopt=false, int bufmax=-1)
POSIX parse() (gnu==false) with non-const argv.
OStreamWriter(OStream &o)
static void indent(IStringWriter &write, int &x, int want_x)
const char * nonOption(int i)
Returns nonOptions()[i] (without checking if i is in range!).
virtual void operator()(const char *, int)
Writes the given number of chars beginning at the given pointer somewhere.
int type() const
Returns Descriptor::type of this Option's Descriptor, or 0 if this Option is invalid (unused).
bool error()
Returns true if an unrecoverable error occurred while parsing options.
int head
index for next write
static option::ArgStatus Numeric(const option::Option &option, bool msg)
static ArgStatus Optional(const Option &option, bool)
Returns ARG_OK if the argument is attached and ARG_IGNORE otherwise.
Parser(bool gnu, const Descriptor usage[], int argc, char **argv, Option options[], Option buffer[], int min_abbr_len=0, bool single_minus_longopt=false, int bufmax=-1)
Parser(...) with non-const argv.
const char * name
The name of the option as used on the command line.
Describes an option, its help text (usage) and how it should be parsed.
void printUsage(OStream &prn, const Descriptor usage[], int width=80, int last_column_min_percent=50, int last_column_own_line_max_percent=75)
Outputs a nicely formatted usage string with support for multi-column formatting and line-wrapping.
bool finished(int numargs, const char **args)
Called by Parser::workhorse() after finishing the parse.
const CheckArg check_arg
For each option that matches shortopt or longopt this function will be called to check a potential ar...
virtual ~Action()=default
Parser(bool gnu, const Descriptor usage[], int argc, const char **argv, Option options[], Option buffer[], int min_abbr_len=0, bool single_minus_longopt=false, int bufmax=-1)
Creates a new Parser and immediately parses the given argument vector.
int screenLength()
Returns the width in screen columns of the part pointed to by data().
int length()
Returns the length of the part pointed to by data() in raw chars (not UTF-8 characters).
void add(bool gnu, const Descriptor usage[], int argc, char **argv, int min_abbr_len=0, bool single_minus_longopt=false)
add() with non-const argv.
const char * help
The usage text associated with the options in this Descriptor.
static const double x2[5]
static Option * untag(Option *ptr)
ArgStatus(* CheckArg)(const Option &option, bool msg)
Signature of functions that check if an argument is valid for a certain type of option.
LinePartIterator(const Descriptor usage[])
Creates an iterator for usage.
Option * next()
Returns a pointer to the next element of the linked list or NULL if called on last().
static void printError(const char *msg1, const option::Option &opt, const char *msg2)
static option::ArgStatus Required(const option::Option &option, bool msg)
static bool workhorse(bool gnu, const Descriptor usage[], int numargs, const char **args, Action &action, bool single_minus_longopt, bool print_errors, int min_abbr_len)
virtual bool finished(int numargs, const char **args)
Called by Parser::workhorse() after finishing the parse.
static option::ArgStatus NonEmpty(const option::Option &option, bool msg)
Parser()
Creates a new Parser.
Option * last()
Returns a pointer to the last element of the linked list.
virtual void operator()(const char *str, int size)
Writes the given number of chars beginning at the given pointer somewhere.
int line()
Returns the index (counting from 0) of the line within the current column this part belongs to.
const char * rowstart
Ptr to 1st character of current row within rowdesc->help.
int column()
Returns the index (counting from 0) of the column in which the part pointed to by data() is located.
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
int len
Length of the current part (that ptr points at) in BYTES.
const int type
Used to distinguish between options with the same ROOT Reference Documentation.