1 /**********************************************************************
3 FILENAME: uiuc_menu_record.cpp
5 ----------------------------------------------------------------------
7 DESCRIPTION: reads input data for specified aircraft and creates
8 approporiate data storage space
10 ----------------------------------------------------------------------
14 ----------------------------------------------------------------------
16 REFERENCES: based on "menu reader" format of Michael Selig
18 ----------------------------------------------------------------------
20 HISTORY: 04/04/2003 initial release
21 06/30/2003 (RD) replaced istrstream with istringstream
22 to get rid of the annoying warning about
23 using the strstream header
24 07/17/2003 (RD) to speed up compile time, condensed
25 code and moved error checking to
28 ----------------------------------------------------------------------
30 AUTHOR(S): Robert Deters <rdeters@uiuc.edu>
31 Michael Selig <m-selig@uiuc.edu>
33 ----------------------------------------------------------------------
37 ----------------------------------------------------------------------
41 ----------------------------------------------------------------------
45 ----------------------------------------------------------------------
47 CALLED BY: uiuc_menu()
49 ----------------------------------------------------------------------
51 CALLS TO: check_float() if needed
57 ----------------------------------------------------------------------
59 COPYRIGHT: (C) 2003 by Michael Selig
61 This program is free software; you can redistribute it and/or
62 modify it under the terms of the GNU General Public License
63 as published by the Free Software Foundation.
65 This program is distributed in the hope that it will be useful,
66 but WITHOUT ANY WARRANTY; without even the implied warranty of
67 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
68 GNU General Public License for more details.
70 You should have received a copy of the GNU General Public License
71 along with this program; if not, write to the Free Software
72 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
73 USA or view http://www.gnu.org/copyleft/gpl.html.
75 **********************************************************************/
77 #include <simgear/compiler.h>
79 #if defined( __MWERKS__ )
80 // -dw- optimizer chokes (big-time) trying to optimize humongous
81 // loop/switch statements
82 #pragma optimization_level 0
89 #include "uiuc_menu_record.h"
99 void parse_record( const string& linetoken2, const string& linetoken3,
100 const string& linetoken4, const string& linetoken5,
101 const string& linetoken6, const string& linetoken7,
102 const string& linetoken8, const string& linetoken9,
103 const string& linetoken10, const string& aircraft_directory,
104 LIST command_line ) {
106 istringstream token3(linetoken3.c_str());
107 istringstream token4(linetoken4.c_str());
108 istringstream token5(linetoken5.c_str());
109 istringstream token6(linetoken6.c_str());
110 istringstream token7(linetoken7.c_str());
111 istringstream token8(linetoken8.c_str());
112 istringstream token9(linetoken9.c_str());
113 istringstream token10(linetoken10.c_str());
116 recordParts -> storeCommands (*command_line);