PlasCom2  1.0
XPACC Multi-physics simluation application
CheckResults.H
Go to the documentation of this file.
1 
7 #ifndef __CHECK_RESULTS_H__
8 #define __CHECK_RESULTS_H__
9 #include <sstream>
10 #include "ComLine.H"
11 
12 namespace ix
13 {
36  int CheckResults(int argc,char *argv[]);
37 
47  {
48  public:
50  : ix::util::ComLineObject()
51  {};
52  CheckResultsComLine(const char *args[])
53  : ix::util::ComLineObject(args)
54  {};
61  void Initialize(){
62  AddOption('h',"help");
63  AddOption('v',"verbosity",1);
64  AddOption('i',"identifier",3,"string");
65  AddOption('n',"name",2,"testname");
66  AddOption('r',"range",3,"lower:upper");
67  AddHelp("help","Prints this long version of help.");
68  AddHelp("verbosity","Sets the verbosity level to 1 or the specified level.");
69  std::ostringstream Ostr;
70  Ostr << "Sets the unique identifying string to <string>. The utility "
71  << "\n\t\tlooks for \"string\" to identify the input line containing"
72  << "\n\t\tthe result that should be checked. The numerical result is"
73  << "\n\t\texpected to be delimited by a colon (:). In other words..."
74  << "\n\t\tthe expected line format is as follows:"
75  << "\n\n\t\t\t string : <numerical entries>\n";
76  AddHelp("identifier",Ostr.str());
77  AddHelp("name","Sets the <testname> to be used for results output.");
78  AddHelp("range","Specifies the range to test against.");
79  Ostr.str("");
80  Ostr.clear();
81  // The following commented string formation is kept around to
82  // illustrate the required tabs and newlines to make the output
83  // look proper:
84  //
85  // Ostr << "Use fixed problem size in scalability analysis. Only makes"
86  // << "\n\t\tsense when scalability mode is enabled.";
87  // Ostr.str("");
88  Ostr.str("");
89  Ostr << "This utility reads a file off stdin, searches for the line with the indicated string"
90  << " and performs a numerical comparison of the numbers in that line with the specified"
91  << " range. The result is reported to stdout and the compliment is returned.";
92  _description.assign(Ostr.str());
93  };
94  };
95 
96 
97 };
98 #endif
The ComLineObject for the example programs.
Definition: CheckResults.H:46
Defines MPI-specific parallel global and program classes.
CheckResultsComLine(const char *args[])
Definition: CheckResults.H:52
std::string _description
application description.
Definition: ComLine.H:73
void AddOption(char s, const std::string &l, int=0)
User interface to describe simple option.
Definition: ComLine.C:295
ComLineObject header.
void Initialize()
This is where the actual options and arguments are described.
Definition: CheckResults.H:61
int CheckResults(int argc, char *argv[])
Check numerical results utility.
Definition: CheckResults.C:8
Command line processing.
Definition: ComLine.H:62
ComLineObject()
Default constructor.
Definition: ComLine.H:102
void AddHelp(char s, const std::string &help)
Specify usage for an option.
Definition: ComLine.H:227