Args.h

Go to the documentation of this file.
00001 /* $Id: Args.h,v 1.8 2005/06/10 07:49:02 pfb Exp $ */
00002 
00003 #ifndef _Args_h
00004 #define _Args_h
00005 
00010 #include <string>
00011 #include <list>
00012 
00020 class Args
00021   {
00022   //****************************************************************************
00023                              public:
00024 
00031   Args(int argc, const char *const argv[]);
00032 
00036   virtual ~Args();
00037  
00042   Args(const Args& rhs);
00043 
00049   Args& operator=(const Args& rhs);
00050 
00056   bool operator==(const Args& rhs) const;
00057 
00063   bool operator!=(const Args& rhs) const;
00064 
00070   bool go() const;
00071 
00076   const std::string& argv0() const;
00077 
00082   virtual std::string usage() const;
00083 
00087   typedef std::list<std::string> ProblemReport;
00088 
00092   typedef ProblemReport::iterator ProblemReportIterator;
00093 
00097   typedef ProblemReport::const_iterator ConstProblemReportIterator;
00098 
00103   std::string report();
00104 
00109   bool existingProblems() const;
00110 
00111   //****************************************************************************
00112                              protected:
00113 
00118   void problem(const std::string argument);
00119 
00120   bool go_state;
00121 
00122   //****************************************************************************
00123                              private:
00124 
00128   void initializeReport();
00129 
00130   std::string argv_0;
00131   ProblemReport problem_report;
00132   ProblemReportIterator problem_iterator;
00133   bool problem_flag;
00134   bool problem_fifo_dirty;
00135   };
00136 
00137 /*
00138  * $Log: Args.h,v $
00139  * Revision 1.8  2005/06/10 07:49:02  pfb
00140  * Changes made as a result of dev. machine update from woody to sarge.
00141  * Most of the changes are because of the upgrade from gcc-2.95 to gcc-3.3.
00142  *
00143  * Revision 1.7  2005/05/10 17:08:02  pfb
00144  * Added module info.
00145  *
00146  * Revision 1.6  2003/05/08 01:20:35  pfb
00147  * Added argv0().
00148  *
00149  * Revision 1.5  2003/05/07 15:42:08  pfb
00150  * Added description.
00151  *
00152  * Revision 1.4  2002/07/14 04:32:23  pfb
00153  * Increased constness of ctor args.
00154  *
00155  * Revision 1.3  2002/07/13 02:42:43  pfb
00156  * Fixed report stuff.
00157  *
00158  * Revision 1.2  2002/07/12 07:03:34  pfb
00159  * Added existingProblems().
00160  *
00161  * Revision 1.1  2002/07/12 00:16:38  pfb
00162  * Initial rev.
00163  *
00164  *
00165  */
00166 
00167 /*
00168  * @}
00169  */
00170 #endif