00001 // ===================================================================== 00024 // ===================================================================== 00025 #ifndef CLDAQ__TCOMMANDTABLE_HH 00026 #define CLDAQ__TCOMMANDTABLE_HH 00027 00028 #include "Tglobals.h" 00029 #include "TCommandSpecified.hh" 00030 00031 00051 class TCommandTable 00052 : public Tvector<TCommandSpecified> 00053 { 00054 00055 public: 00056 TCommandTable(); 00057 ~TCommandTable(); 00058 00059 public: 00060 TCommand* FindCommand( const Tstring& fullname ) const; 00061 TCommand* FindCommand( const Tstring& name, const Tstring& path ) const; 00062 Tbool AlreadyExist( TCommand* command ) const; 00063 Tbool AlreadyExist( const Tstring& fullname ) const; 00064 Tbool AlreadyExist( const Tstring& name, const Tstring& path ) const; 00065 Tbool AlreadyExistDirectory( const Tstring& path ) const; 00066 Tbool AlreadyExistDirectory( const Tstring& name, const Tstring& path ) const; 00067 Tvoid AddCommand( TCommand* command ); 00068 Tvoid RemoveCommand( Tint index ); 00069 Tint GetSize() const; 00070 Tvoid Clear(); 00071 TstringList GetDirectoryList( const Tstring& path = "/" ) const; 00072 TstringList GetCommandList( const Tstring& path = "/" ) const; 00073 TstringList Sort( const Tstring& path = "/" ) const; 00074 TstringList Sort( const TstringList& sort ) const; 00075 Tvoid List( Tint column, const TstringList& strlist ) const; 00076 Tvoid List( Tint column, const Tstring& path = "/" ) const; 00077 TCommandSpecified GetCommandSpecified( Tint index ) const; 00078 TCommandSpecified GetCommandSpecified( const Tstring& fullname ) const; 00079 00080 private: 00081 TCommandSpecified convert( TCommand* command ) const; 00082 00083 }; 00084 00085 #endif