APM:Libraries
libraries
AP_HAL
utility
getopt_cpp.h
Go to the documentation of this file.
1
/*
2
* Portions Copyright (c) 1987, 1993, 1994
3
* The Regents of the University of California. All rights reserved.
4
*
5
* Portions Copyright (c) 2003-2010, PostgreSQL Global Development
6
* Group
7
*
8
* Simple conversion to C++ by Andrew Tridgell for ArduPilot. Based on
9
* getopt_long.h from ccache
10
*/
11
#pragma once
12
13
14
class
GetOptLong
{
15
public
:
16
struct
option
{
17
const
char
*
name
;
18
bool
has_arg
;
19
int
*
flag
;
20
int
val
;
21
};
22
23
GetOptLong
(
int
argc
,
char
*
const
argv
[],
const
char
*
optstring
,
const
option
*
longopts
);
24
25
int
opterr
;
26
int
optind
;
27
int
optopt
;
28
int
longindex
;
29
const
char
*
optarg
;
30
31
enum
error_return
{
32
BADCH
=
'?'
,
33
BADARG
=
':'
34
};
35
36
37
int
getoption
(
void
);
38
39
private
:
40
int
argc
;
41
char
*
const
*
argv
;
42
const
char
*
optstring
;
43
const
struct
option
*
longopts
;
44
const
char
*
place
;
45
};
GetOptLong::argv
char *const * argv
Definition:
getopt_cpp.h:41
GetOptLong::opterr
int opterr
Definition:
getopt_cpp.h:25
GetOptLong::GetOptLong
GetOptLong(int argc, char *const argv[], const char *optstring, const option *longopts)
GetOptLong::option::has_arg
bool has_arg
Definition:
getopt_cpp.h:18
GetOptLong::BADCH
Definition:
getopt_cpp.h:32
GetOptLong::option::name
const char * name
Definition:
getopt_cpp.h:17
GetOptLong::optarg
const char * optarg
Definition:
getopt_cpp.h:29
GetOptLong::optind
int optind
Definition:
getopt_cpp.h:26
GetOptLong::optstring
const char * optstring
Definition:
getopt_cpp.h:42
GetOptLong::BADARG
Definition:
getopt_cpp.h:33
GetOptLong::argc
int argc
Definition:
getopt_cpp.h:40
GetOptLong::option::val
int val
Definition:
getopt_cpp.h:20
GetOptLong::longindex
int longindex
Definition:
getopt_cpp.h:28
GetOptLong::longopts
const struct option * longopts
Definition:
getopt_cpp.h:43
GetOptLong
Definition:
getopt_cpp.h:14
GetOptLong::error_return
error_return
Definition:
getopt_cpp.h:31
GetOptLong::option
Definition:
getopt_cpp.h:16
GetOptLong::option::flag
int * flag
Definition:
getopt_cpp.h:19
GetOptLong::place
const char * place
Definition:
getopt_cpp.h:44
GetOptLong::getoption
int getoption(void)
GetOptLong::optopt
int optopt
Definition:
getopt_cpp.h:27
Generated on Sun Jun 17 2018 14:18:48 for APM:Libraries by
1.8.13