00001 // ============================================================================ 00021 // ============================================================================ 00022 #ifndef CLDAQ__TOPTIONTABLE_HH 00023 #define CLDAQ__TOPTIONTABLE_HH 00024 00025 #include "Tglobals.h" 00026 #include "TOption.hh" 00027 #include "TOptionList.hh" 00028 00029 00049 class TOptionTable 00050 { 00051 00052 private: 00053 TOptionList theOptionList; 00054 00055 public: 00056 TOptionTable(); 00057 TOptionTable( const TOptionList& options ); 00058 TOptionTable( const TOption* options, Tint noption = 1 ); 00059 TOptionTable( const TOptionTable& right ); 00060 ~TOptionTable(); 00061 00062 public: 00063 const TOptionTable& operator=( const TOptionTable& right ); 00064 00065 public: 00066 friend Tostream& operator<<( Tostream& tos, const TOptionTable& right ); 00067 00068 public: 00069 Tvoid SetDefaultOption(); 00070 Tvoid SetOption( const TOption& option ); 00071 00072 public: 00073 const TOptionList& GetOptionList() const; 00074 TOptionList& GetOptionList(); 00075 Tvoid SetOptionList( const TOptionList& options ); 00076 00077 private: 00078 Tvoid dupcheck() const; 00079 00080 }; 00081 00082 inline const TOptionList& TOptionTable::GetOptionList() const 00083 { 00084 return theOptionList; 00085 } 00086 00087 inline TOptionList& TOptionTable::GetOptionList() 00088 { 00089 return theOptionList; 00090 } 00091 00092 inline Tvoid TOptionTable::SetOptionList( const TOptionList& options ) 00093 { 00094 theOptionList = options; 00095 return; 00096 } 00097 00098 #endif