ViSP
Main Page
Related Pages
Modules
Classes
Examples
All
Classes
Functions
Variables
Enumerations
Enumerator
Friends
Groups
Pages
vpParseArgv.h
1
/****************************************************************************
2
*
3
* $Id: vpParseArgv.h 2780 2010-09-08 08:37:15Z fspindle $
4
*
5
* Declarations for Tk-related things that are visible
6
* outside of the Tk module itself.
7
*
8
* Copyright 1989-1992 Regents of the University of California.
9
* Permission to use, copy, modify, and distribute this
10
* software and its documentation for any purpose and without
11
* fee is hereby granted, provided that the above copyright
12
* notice appear in all copies. The University of California
13
* makes no representations about the suitability of this
14
* software for any purpose. It is provided "as is" without
15
* express or implied warranty.
16
*
17
* This file has been modified to be used only for argv parsing without
18
* reference to tk, tcl or X11. Base on tk.h from tk2.3
19
*
20
* Description:
21
* Command line argument parsing.
22
*
23
* Authors:
24
* Fabien Spindler (modification of the original version)
25
*
26
*****************************************************************************/
27
33
#ifndef vpParseArgv_h
34
#define vpParseArgv_h
35
36
37
#include <visp/vpConfig.h>
38
133
class
VISP_EXPORT
vpParseArgv
134
{
135
public
:
139
typedef
enum
{
140
ARGV_CONSTANT
,
141
ARGV_INT
,
142
ARGV_LONG
,
143
ARGV_STRING
,
144
ARGV_REST
,
145
ARGV_FLOAT
,
146
ARGV_DOUBLE
,
147
ARGV_FUNC
,
148
ARGV_GENFUNC
,
149
ARGV_HELP
,
150
ARGV_END
151
} vpArgvType;
152
156
typedef
enum
{
157
ARGV_NO_DEFAULTS = 0x1,
158
ARGV_NO_LEFTOVERS = 0x2,
159
ARGV_NO_ABBREV = 0x4,
160
ARGV_DONT_SKIP_FIRST_ARG = 0x8,
161
ARGV_NO_PRINT = 0x10
162
} vpArgvFlags;
163
164
#ifndef DOXYGEN_SHOULD_SKIP_THIS
165
169
typedef
struct
{
170
const
char
*key;
172
vpArgvType type;
173
const
char
*src;
175
const
char
*dst;
177
const
char
*help;
178
} vpArgvInfo;
179
#endif
/* DOXYGEN_SHOULD_SKIP_THIS */
180
181
public
:
182
static
vpArgvInfo defaultTable[2];
183
static
bool
parse(
int
*argcPtr,
const
char
**argv,
184
vpArgvInfo *argTable,
int
flags);
185
static
int
parse(
int
argc,
const
char
** argv,
const
char
* validOpts,
const
char
** param);
186
187
private
:
188
static
void
printUsage (vpArgvInfo *argTable,
int
flags);
189
190
191
192
} ;
193
194
195
#endif
src
tools
io
vpParseArgv.h
Generated on Fri Apr 26 2013 19:54:35 for ViSP by
1.8.1.2