]> Creatis software - clitk.git/blob - cmake/gengetopt/ggos.h
auto generate dicom file UIDs when new series/study is specified
[clitk.git] / cmake / gengetopt / ggos.h
1 /*
2 This file is licensed to you under the license specified in the included file
3 `LICENSE'. Look there for further details.
4 */
5
6
7 #ifndef _GENGETOPT_GGOS_H
8 #define _GENGETOPT_GGOS_H
9
10 #ifdef HAVE_CONFIG_H
11 #include "config.h"
12 #endif
13
14 #include <list>
15 #include <iostream>
16
17 #include "acceptedvalues.h"
18 #include "argsdef.h"
19
20 /**
21  * The structure for storing an option specified in the .ggo file
22  */
23 struct gengetopt_option
24 {
25   char short_opt; /**< the short option specification (one char) */
26   char * long_opt; /**< the short option specification */
27   char * desc; /**< the option description */
28   int type; /**< the type of the option (possible values in `argsdef.h') */
29   int flagstat ; /**< if the option is of type flag, this indicates its state (on/off) */
30   int required; /**< whether the option required */
31   bool required_set; /**< whether the required property was set */
32   char * var_arg; /**< canonized long_opt + "_arg" = argument var */
33   int default_given ; /**< if a default is given */
34   char * default_string ; /**< default value for this option, if string */
35   char * group_value; /**< group name, if it's part of an option group */
36   char * group_desc; /**< group description, if it's part of an option group */
37   char * mode_value; /**< mode name, if it's part of an option mode */
38   char * mode_desc; /**< mode description, if it's part of an option mode */
39   bool multiple; /**< whether this option can be given more than once */
40   char * multiple_min; /**< minimum occurrences of a multiple option (-1: not specified) */
41   char * multiple_max; /**< maximum occurrences of a multiple option (-1: not specified) */
42   bool arg_is_optional; /**< whether the argument is optional */
43   bool hidden; /**< whether this option will be hidden from the help output */
44   char *type_str; /**< Alternative name for type,
45                      e.g. "URL" or "SECONDS" */
46   const AcceptedValues *acceptedvalues; /**< values that can be passed to this option */
47   char *section; /**< the section of this option */
48   char *section_desc; /**< the description associated with the possible section */
49   char *dependon; /**< the name of the option this one depends on */
50
51   char *text_before; /**< a possible text specified before this option */
52   char *text_after; /**< a possible text specified after this option */
53   
54   char *details; /**< possible further details for this option that will be
55   printed only if --detailed-help is specified */
56
57   /**< parser information */
58   char *filename; /**< source file */
59   int linenum; /**< line number */
60
61   gengetopt_option();
62 };
63
64 /** the list storing gengetopt options */
65 typedef std::list<gengetopt_option *> gengetopt_option_list;
66
67 std::ostream & operator <<(std::ostream &s, gengetopt_option &opt);
68
69 #endif /* _GENGETOPT_GGOS_H */