ViSP
2.8.0
Main Page
Related Pages
Modules
Classes
Examples
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
vpParseArgv::ARGV_DOUBLE
Definition:
vpParseArgv.h:146
vpParseArgv::ARGV_STRING
Definition:
vpParseArgv.h:143
vpParseArgv::ARGV_HELP
Definition:
vpParseArgv.h:149
vpParseArgv::ARGV_REST
Definition:
vpParseArgv.h:144
vpParseArgv::ARGV_FUNC
Definition:
vpParseArgv.h:147
vpParseArgv::ARGV_LONG
Definition:
vpParseArgv.h:142
vpParseArgv::ARGV_CONSTANT
Definition:
vpParseArgv.h:140
vpParseArgv::ARGV_GENFUNC
Definition:
vpParseArgv.h:148
vpParseArgv::ARGV_FLOAT
Definition:
vpParseArgv.h:145
vpParseArgv
Command line argument parsing.
Definition:
vpParseArgv.h:133
vpParseArgv::ARGV_INT
Definition:
vpParseArgv.h:141
ViSP-2.8.0
src
tools
io
vpParseArgv.h
Generated on Wed Sep 2 2015 14:12:30 for ViSP by
1.8.9.1