lemon/arg_parser.h
changeset 87 81e138275860
parent 86 eba5222bb6f5
child 88 18444049848b
     1.1 --- a/lemon/arg_parser.h	Tue Jan 22 16:03:41 2008 +0000
     1.2 +++ b/lemon/arg_parser.h	Thu Jan 24 17:25:31 2008 +0000
     1.3 @@ -103,6 +103,19 @@
     1.4      std::vector<OtherArg> _others_help;
     1.5      std::vector<std::string> _file_args;
     1.6      std::string _command_name;
     1.7 +
     1.8 +    
     1.9 +  private:
    1.10 +    //Bind a function to an option.
    1.11 +
    1.12 +    //\param name The name of the option. The leading '-' must be omitted.
    1.13 +    //\param help A help string.
    1.14 +    //\retval func The function to be called when the option is given. It
    1.15 +    //  must be of type "void f(void *)"
    1.16 +    //\param data Data to be passed to \c func
    1.17 +    ArgParser &funcOption(const std::string &name,
    1.18 +		    const std::string &help,
    1.19 +		    void (*func)(void *),void *data);
    1.20      
    1.21    public:
    1.22  
    1.23 @@ -151,17 +164,6 @@
    1.24      ArgParser &stringOption(const std::string &name,
    1.25  		      const std::string &help,
    1.26  		      std::string value="", bool obl=false);
    1.27 -    
    1.28 -    ///Bind a function to an option.
    1.29 -
    1.30 -    ///\param name The name of the option. The leading '-' must be omitted.
    1.31 -    ///\param help A help string.
    1.32 -    ///\retval func The function to be called when the option is given. It
    1.33 -    ///  must be of type "void f(void *)"
    1.34 -    ///\param data Data to be passed to \c func
    1.35 -    ArgParser &funcOption(const std::string &name,
    1.36 -		    const std::string &help,
    1.37 -		    void (*func)(void *),void *data);
    1.38  
    1.39      ///\name Options with an external strorage.
    1.40      ///Using this functions, the value of the option will be directly written