]> Creatis software - clitk.git/blob - utilities/gengetopt/gengetopt.h
Debug RTStruct conversion with empty struc
[clitk.git] / utilities / gengetopt / gengetopt.h
1 /**
2  * Copyright (C) 1999-2007  Free Software Foundation, Inc.
3  *
4  * This file is part of GNU gengetopt
5  *
6  * GNU gengetopt is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 3, or (at your option)
9  * any later version.
10  *
11  * GNU gengetopt is distributed in the hope that it will be useful, but
12  * WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
14  * Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License along
17  * with gengetopt; see the file COPYING. If not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19  */
20
21 #ifndef _GENGETOPT_H
22 #define _GENGETOPT_H
23
24 #include "acceptedvalues.h"
25 #include "ggos.h"
26
27 int gengetopt_define_package (char * s) ;
28 int gengetopt_define_version (char * s) ;
29 int gengetopt_define_purpose (char * s) ;
30 int gengetopt_define_description (char * s) ;
31 int gengetopt_define_usage (char * s) ;
32
33 /**
34  * Sets the "global" section specification that will be then set
35  * in the following options
36  * @param s The section
37  * @param sd The section description
38  */
39 void gengetopt_set_section (const char * s, const char *sd) ;
40
41 /**
42  * Sets the "global" text string that will be inserted in
43  * a specific field of the next option
44  * @param desc The text string
45  */
46 void gengetopt_set_text (const char * desc) ;
47
48 /**
49  * Sets the "global" text string containing the arguments
50  * that complement the command line arguments of gengetopt.
51  * @param args
52  */
53 void gengetopt_set_args (const char *args);
54
55 int gengetopt_add_group (const char * s, const char *desc, int required) ;
56 int gengetopt_add_mode (const char * s, const char *desc) ;
57
58 int gengetopt_has_option (const char * long_opt, char short_opt);
59 int gengetopt_add_option (const char * long_opt, char short_opt,
60                           const char * desc,
61                           int type, int flagstat, int required,
62                           const char *default_value,
63                           const char * group_value,
64                           const char * mode_value,
65                           const char * type_str,
66                           const AcceptedValues *acceptedvalues,
67                           int multiple = 0,
68                           int argoptional = 0);
69
70 int gengetopt_has_option (gengetopt_option *opt);
71 int gengetopt_check_option (gengetopt_option *opt,
72     bool groupoption = false, bool modeoption = false);
73 int gengetopt_add_option (gengetopt_option *opt);
74
75 #endif /* _GENGETOPT_H */