ViSP
2.9.0
Main Page
Related Pages
Modules
Classes
Examples
vpParseArgv.h
1
/****************************************************************************
2
*
3
* $Id: vpParseArgv.h 4473 2013-09-27 16:50:44Z 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
#include <visp/vpException.h>
39
134
class
VISP_EXPORT
vpParseArgv
135
{
136
public
:
140
typedef
enum
{
141
ARGV_CONSTANT
,
142
ARGV_INT
,
143
ARGV_LONG
,
144
ARGV_STRING
,
145
ARGV_REST
,
146
ARGV_FLOAT
,
147
ARGV_DOUBLE
,
148
ARGV_FUNC
,
149
ARGV_GENFUNC
,
150
ARGV_HELP
,
151
ARGV_END
152
} vpArgvType;
153
157
typedef
enum
{
158
ARGV_NO_DEFAULTS = 0x1,
159
ARGV_NO_LEFTOVERS = 0x2,
160
ARGV_NO_ABBREV = 0x4,
161
ARGV_DONT_SKIP_FIRST_ARG = 0x8,
162
ARGV_NO_PRINT = 0x10
163
} vpArgvFlags;
164
165
#ifndef DOXYGEN_SHOULD_SKIP_THIS
166
170
typedef
struct
{
171
const
char
*key;
173
vpArgvType type;
174
const
char
*src;
176
const
char
*dst;
178
const
char
*help;
179
} vpArgvInfo;
180
#endif
/* DOXYGEN_SHOULD_SKIP_THIS */
181
182
public
:
183
static
vpArgvInfo defaultTable[2];
184
static
bool
parse(
int
*argcPtr,
const
char
**argv,
185
vpArgvInfo *argTable,
int
flags);
186
static
int
parse(
int
argc,
const
char
** argv,
const
char
* validOpts,
const
char
** param);
187
188
private
:
189
static
void
printUsage (vpArgvInfo *argTable,
int
flags);
190
191
192
193
} ;
194
195
196
#endif
vpParseArgv::ARGV_DOUBLE
Definition:
vpParseArgv.h:147
vpParseArgv::ARGV_STRING
Definition:
vpParseArgv.h:144
vpParseArgv::ARGV_HELP
Definition:
vpParseArgv.h:150
vpParseArgv::ARGV_REST
Definition:
vpParseArgv.h:145
vpParseArgv::ARGV_FUNC
Definition:
vpParseArgv.h:148
vpParseArgv::ARGV_LONG
Definition:
vpParseArgv.h:143
vpParseArgv::ARGV_CONSTANT
Definition:
vpParseArgv.h:141
vpParseArgv::ARGV_GENFUNC
Definition:
vpParseArgv.h:149
vpParseArgv::ARGV_FLOAT
Definition:
vpParseArgv.h:146
vpParseArgv
Command line argument parsing.
Definition:
vpParseArgv.h:134
vpParseArgv::ARGV_INT
Definition:
vpParseArgv.h:142
ViSP-2.9.0
src
tools
io
vpParseArgv.h
Generated on Wed Sep 2 2015 10:33:38 for ViSP by
1.8.9.1