77 int main(
int argc,
char* argv[])
82 if( argc - optind < 1 ) {
88 std::ifstream infile( argv[ optind ], std::ios::in );
90 std::cerr <<
"\aError: could not open file " << argv[ optind ] <<
std::endl;
94 std::stringstream sstream;
119 const char*
const short_options =
"c:sqihv";
121 const struct option long_options[] = {
122 {
"config", required_argument, 0,
'c' },
123 {
"silent", no_argument, 0,
's' },
124 {
"quiet", no_argument, 0,
'q' },
125 {
"insensitive", no_argument, 0,
'i' },
126 {
"help", no_argument, 0,
'h' },
127 {
"version", no_argument, 0,
'v' },
132 next_option = getopt_long( argc, argv,
133 short_options, long_options, NULL );
135 switch( next_option ) {
164 }
while( next_option != -1 );
170 <<
"Copyright (C) Matteo Vescovi." <<
std::endl 171 <<
"This is free software; see the source for copying conditions. There is NO" <<
std::endl 172 <<
"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE," <<
std::endl 173 <<
"to the extent permitted by law." <<
std::endl;
180 <<
" -c, --config CONFIG use config file CONFIG" <<
std::endl 181 <<
" -i, --insensitive case insensitive mode" <<
std::endl 182 <<
" -q, --quiet quiet mode, no verbose output, same as silent" <<
std::endl 183 <<
" -s, --silent silent mode, no verbose output, same as quiet" <<
std::endl 184 <<
" -h, --help display this help and exit" <<
std::endl 185 <<
" -v, --version output version information and exit" <<
std::endl 187 <<
"Direct your bug reports to: " << PACKAGE_BUGREPORT <<
std::endl;
void parseCommandLineArgs(int argc, char *argv[])
const char DEFAULT_BLANKSPACE_CHARS[]
const char PROGRAM_NAME[]
const std::string m_empty
~SimulatorPresageCallback()
std::string get_future_stream() const
int main(int argc, char *argv[])
void simulate(std::string)
virtual bool hasMoreTokens() const
std::stringstream & m_sstream
void lowercaseMode(const bool)
virtual std::string nextToken()
std::string get_past_stream() const
SimulatorPresageCallback(std::stringstream &sstream)
const Logger< _charT, _Traits > & endl(const Logger< _charT, _Traits > &lgr)
const char DEFAULT_SEPARATOR_CHARS[]