Laxkit  0.0.7.1
Public Member Functions | Public Attributes
Laxkit::LaxOption Class Reference

Used internally by LaxOptions. More...

List of all members.

Public Member Functions

 LaxOption (const char *l_option, int s_option, int nflags, const char *nhelp_text, int nid, const char *opt_example, int ex_is_full=0)
int unknown ()
int missing_param ()
int has_arg ()
int chr ()
const charstr ()
int id ()
int present ()
const charhelptext ()
const chararg ()

Public Attributes

charhelp_text
charlong_option
int short_option
int flags
int option_id
int groupnumber
charshort_example
charoption_example
int parsed_present
charparsed_arg

Detailed Description

Used internally by LaxOptions.


Constructor & Destructor Documentation

Laxkit::LaxOption::LaxOption ( const char l_option,
int  s_option,
int  nflags,
const char helptext,
int  nid,
const char opt_example,
int  ex_is_full = 0 
)

If ex_is_full, then use all of opt_example as the option example, instead of building text from the long and short options. Otherwise opt_example is just the name of the argument, to be used when building that text.

References appendstr(), and newstr().


Member Function Documentation

const char * Laxkit::LaxOption::arg ( )

Return parsed_arg.

if (flags&LAXOPT_Remaining), return this->long_option, which is basically the parsed arg, but there was no actual long option. This is a coding hack.


The documentation for this class was generated from the following files:

Mon Feb 17 2014 11:52:59, Laxkit