00001 // ===================================================================== 00028 // ===================================================================== 00029 #ifndef CLDAQ__TCOMMANDTABLE_HH 00030 #define CLDAQ__TCOMMANDTABLE_HH 00031 00032 #include "Tglobals.h" 00033 #include "TCommandSpecified.hh" 00034 00035 00055 class TCommandTable 00056 : public Tvector<TCommandSpecified> 00057 { 00058 00059 public: 00060 TCommandTable(); 00061 ~TCommandTable(); 00062 00063 public: 00064 TCommand* FindCommand( const Tstring& fullname ) const; 00065 TCommand* FindCommand( const Tstring& name, const Tstring& path ) const; 00066 Tbool AlreadyExist( TCommand* command ) const; 00067 Tbool AlreadyExist( const Tstring& fullname ) const; 00068 Tbool AlreadyExist( const Tstring& name, const Tstring& path ) const; 00069 Tbool AlreadyExistDirectory( const Tstring& path ) const; 00070 Tbool AlreadyExistDirectory( const Tstring& name, const Tstring& path ) const; 00071 Tvoid AddCommand( TCommand* command ); 00072 Tvoid RemoveCommand( Tint index ); 00073 Tint GetSize() const; 00074 Tvoid Clear(); 00075 TstringList GetDirectoryList( const Tstring& path = "/" ) const; 00076 TstringList GetCommandList( const Tstring& path = "/" ) const; 00077 TstringList Sort( const Tstring& path = "/" ) const; 00078 TstringList Sort( const TstringList& sort ) const; 00079 Tvoid List( Tint column, const TstringList& strlist ) const; 00080 Tvoid List( Tint column, const Tstring& path = "/" ) const; 00081 TCommandSpecified GetCommandSpecified( Tint index ) const; 00082 TCommandSpecified GetCommandSpecified( const Tstring& fullname ) const; 00083 00084 private: 00085 TCommandSpecified convert( TCommand* command ) const; 00086 00087 #ifdef __CLDAQ_ROOT_DLL 00088 ClassDef(TCommandTable,0) 00089 #endif 00090 00091 }; 00092 00093 #endif