Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

boss_optitem.h

Go to the documentation of this file.
00001 /* boss_optitem.h    $Revision: 1.2 $ $Date: 2005/12/10 20:33:54 $
00002    Copyright (C) 1998 University of Bonn.
00003    http://www.ikp.uni-bonn.de/boss
00004 
00005    This program is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU General Public License
00007    as published by the Free Software Foundation; either version 2
00008    of the License, or (at your option) any later version.
00009 
00010    This program is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013    GNU General Public License for more details.
00014 
00015    You should have received a copy of the GNU General Public License
00016    along with this program; if not, write to the Free Software
00017    Foundation, Inc., 59 Temple Place - Suite 330,
00018    Boston, MA  02111-1307, USA.
00019 */
00020 
00021 //   @author Karlheinz Stoeber
00022 
00023 #ifndef __BOSS_OPTITEMH__
00024 #define __BOSS_OPTITEMH__
00025 
00026 using namespace std;
00027 
00028 #include <iostream>
00029 #include <vector>
00030 #include <map>
00031 #include <list>
00032 #include <algorithm>
00033 #include <string>
00034 
00035 namespace BOSS {
00036   
00037   typedef const char * t_ConstCharPtr;
00038   
00040   class t_OptItem {
00041   public:
00043     string option;
00044     
00046     string optionarg;
00047     
00051     bool   optiontype;
00052   
00054     bool   optionflag;
00055   
00056     t_OptItem() : optionflag(false) { ; }
00057   
00058     t_OptItem(const string & o, const string & oa, const bool ot) :
00059       option(o), optionarg(oa), optiontype(ot), optionflag(false) { ; }
00060   
00061     t_OptItem(const string & o, const string & oa, const bool ot, const bool of) :
00062       option(o), optionarg(oa), optiontype(ot), optionflag(of) { ; }
00063 
00064     t_OptItem(const t_OptItem & O)
00065       {
00066         option     = O.option;     optionarg  = O.optionarg;
00067         optiontype = O.optiontype; optionflag = O.optionflag;
00068       }
00069   
00070     t_OptItem & operator = (const t_OptItem & O)
00071       {
00072         option     = O.option;     optionarg  = O.optionarg;
00073         optiontype = O.optiontype; optionflag = O.optionflag;
00074         return *this;
00075       }
00076   
00077     // Makes the Visual C++ Compiler happy
00078     bool operator < (const t_OptItem & O) const
00079       { return option < O.option; }
00080   
00081     // Makes the Visual C++ Compiler happy
00082     bool operator == (const t_OptItem & O) const
00083       {
00084         return option == O.option         && optionarg == O.optionarg    &&
00085           optionflag == O.optionflag && optiontype == O.optiontype;
00086       }
00087   };
00088 }
00089 /*
00090 ostream & operator << (ostream & s, const BOSS::t_OptItem & O)
00091 {
00092   return s << O.option << " " << O.optionarg << " " << O.optionflag;
00093 }
00094 */
00095 
00096 #endif

Generated on Tue Dec 20 23:14:38 2005 for BOSS by doxygen 1.3.6