.TH "shevek::args" 3 "Wed Jul 9 2014" "libshevek" \" -*- nroff -*- .ad l .nh .SH NAME shevek::args \- .PP Commandline and configuration file parsing helper\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .SS "Classes" .in +1c .ti -1c .RI "class \fBoption\fP" .br .RI "\fIDefine an option which can be given to the program\&. \fP" .in -1c .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBargs\fP (int &argc, char **&argv, int min_args, int max_args, Glib::ustring const &description, Glib::ustring const ©right_years=COPYRIGHT_YEARS, Glib::ustring const ©right_email=(COPYRIGHT_EMAIL[0]== '\\0'?PACKAGE_BUGREPORT:COPYRIGHT_EMAIL), Glib::ustring const &programmer=COPYRIGHT_AUTHOR, Glib::ustring const &email=PACKAGE_BUGREPORT, char const *programname=PACKAGE_NAME, char const *packagename=PACKAGE_TARNAME, char const *version=PACKAGE_VERSION)" .br .ti -1c .RI "template \fBargs\fP (int &argc, char **&argv, \fBoption\fP(&o)[size_], int min_args, int max_args, Glib::ustring const &description)" .br .RI "\fIParse the commandline providing a list of possible options\&. \fP" .ti -1c .RI "unsigned \fBsize\fP () const " .br .RI "\fIThe number of non-option arguments\&. \fP" .ti -1c .RI "std::string const & \fBoperator[]\fP (unsigned idx) const " .br .RI "\fIGet the non-option arguments\&. \fP" .ti -1c .RI "std::vector< std::string > .br ::const_iterator \fBbegin\fP () const " .br .RI "\fIIterate over the non-option arguments\&. \fP" .ti -1c .RI "std::vector< std::string > .br ::const_iterator \fBend\fP () const " .br .RI "\fIIterate over the non-option arguments\&. \fP" .in -1c .SH "Detailed Description" .PP Commandline and configuration file parsing helper\&. Args is a commandline parsing helper\&. It allows giving the possible short and long options in a simple list and provides --help and --version output to the user of the program\&. .PP Usage: create an array of \fBshevek::args::option\fP, containing the desired options\&. create an instance of args and pass it argc and argv on the constructor\&. It will call all the callbacks of the options from the constructor\&. size () and operator[] can be used to access the non-option arguments\&. .SH "Constructor & Destructor Documentation" .PP .SS "shevek::args::args (int &argc, char **&argv, intmin_args, intmax_args, Glib::ustring const &description, Glib::ustring const ©right_years = \fCCOPYRIGHT_YEARS\fP, Glib::ustring const ©right_email = \fC(COPYRIGHT_EMAIL[0]== '\\0'?PACKAGE_BUGREPORT:COPYRIGHT_EMAIL)\fP, Glib::ustring const &programmer = \fCCOPYRIGHT_AUTHOR\fP, Glib::ustring const &email = \fCPACKAGE_BUGREPORT\fP, char const *programname = \fCPACKAGE_NAME\fP, char const *packagename = \fCPACKAGE_TARNAME\fP, char const *version = \fCPACKAGE_VERSION\fP)" Parse the commandline\&. Only the default arguments (--help, -h and --version) are understood\&. .SH "Author" .PP Generated automatically by Doxygen for libshevek from the source code\&.