00001 // ===================================================================== 00002 // $Id: TCommandSpecified.hh,v 1.1.1.1 2003/06/27 02:56:41 goiwai Exp $ 00003 // $Name: CLDAQ-1-06-02 $ 00004 // ===================================================================== 00005 #ifndef __TCOMMANDSPECIFIED_HH 00006 #define __TCOMMANDSPECIFIED_HH 00007 00008 #include "Tglobals.h" 00009 00010 class TCommand; 00011 00012 00013 class TCommandSpecified 00014 { 00015 public: 00016 enum { 00017 tBuiltinDepth = -1, 00018 tAliasDepth = -2, 00019 tNotDefineDepth = 0x8fffffff 00020 }; 00021 00022 private: 00023 Tstring theName; 00024 Tstring theFullName; 00025 Tstring theAbsolutePath; 00026 Tint theDirectoryDepth; 00027 Tbool theBuiltinFlag; 00028 TCommand* theCommand; 00029 00030 public: 00031 TCommandSpecified(); 00032 TCommandSpecified( const Tstring& name, const Tstring& fullname, const Tstring& path, Tint depth, Tbool flag, TCommand* command ); 00033 TCommandSpecified( const TCommandSpecified& right ); 00034 ~TCommandSpecified(); 00035 00036 public: 00037 const TCommandSpecified& operator=( const TCommandSpecified& right ); 00038 Tbool operator==( const TCommandSpecified& right ) const; 00039 Tbool operator!=( const TCommandSpecified& right ) const; 00040 00041 public: 00042 friend Tostream& operator<<( Tostream& tos, const TCommandSpecified& right ); 00043 00044 public: 00045 const Tstring& GetName() const; 00046 const Tstring& GetFullName() const; 00047 const Tstring& GetAbsolutePath() const; 00048 Tint GetDirectoryDepth() const; 00049 Tbool IsBuiltinCommand() const; 00050 Tbool IsAliasedCommand() const; 00051 TCommand* GetCommand() const; 00052 Tvoid SetName( const Tstring& name ); 00053 Tvoid SetFullName( const Tstring& name ); 00054 Tvoid SetAbsolutePath( const Tstring& path ); 00055 Tvoid SetDirectoryDepth( Tint depth ); 00056 Tvoid SetBuiltinFlag( Tbool flag ); 00057 Tvoid SetCommand( TCommand* command ); 00058 00059 }; 00060 00061 inline const Tstring& TCommandSpecified::GetName() const 00062 { 00063 return( theName ); 00064 } 00065 00066 inline const Tstring& TCommandSpecified::GetFullName() const 00067 { 00068 return( theFullName ); 00069 } 00070 00071 inline const Tstring& TCommandSpecified::GetAbsolutePath() const 00072 { 00073 return( theAbsolutePath ); 00074 } 00075 00076 inline Tint TCommandSpecified::GetDirectoryDepth() const 00077 { 00078 return( theDirectoryDepth ); 00079 } 00080 00081 inline Tbool TCommandSpecified::IsBuiltinCommand() const 00082 { 00083 return( theBuiltinFlag ); 00084 } 00085 00086 inline Tbool TCommandSpecified::IsAliasedCommand() const 00087 { 00088 return( theDirectoryDepth == tAliasDepth ); 00089 } 00090 00091 inline TCommand* TCommandSpecified::GetCommand() const 00092 { 00093 return( theCommand ); 00094 } 00095 00096 inline Tvoid TCommandSpecified::SetName( const Tstring& name ) 00097 { 00098 theName = name; 00099 return; 00100 } 00101 00102 inline Tvoid TCommandSpecified::SetFullName( const Tstring& name ) 00103 { 00104 theFullName = name; 00105 return; 00106 } 00107 00108 inline Tvoid TCommandSpecified::SetAbsolutePath( const Tstring& path ) 00109 { 00110 theAbsolutePath = path; 00111 return; 00112 } 00113 00114 inline Tvoid TCommandSpecified::SetDirectoryDepth( Tint depth ) 00115 { 00116 theDirectoryDepth = depth; 00117 return; 00118 } 00119 00120 inline Tvoid TCommandSpecified::SetBuiltinFlag( Tbool flag ) 00121 { 00122 theBuiltinFlag = flag; 00123 return; 00124 } 00125 00126 inline Tvoid TCommandSpecified::SetCommand( TCommand* command ) 00127 { 00128 theCommand = command; 00129 return; 00130 } 00131 00132 #endif