Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

shevek_args(3) [debian man page]

shevek::args(3) 					     Library Functions Manual						   shevek::args(3)

NAME
shevek::args - Commandline and configuration file parsing helper. SYNOPSIS
#include <args.hh> Classes class option Define an option which can be given to the program. Public Member Functions args (int &argc, char **&argv, int min_args, int max_args, Glib::ustring const &description, Glib::ustring const &copyright_years=COPYRIGHT_YEARS, Glib::ustring const &copyright_email=(COPYRIGHT_EMAIL[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) template<unsigned size_> args (int &argc, char **&argv, option(&o)[size_], int min_args, int max_args, Glib::ustring const &description) Parse the commandline providing a list of possible options. unsigned size () const The number of non-option arguments. std::string const & operator[] (unsigned idx) const Get the non-option arguments. std::vector< std::string > ::const_iterator begin () const " Iterate over the non-option arguments. std::vector< std::string > ::const_iterator end () const " Iterate over the non-option arguments. Detailed Description 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. Usage: create an array of shevek::args::option, 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. Constructor &; Destructor Documentation shevek::args::args (int &argc, char **&argv, intmin_args, intmax_args, Glib::ustring const &description, Glib::ustring const &copyright_years = COPYRIGHT_YEARS, Glib::ustring const &copyright_email = (COPYRIGHT_EMAIL[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) Parse the commandline. Only the default arguments (--help, -h and --version) are understood. Author Generated automatically by Doxygen for libshevek from the source code. libshevek Fri May 11 2012 shevek::args(3)

Check Out this Related Man Page

shevek::ristring(3)					     Library Functions Manual					       shevek::ristring(3)

NAME
shevek::ristring - shevek::ristring is identical to shevek::istring, but it uses std::string instead of Glib::ustring. SYNOPSIS
#include <iostring.hh> Public Member Functions ristring () Create a new istring with no data. ristring (std::string const &str) Create a new istring with data. void init (std::string const &str) Set new data to an existing istring. void push () Push the current position to the stack so it can be restored later. int pop (bool keep=false) Pop the last pushed position from the stack. void reset () Set the current position to 0, but don't change the stack. std::string rest () const Get remaining string. void skip (std::string::size_type p) Skip some characters. bool operator() (std::string const &format) Read a constant string from the input. template<typename T1 > bool operator() (std::string const &format, T1 &arg1) Read a string containing one argument from the input. template<typename T1 , typename T2 > bool operator() (std::string const &format, T1 &arg1, T2 &arg2) Read a string containing two arguments from the input. template<typename T1 , typename T2 , typename T3 > bool operator() (std::string const &format, T1 &arg1, T2 &arg2, T3 &arg3) Read a string containing three arguments from the input. template<typename T1 , typename T2 , typename T3 , typename T4 > bool operator() (std::string const &format, T1 &arg1, T2 &arg2, T3 &arg3, T4 &arg4) Read a string containing four arguments from the input. template<typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > bool operator() (std::string const &format, T1 &arg1, T2 &arg2, T3 &arg3, T4 &arg4, T5 &arg5) Read a string containing five arguments from the input. template<typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 > bool operator() (std::string const &format, T1 &arg1, T2 &arg2, T3 &arg3, T4 &arg4, T5 &arg5, T6 &arg6) Read a string containing six arguments from the input. template<typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 > bool operator() (std::string const &format, T1 &arg1, T2 &arg2, T3 &arg3, T4 &arg4, T5 &arg5, T6 &arg6, T7 &arg7) Read a string containing seven arguments from the input. template<typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 > bool operator() (std::string const &format, T1 &arg1, T2 &arg2, T3 &arg3, T4 &arg4, T5 &arg5, T6 &arg6, T7 &arg7, T8 &arg8) Read a string containing eight arguments from the input. Static Public Member Functions template<typename T > static T direct (std::string const &data, std::string const &format, T def=T()) Read a variable from given data and return it. Detailed Description shevek::ristring is identical to shevek::istring, but it uses std::string instead of Glib::ustring. Member Function Documentation template<typename T > static T shevek::ristring::direct (std::string const &data, std::string const &format, Tdef = T ()) [inline, static] Read a variable from given data and return it. This allows using a shevek::istring in an expression without the need to create a new variable for it. If the input doesn't match the format, def is returned. int shevek::ristring::pop (boolkeep = false) Pop the last pushed position from the stack. If keep is true or not given, the current position is restored to the last position. If it is false, the current position is not changed. Author Generated automatically by Doxygen for libshevek from the source code. libshevek Fri May 11 2012 shevek::ristring(3)
Man Page