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