|
OpenADFortTk (basic)
|
00001 // ########################################################## 00002 // # This file is part of OpenADFortTk. # 00003 // # The full COPYRIGHT notice can be found in the top # 00004 // # level directory of the OpenADFortTk source tree. # 00005 // # For more information visit # 00006 // # http://www.mcs.anl.gov/openad # 00007 // ########################################################## 00008 00009 #ifndef Args_h 00010 #define Args_h 00011 00012 #include <iostream> 00013 #include <string> 00014 00015 #include <CmdLineParser.h> 00016 00017 class Args { 00018 public: 00019 Args() ; 00020 Args(int argc, const char* const argv[]); 00021 ~Args(); 00022 00023 // Parse the command line 00024 void Parse(int argc, const char* const argv[]); 00025 00026 // Version and Usage information 00027 void PrintVersion(std::ostream& os) const; 00028 void PrintUsage(std::ostream& os) const; 00029 00030 // Error 00031 void PrintError(std::ostream& os, const char* msg) const; 00032 void PrintError(std::ostream& os, const std::string& msg) const; 00033 00034 // Dump 00035 void Dump(std::ostream& os = std::cerr) const; 00036 void DDump() const; 00037 00038 // Parsed Data: Command 00039 const std::string& GetCmd() const { return parser.GetCmd(); } 00040 00041 // Parsed Data: optional arguments 00042 std::string sexpFileNm; 00043 int debug; // default: 0 (off) 00044 00045 // Parsed Data: arguments 00046 std::string whirlFileNm; 00047 00048 bool myNoCleanUpFlag; 00049 00050 private: 00051 static CmdLineParser::OptArgDesc optArgs[]; 00052 CmdLineParser parser; 00053 }; 00054 00055 #endif