Visual Servoing Platform  version 3.0.1
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
vpParseArgv.h
1 /****************************************************************************
2  *
3  * Declarations for Tk-related things that are visible
4  * outside of the Tk module itself.
5  *
6  * Copyright 1989-1992 Regents of the University of California.
7  * Permission to use, copy, modify, and distribute this
8  * software and its documentation for any purpose and without
9  * fee is hereby granted, provided that the above copyright
10  * notice appear in all copies. The University of California
11  * makes no representations about the suitability of this
12  * software for any purpose. It is provided "as is" without
13  * express or implied warranty.
14  *
15  * This file has been modified to be used only for argv parsing without
16  * reference to tk, tcl or X11. Base on tk.h from tk2.3
17  *
18  * Description:
19  * Command line argument parsing.
20  *
21  * Authors:
22  * Fabien Spindler (modification of the original version)
23  *
24  *****************************************************************************/
25 
31 #ifndef vpParseArgv_h
32 #define vpParseArgv_h
33 
34 
35 #include <visp3/core/vpConfig.h>
36 #include <visp3/core/vpException.h>
37 
151 class VISP_EXPORT vpParseArgv
152 {
153  public:
157  typedef enum {
168  ARGV_END
169  } vpArgvType;
170 
174  typedef enum {
175  ARGV_NO_DEFAULTS = 0x1,
176  ARGV_NO_LEFTOVERS = 0x2,
177  ARGV_NO_ABBREV = 0x4,
178  ARGV_DONT_SKIP_FIRST_ARG = 0x8,
179  ARGV_NO_PRINT = 0x10
180  } vpArgvFlags;
181 
182 #ifndef DOXYGEN_SHOULD_SKIP_THIS
183 
187  typedef struct {
188  const char *key;
190  vpArgvType type;
191  const char *src;
193  const char *dst;
195  const char *help;
196  } vpArgvInfo;
197 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
198 
199 public:
200  static vpArgvInfo defaultTable[2];
201  static bool parse(int *argcPtr, const char **argv,
202  vpArgvInfo *argTable, int flags);
203  static int parse(int argc, const char** argv, const char* validOpts, const char** param);
204 
205  private:
206  static void printUsage (vpArgvInfo *argTable, int flags);
207 
208 
209 
210 } ;
211 
212 
213 #endif
Command line argument parsing.
Definition: vpParseArgv.h:151