00001 // ===================================================================== 00002 // $Id: TCommandTable.hh,v 1.1.1.1 2003/06/27 02:56:41 goiwai Exp $ 00003 // $Name: CLDAQ-1-06-02 $ 00004 // ===================================================================== 00005 #ifndef __TCOMMANDTABLE_HH 00006 #define __TCOMMANDTABLE_HH 00007 00008 #include "Tglobals.h" 00009 #include "TCommandSpecified.hh" 00010 00011 class TCommandTable 00012 : public Tvector<TCommandSpecified> 00013 { 00014 00015 public: 00016 TCommandTable(); 00017 ~TCommandTable(); 00018 00019 public: 00020 TCommand* FindCommand( const Tstring& fullname ) const; 00021 TCommand* FindCommand( const Tstring& name, const Tstring& path ) const; 00022 Tbool AlreadyExist( TCommand* command ) const; 00023 Tbool AlreadyExist( const Tstring& fullname ) const; 00024 Tbool AlreadyExist( const Tstring& name, const Tstring& path ) const; 00025 Tbool AlreadyExistDirectory( const Tstring& path ) const; 00026 Tbool AlreadyExistDirectory( const Tstring& name, const Tstring& path ) const; 00027 Tvoid AddCommand( TCommand* command ); 00028 Tvoid RemoveCommand( Tint index ); 00029 Tint GetSize() const; 00030 Tvoid Clear(); 00031 TstringList GetDirectoryList( const Tstring& path = "/" ) const; 00032 TstringList GetCommandList( const Tstring& path = "/" ) const; 00033 TstringList Sort( const Tstring& path = "/" ) const; 00034 TstringList Sort( const TstringList& sort ) const; 00035 Tvoid List( Tint column, const TstringList& strlist ) const; 00036 Tvoid List( Tint column, const Tstring& path = "/" ) const; 00037 TCommandSpecified GetCommandSpecified( Tint index ) const; 00038 TCommandSpecified GetCommandSpecified( const Tstring& fullname ) const; 00039 00040 private: 00041 TCommandSpecified convert( TCommand* command ) const; 00042 00043 }; 00044 00045 #endif