00001 // ===================================================================== 00024 // ===================================================================== 00025 #ifndef CLDAQ__TMODULESPECIFIED_HH 00026 #define CLDAQ__TMODULESPECIFIED_HH 00027 00028 #include "Tglobals.h" 00029 00030 class TModule; 00031 00032 00052 class TModuleSpecified 00053 { 00054 00055 private: 00056 Tstring theModuleID; 00057 TstringList theGroupIDs; 00058 TModule* theModule; 00059 00060 public: 00061 TModuleSpecified(); 00062 TModuleSpecified( const Tstring& id, const TstringList& groups, TModule* module ); 00063 TModuleSpecified( const TModuleSpecified& right ); 00064 ~TModuleSpecified(); 00065 00066 public: 00067 const TModuleSpecified& operator=( const TModuleSpecified& right ); 00068 Tbool operator==( const TModuleSpecified& right ) const; 00069 Tbool operator!=( const TModuleSpecified& right ) const; 00070 friend Tostream& operator<<( Tostream& tos, const TModuleSpecified& right ); 00071 00072 public: 00073 const Tstring& GetModuleID() const; 00074 Tstring& GetModuleID(); 00075 const TstringList& GetGroupIDs() const; 00076 TstringList& GetGroupIDs(); 00077 TModule* GetModule() const; 00078 Tvoid SetModuleID( const Tstring& id ); 00079 Tvoid SetGroupIDs( const TstringList& ids ); 00080 Tvoid SetModule( TModule* module ); 00081 Tbool IsSameGroup( const TModuleSpecified& spec ); 00082 Tbool IsSameGroup( const TstringList& groups ); 00083 Tbool IsSameGroup( const Tstring& group ); 00084 00085 }; 00086 00087 inline const Tstring& TModuleSpecified::GetModuleID() const 00088 { 00089 return theModuleID; 00090 } 00091 00092 inline Tstring& TModuleSpecified::GetModuleID() 00093 { 00094 return theModuleID; 00095 } 00096 00097 inline const TstringList& TModuleSpecified::GetGroupIDs() const 00098 { 00099 return theGroupIDs; 00100 } 00101 00102 inline TstringList& TModuleSpecified::GetGroupIDs() 00103 { 00104 return theGroupIDs; 00105 } 00106 00107 inline TModule* TModuleSpecified::GetModule() const 00108 { 00109 return theModule; 00110 } 00111 00112 inline Tvoid TModuleSpecified::SetModuleID( const Tstring& id ) 00113 { 00114 theModuleID = id; 00115 return; 00116 } 00117 00118 inline Tvoid TModuleSpecified::SetGroupIDs( const TstringList& ids ) 00119 { 00120 theGroupIDs = ids; 00121 return; 00122 } 00123 00124 inline Tvoid TModuleSpecified::SetModule( TModule* module ) 00125 { 00126 theModule = module; 00127 return; 00128 } 00129 00130 #endif