2015-03-23 21:03:14 +00:00
|
|
|
/*
|
2015-02-26 15:02:31 +00:00
|
|
|
PURPOSE: ( Handle the simulation command line args )
|
|
|
|
|
|
|
|
REFERENCE: ( Trick Simulation Environment )
|
|
|
|
|
|
|
|
ASSUMPTIONS AND LIMITATIONS: ( None )
|
|
|
|
|
|
|
|
CLASS: ( N/A )
|
|
|
|
|
|
|
|
LIBRARY DEPENDENCY: ( None )
|
|
|
|
|
|
|
|
PROGRAMMERS: ( Keith Vetter LinCom 6/2003 ) */
|
|
|
|
|
|
|
|
#include <iostream>
|
|
|
|
#include <string.h>
|
|
|
|
|
2015-06-01 15:28:29 +00:00
|
|
|
#include "trick/InputProcessor.hh"
|
|
|
|
#include "trick/command_line_protos.h"
|
2015-02-26 15:02:31 +00:00
|
|
|
|
|
|
|
Trick::InputProcessor * the_ip ;
|
|
|
|
|
|
|
|
Trick::InputProcessor::InputProcessor() {
|
|
|
|
|
|
|
|
the_ip = this ;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
int Trick::InputProcessor::process_sim_args() {
|
|
|
|
|
|
|
|
int i ;
|
|
|
|
int argc ;
|
|
|
|
char ** argv ;
|
|
|
|
|
|
|
|
argc = command_line_args_get_argc() ;
|
|
|
|
argv = command_line_args_get_argv() ;
|
|
|
|
input_file = command_line_args_get_input_file() ;
|
|
|
|
|
|
|
|
/* Process all other calling arguments */
|
|
|
|
for (i = 2; i < argc; i++) {
|
|
|
|
|
2016-11-08 09:25:07 +00:00
|
|
|
/*
|
2015-02-26 15:02:31 +00:00
|
|
|
* If there are more than 2 calling arguments
|
|
|
|
*/
|
|
|
|
|
2016-04-26 20:57:33 +00:00
|
|
|
if (!strcmp("-d", argv[i])) {
|
2015-02-26 15:02:31 +00:00
|
|
|
/* Set the 'input verification only' and echo input flags */
|
|
|
|
verify_input = 1 ;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return(0) ;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
int Trick::InputProcessor::shutdown() {
|
|
|
|
return(0) ;
|
|
|
|
}
|
|
|
|
|