diff options
-rw-r--r-- | info/argparser.texinfo | 48 |
1 files changed, 43 insertions, 5 deletions
diff --git a/info/argparser.texinfo b/info/argparser.texinfo index f0b4e10..c7a0f21 100644 --- a/info/argparser.texinfo +++ b/info/argparser.texinfo @@ -53,8 +53,8 @@ Texts. A copy of the license is included in the section entitled * Overview:: Brief overview of @command{argparser}. * Python version:: Using the Python version. * Java version:: Using the Java version. +* C version:: Using the C version. @c* Bash version:: Using the Bash version. -@c* C version:: Using the C version. * GNU Free Documentation License:: Copying and sharing this manual. @end menu @@ -182,6 +182,8 @@ Further @code{support_alternatives}, @code{test_exclusiveness}, without @var{min} is named @code{testFilesMax} and @code{testFiles} without @var{max} is named @code{testFilesMin}. +@code{parse} takes an array of arguments, which excludes the executable. + @var{message} is a @code{String}, @var{files} is a @code{ArrayList<String>}, @var{unrecognisedCount} is a @code{int}, @var{arguments} is a @code{String[]}, and @var{opts} is a @code{HashMap<String, String[]>}. @@ -201,13 +203,49 @@ optioned anywhere, and the alterantive array is variadic if places last. -@c@node Bash version -@c@chapter Bash version +@node C version +@chapter C version + +To use ArgParser, compile with the linker option @code{-largparser} +and use the include @code{#include <argparser.h>}. ArgParser uses the +namespace @code{args}. When you are done using ArgParser you should +free its resources using function @code{args_dispose}. + +@code{args_init} corresponds the the @code{ArgParser} constructor in +the Python version, but all parameters are manditory. + +@code{args_arguments}, @code{args_arguments_count}, +@code{args_unrecognised_count}, @code{args_message} and @code{args_files} +works as their Python version counterparts, and @code{args_files_count} +tells how many elements there are in @code{args_files}. +@code{args_parent_name} takes the number of levels as a manditory +parameters, and no other parameter. @code{args_help} and +@code{args_support_alternatives} takes no parameters, and @code{args_parse} +takes @var{argc} and @var{argv}, the arguments in your main method. +@code{args_test_files_min}, @code{args_test_files_max} and +@code{args_test_files} works are their Java version counterparts, except +that an return code may not be specified. +@code{args_test_allowed} and @code{args_test_exclusiveness} both takes +a string array followed by the number of strings in that array, and no +return code. -@c@node C version -@c@chapter C version +To popule ArgParser with valid options, use the method @code{args_add_option} +which takes the options followed by a description as its parameters, the +description can be @code{NULL}. +To create an options use either @code{args_new_argumentless}, +@code{args_new_argumented} or @code{args_new_variadic}. With the exception +that @code{args_new_argumentless} does not have the first parameters, these +methods have three parameters: a descriptive short name of a argument +associated with the option, the index of the primary alternative, and +finally a variadic parameter with the alternatives, meaning that each +alternative is an argument. + + + +@c@node Bash version +@c@chapter Bash version |