]> git.mxchange.org Git - flightgear.git/blob - Main/options.hxx
Added an command line option to set starting position based on airport ID.
[flightgear.git] / Main / options.hxx
1 //
2 // options.hxx -- class to handle command line options
3 //
4 // Written by Curtis Olson, started April 1998.
5 //
6 // Copyright (C) 1998  Curtis L. Olson  - curt@me.umn.edu
7 //
8 // This program is free software; you can redistribute it and/or
9 // modify it under the terms of the GNU General Public License as
10 // published by the Free Software Foundation; either version 2 of the
11 // License, or (at your option) any later version.
12 //
13 // This program is distributed in the hope that it will be useful, but
14 // WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16 // General Public License for more details.
17 //
18 // You should have received a copy of the GNU General Public License
19 // along with this program; if not, write to the Free Software
20 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 //
22 // $Id$
23 // (Log is kept at end of this file)
24
25
26 #ifndef _OPTIONS_HXX
27 #define _OPTIONS_HXX
28
29
30 #ifndef __cplusplus                                                          
31 # error This library requires C++
32 #endif                                   
33
34
35 #define FG_OPTIONS_OK 0
36 #define FG_OPTIONS_HELP 1
37 #define FG_OPTIONS_ERROR 2
38
39
40 class fgOPTIONS {
41
42 public:
43
44     // ID of initial starting airport
45     char airport_id[5];
46
47     // HUD on/off
48     int hud_status;
49
50     // Offset true time by this many seconds
51     int time_offset;
52
53     // Constructor
54     fgOPTIONS( void );
55
56     // Parse the command line options
57     int parse( int argc, char **argv );
58
59     // Print usage message
60     void usage ( void );
61
62     // Destructor
63     ~fgOPTIONS( void );
64
65 };
66
67
68 extern fgOPTIONS current_options;
69
70
71 #endif /* _OPTIONS_HXX */
72
73
74 // $Log$
75 // Revision 1.2  1998/04/25 15:11:13  curt
76 // Added an command line option to set starting position based on airport ID.
77 //
78 // Revision 1.1  1998/04/24 00:49:21  curt
79 // Wrapped "#include <config.h>" in "#ifdef HAVE_CONFIG_H"
80 // Trying out some different option parsing code.
81 // Some code reorganization.
82 //
83 //