OpenADFortTk (basic)
src/whirl2xaif/Args.h
Go to the documentation of this file.
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 public:
00039   // Parsed Data: Command
00040   const std::string& GetCmd() const { return parser.GetCmd(); }
00041 
00042   // Parsed Data: optional arguments
00043   std::string xaifFileNm;
00044   std::string tmpVarPrefix;
00045   int debug;   // default: 0 (off)
00046   
00047   // Parsed Data: arguments
00048   std::string whirlFileNm;
00049   
00050   // force simple loop construct
00051   static bool ourSimpleLoopFlag;
00052 
00053   // do not filter uddu chains by basic block
00054   static bool ourDoNotFilterFlag; 
00055 
00056   // don't print a time stamp
00057   static bool ourNoTimeStampFlag;
00058 
00059   // do not require useful analysis
00060   static bool ourVariedOnlyFlag; 
00061 
00062   // uniformly activate all variables in a common block if one is active 
00063   static bool ourUniformCBactFlag; 
00064 
00065   // activate all floating point variables
00066   static bool ourAllActiveFlag; 
00067 
00068 private:
00069   void Ctor();
00070 
00071 private:
00072   static CmdLineParser::OptArgDesc optArgs[];
00073   CmdLineParser parser;
00074 }; 
00075 
00076 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines