00001 // ===================================================================== 00024 // ===================================================================== 00025 #ifndef CLDAQ__TCOMMANDSPECIFIED_HH 00026 #define CLDAQ__TCOMMANDSPECIFIED_HH 00027 00028 #include "Tglobals.h" 00029 00030 class TCommand; 00031 00032 00033 00053 class TCommandSpecified 00054 { 00055 public: 00056 enum { 00057 tBuiltinDepth = -1, 00058 tAliasDepth = -2, 00059 tNotDefineDepth = 0x8fffffff 00060 }; 00061 00062 private: 00063 Tstring theName; 00064 Tstring theFullName; 00065 Tstring theAbsolutePath; 00066 Tint theDirectoryDepth; 00067 Tbool theBuiltinFlag; 00068 TCommand* theCommand; 00069 00070 public: 00071 TCommandSpecified(); 00072 TCommandSpecified( const Tstring& name, const Tstring& fullname, const Tstring& path, Tint depth, Tbool flag, TCommand* command ); 00073 TCommandSpecified( const TCommandSpecified& right ); 00074 ~TCommandSpecified(); 00075 00076 public: 00077 const TCommandSpecified& operator=( const TCommandSpecified& right ); 00078 Tbool operator==( const TCommandSpecified& right ) const; 00079 Tbool operator!=( const TCommandSpecified& right ) const; 00080 00081 public: 00082 friend Tostream& operator<<( Tostream& tos, const TCommandSpecified& right ); 00083 00084 public: 00085 const Tstring& GetName() const; 00086 const Tstring& GetFullName() const; 00087 const Tstring& GetAbsolutePath() const; 00088 Tint GetDirectoryDepth() const; 00089 Tbool IsBuiltinCommand() const; 00090 Tbool IsAliasedCommand() const; 00091 TCommand* GetCommand() const; 00092 Tvoid SetName( const Tstring& name ); 00093 Tvoid SetFullName( const Tstring& name ); 00094 Tvoid SetAbsolutePath( const Tstring& path ); 00095 Tvoid SetDirectoryDepth( Tint depth ); 00096 Tvoid SetBuiltinFlag( Tbool flag ); 00097 Tvoid SetCommand( TCommand* command ); 00098 00099 }; 00100 00101 inline const Tstring& TCommandSpecified::GetName() const 00102 { 00103 return theName; 00104 } 00105 00106 inline const Tstring& TCommandSpecified::GetFullName() const 00107 { 00108 return theFullName; 00109 } 00110 00111 inline const Tstring& TCommandSpecified::GetAbsolutePath() const 00112 { 00113 return theAbsolutePath; 00114 } 00115 00116 inline Tint TCommandSpecified::GetDirectoryDepth() const 00117 { 00118 return theDirectoryDepth; 00119 } 00120 00121 inline Tbool TCommandSpecified::IsBuiltinCommand() const 00122 { 00123 return theBuiltinFlag; 00124 } 00125 00126 inline Tbool TCommandSpecified::IsAliasedCommand() const 00127 { 00128 return theDirectoryDepth == tAliasDepth; 00129 } 00130 00131 inline TCommand* TCommandSpecified::GetCommand() const 00132 { 00133 return theCommand; 00134 } 00135 00136 inline Tvoid TCommandSpecified::SetName( const Tstring& name ) 00137 { 00138 theName = name; 00139 return; 00140 } 00141 00142 inline Tvoid TCommandSpecified::SetFullName( const Tstring& name ) 00143 { 00144 theFullName = name; 00145 return; 00146 } 00147 00148 inline Tvoid TCommandSpecified::SetAbsolutePath( const Tstring& path ) 00149 { 00150 theAbsolutePath = path; 00151 return; 00152 } 00153 00154 inline Tvoid TCommandSpecified::SetDirectoryDepth( Tint depth ) 00155 { 00156 theDirectoryDepth = depth; 00157 return; 00158 } 00159 00160 inline Tvoid TCommandSpecified::SetBuiltinFlag( Tbool flag ) 00161 { 00162 theBuiltinFlag = flag; 00163 return; 00164 } 00165 00166 inline Tvoid TCommandSpecified::SetCommand( TCommand* command ) 00167 { 00168 theCommand = command; 00169 return; 00170 } 00171 00172 #endif