#include <iostream>
#include <vector>
#include <list>
#include <sstream>
#include "clop.H"
#include "FC.h"
Go to the source code of this file.
Definition at line 64 of file utilities/rocflu/init/main.C.
70 cout << endl <<
"Usage: " << pn <<
" -c <casename> [-v 0-2]" << endl << endl
71 <<
" -c | --casename : Specifies the casename" << endl
72 <<
" -v | --verbosity : Verbosity level:" << endl
73 <<
" 0 - Quiet" << endl
74 <<
" 1 - Moderately verbose" << endl
75 <<
" 2 - Ridiculously verbose" << endl
int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
Definition at line 80 of file utilities/rocflu/init/main.C.
References AddOp(), FC_GLOBAL, GetOp(), rfluinit(), RFLUINIT, stripdir(), Usage(), and Vectize().
84 vector<string> args =
Vectize((
const char **)argv,argc);
88 string program_name(
stripdir(args[0]));
91 AddOp(
"casename",
'c');
92 AddOp(
"verbosity",
'v');
103 if(help =
GetOp(
"help",args)){
109 if(
GetOp(
"casename",casename,args)){
110 if(casename.empty()){
112 <<
": Expected casename after casename option."
113 <<
" Use -h for usage instructions."
120 <<
": Missing required casename option."
121 <<
" Use -h for usage instructions."
127 if(
GetOp(
"verbosity",sverb,args)){
130 <<
": Expected verbosity level. "
131 <<
"Use -h for usage instructions." << endl;
134 istringstream Istr(sverb);
136 if(verbosity < 0 || verbosity > 2){
138 <<
": Invalid verbosity value. Use -h for usage "
139 <<
"instructions." << endl;
subroutine rfluinit(caseString, verbLevel)
const string stripdir(const string &)
bool GetOp(const string &ops, const vector< string > &args)
void AddOp(const string &lo, const char &so)
void Usage(const string &pn)
#define FC_GLOBAL(name, NAME)
vector< string > Vectize(const char **)