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