File: weaponguide.h

package info (click to toggle)
asc 2.6.1.0-9
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 81,740 kB
  • sloc: cpp: 158,704; sh: 11,544; ansic: 6,736; makefile: 604; perl: 138
file content (85 lines) | stat: -rw-r--r-- 1,766 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
/******************************************************************************
**
** weaponguide.h
**
** Sat Aug 14 10:57:18 2004
** Linux 2.4.21-198-default (#1 Thu Mar 11 17:43:56 UTC 2004) i686
** martin@linux. (Martin Bickel)
**
** Header file for command line parser class
**
** Automatically created by genparse v0.5.2
**
** See http://genparse.sourceforge.net/ for details and updates
**
******************************************************************************/

#ifndef CMDLINE_H
#define CMDLINE_H

#include <iostream>
#include <string>

/*----------------------------------------------------------------------------
**
** class Cmdline
**
** command line parser class
**
**--------------------------------------------------------------------------*/

class Cmdline
{
private:
  /* parameters */
  string _c;
  int _r;
  string _d;
  string _l;
  int _s;
  bool _i;
  int _z;
  string _f;
  string _t;
  string _m;
  bool _b;
  string _roottech;
  bool _writeall;
  bool _h;
  bool _v;

  /* other stuff to keep track of */
  string _executable;
  int _optind;

public:
  /* constructor and destructor */
  Cmdline(int, char **) throw(string);
  ~Cmdline(){}

  /* usage function */
  void usage();

  /* return next (non-option) parameter */
  int next_param() { return _optind; }

  /* callback functions */

  string c() { return _c; }
  int r() { return _r; }
  string d() { return _d; }
  string l() { return _l; }
  int s() { return _s; }
  bool i() { return _i; }
  int z() { return _z; }
  string f() { return _f; }
  string t() { return _t; }
  string m() { return _m; }
  bool b() { return _b; }
  string roottech() { return _roottech; }
  bool writeall() { return _writeall; }
  bool h() { return _h; }
  bool v() { return _v; }
};

#endif