PlasCom2  1.0
XPACC Multi-physics simluation application
DiffDataFiles.H
Go to the documentation of this file.
1 #ifndef __DIFF_DATA_FILES_H__
8 #define __DIFF_DATA_FILES_H__
9 
10 namespace ix
11 {
12 
17  {
18  public:
20  : ix::util::ComLineObject()
21  {};
22  DDFComLine(const char *args[])
23  : ix::util::ComLineObject(args)
24  {};
25  void Initialize(){
26  std::ostringstream Ostr;
27  AddArgument("file1",1);
28  AddArgHelp("file1","First file to read in for comparison against file2.");
29  AddArgument("file2",1);
30  AddArgHelp("file2","Second file to read in for comparison against file1.");
31  AddOption('h',"help");
32  AddHelp("help","Print out long version of help and exit.");
33  AddOption('v',"verblevel",1,"level");
34  AddHelp("verblevel","Set the verbosity level. (default = 1)");
35  AddOption('o',"output",2,"filename");
36  AddHelp("output","Set the output file to <filename>. (default = stdout)");
37  AddOption('t',"tolerance",1,"tolerance");
38  Ostr << "Set the numerical tolerance for comparing numbers to <tolerance>."
39  << "\n\t\t(The default for the tolerance is 1.0e-12.)"
40  << "\n\t\t(The default behavior without -t is to compare numbers as strings.)"
41  << "\n\t\t(This flag will automatically force the -b flag to be used.)";
42  AddHelp("tolerance",Ostr.str());
43  AddOption('n',"numbers");
44  Ostr.str("");
45  Ostr << "Only compare the numbers in the two files."
46  << "\n\t\t(This flag will automatically force the -t flag to be used.)";
47  AddHelp("numbers",Ostr.str());
48  AddOption('b',"blank");
49  AddHelp("blank","Ignore blank space between words (or numbers).");
50  Ostr.str("");
51  Ostr << "Command-line interface for comparing data files.";
52  _description.assign(Ostr.str());
53  };
54  };
55 
77  int DiffDataFiles(int argc,char *argv[]);
78 
79 };
80 #endif
void Initialize()
virtual function for program specific Initialization.
Definition: DiffDataFiles.H:25
Defines MPI-specific parallel global and program classes.
std::string _description
application description.
Definition: ComLine.H:73
int DiffDataFiles(int argc, char *argv[])
Compare two data files within a given tolerance.
Definition: DiffDataFiles.C:30
void AddOption(char s, const std::string &l, int=0)
User interface to describe simple option.
Definition: ComLine.C:295
DDFComLine(const char *args[])
Definition: DiffDataFiles.H:22
Command line processing.
Definition: ComLine.H:62
void AddArgument(const std::string &a, int reqd=0)
User interface to describe an application argument.
Definition: ComLine.H:183
ComLineObject()
Default constructor.
Definition: ComLine.H:102
ComLine object for test running utility.
Definition: DiffDataFiles.H:16
void AddHelp(char s, const std::string &help)
Specify usage for an option.
Definition: ComLine.H:227
void AddArgHelp(const std::string &a, const std::string &help)
Specify the usage info for application argument.
Definition: ComLine.H:197