00001 // ===================================================================== 00024 // ===================================================================== 00025 #ifndef CLDAQ__TRUNINFORMATION_HH 00026 #define CLDAQ__TRUNINFORMATION_HH 00027 00028 #include "Tglobals.h" 00029 00030 class TOutputHtmlFileStream; 00031 00032 00052 class TRunInformation 00053 { 00054 00055 private: 00056 Truninfo_t theInformationType; 00057 Tstring theItem; 00058 Tstring theDefaultValue; 00059 Tstring theValue; 00060 TstringList theSelectableList; 00061 00062 public: 00063 TRunInformation(); 00064 TRunInformation( const Tstring& item ); 00065 TRunInformation( const Tstring& item, Truninfo_t type ); 00066 TRunInformation( const Tstring& item, const TstringList& list ); 00067 TRunInformation( const Tstring& item, const Tstring& value ); 00068 TRunInformation( const Tstring& item, const Tstring& value, Truninfo_t type ); 00069 TRunInformation( const Tstring& item, const Tstring& value, const TstringList& list ); 00070 TRunInformation( const TRunInformation& right ); 00071 ~TRunInformation(); 00072 00073 public: 00074 const TRunInformation& operator=( const TRunInformation& right ); 00075 Tbool operator==( const TRunInformation& right ) const; 00076 Tbool operator!=( const TRunInformation& right ) const; 00077 friend Tostream& operator<<( Tostream& tos, const TRunInformation& right ); 00078 friend TOutputHtmlFileStream& operator<<( TOutputHtmlFileStream& html, const TRunInformation& right ); 00079 friend Tvoid SetInformation( TRunInformation& info ); 00080 00081 public: 00082 Truninfo_t GetInformationType() const; 00083 const Tstring& GetItem() const; 00084 const Tstring& GetDefaultValue() const; 00085 const Tstring& GetValue() const; 00086 const TstringList& GetSelectableList() const; 00087 Tvoid SetInformationType( Truninfo_t info ); 00088 Tvoid SetItem( const Tstring& item ); 00089 Tvoid SetDefaultValue( const Tstring& value ); 00090 Tvoid SetValue( const Tstring& value ); 00091 Tvoid SetSelectableList( const TstringList& list ); 00092 00093 public: 00094 Tvoid Clear(); 00095 00096 private: 00097 Tvoid setFreeValue(); 00098 Tvoid setSelectableValue(); 00099 Tvoid setFreeText(); 00100 Tvoid setInformation(); 00101 00102 }; 00103 00104 inline Truninfo_t TRunInformation::GetInformationType() const 00105 { 00106 return theInformationType; 00107 } 00108 00109 inline const Tstring& TRunInformation::GetItem() const 00110 { 00111 return theItem; 00112 } 00113 00114 inline const Tstring& TRunInformation::GetDefaultValue() const 00115 { 00116 return theDefaultValue; 00117 } 00118 00119 inline const Tstring& TRunInformation::GetValue() const 00120 { 00121 return theValue; 00122 } 00123 00124 inline const TstringList& TRunInformation::GetSelectableList() const 00125 { 00126 return theSelectableList; 00127 } 00128 00129 inline Tvoid TRunInformation::SetInformationType( Truninfo_t info ) 00130 { 00131 theInformationType = info; 00132 return; 00133 } 00134 00135 inline Tvoid TRunInformation::SetItem( const Tstring& item ) 00136 { 00137 theItem = item; 00138 return; 00139 } 00140 00141 inline Tvoid TRunInformation::SetDefaultValue( const Tstring& value ) 00142 { 00143 theDefaultValue = value; 00144 return; 00145 } 00146 00147 inline Tvoid TRunInformation::SetValue( const Tstring& value ) 00148 { 00149 theValue = value; 00150 return; 00151 } 00152 00153 inline Tvoid TRunInformation::SetSelectableList( const TstringList& list ) 00154 { 00155 theSelectableList = list; 00156 theInformationType = tInfoSelectableValue; 00157 return; 00158 } 00159 00160 #endif