00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
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
00078 bool operator < (const t_OptItem & O) const
00079 { return option < O.option; }
00080
00081
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
00091
00092
00093
00094
00095
00096 #endif