00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #include "TCommandSpecified.hh"
00017
00018 TCommandSpecified::TCommandSpecified()
00019 : theName(),
00020 theFullName(),
00021 theAbsolutePath(),
00022 theDirectoryDepth( tNotDefineDepth ),
00023 theBuiltinFlag( Tfalse ),
00024 theCommand( 0 )
00025 {;}
00026
00027 TCommandSpecified::TCommandSpecified( const Tstring& name, const Tstring& fullname, const Tstring& path, Tint depth, Tbool flag, TCommand* command )
00028 : theName( name ),
00029 theFullName( fullname ),
00030 theAbsolutePath( path ),
00031 theDirectoryDepth( depth ),
00032 theBuiltinFlag( flag ),
00033 theCommand( command )
00034 {;}
00035
00036 TCommandSpecified::TCommandSpecified( const TCommandSpecified& right )
00037 : theName( right.theName ),
00038 theFullName( right.theFullName ),
00039 theAbsolutePath( right.theAbsolutePath ),
00040 theDirectoryDepth( right.theDirectoryDepth ),
00041 theBuiltinFlag( right.theBuiltinFlag ),
00042 theCommand( right.theCommand )
00043 {;}
00044
00045 TCommandSpecified::~TCommandSpecified()
00046 {;}
00047
00048 const TCommandSpecified& TCommandSpecified::operator=( const TCommandSpecified& right )
00049 {
00050 theName = right.theName;
00051 theFullName = right.theFullName;
00052 theAbsolutePath = right.theAbsolutePath;
00053 theDirectoryDepth = right.theDirectoryDepth;
00054 theBuiltinFlag = right.theBuiltinFlag;
00055 theCommand = right.theCommand;
00056 return *this;
00057 }
00058
00059 Tbool TCommandSpecified::operator==( const TCommandSpecified& right ) const
00060 {
00061 Tbool retval = Ttrue;
00062 retval &= ( theName == right.theName );
00063 retval &= ( theFullName == right.theFullName );
00064 retval &= ( theAbsolutePath == right.theAbsolutePath );
00065 retval &= ( theDirectoryDepth == right.theDirectoryDepth );
00066 retval &= ( theBuiltinFlag == right.theBuiltinFlag );
00067 retval &= ( theCommand == right.theCommand );
00068 return retval;
00069 }
00070
00071 Tbool TCommandSpecified::operator!=( const TCommandSpecified& right ) const
00072 {
00073 Tbool retval = Tfalse;
00074 retval |= ( theName != right.theName );
00075 retval |= ( theFullName != right.theFullName );
00076 retval |= ( theAbsolutePath != right.theAbsolutePath );
00077 retval |= ( theDirectoryDepth != right.theDirectoryDepth );
00078 retval |= ( theBuiltinFlag != right.theBuiltinFlag );
00079 retval |= ( theCommand != right.theCommand );
00080 return retval;
00081 }
00082
00083 Tostream& operator<<( Tostream& tos, const TCommandSpecified& right )
00084 {
00085 if ( right.theBuiltinFlag ) {
00086 tos << right.theName << ": Builtin command, ";
00087 tos << right.theCommand << Tflush;
00088 } else {
00089 tos << right.theFullName << ": [" << right.theName << "] in ";
00090 tos << right.theAbsolutePath;
00091 tos << " directory(Lv." << right.theDirectoryDepth << "), ";
00092 tos << right.theCommand << Tflush;
00093 }
00094 return tos;
00095 }
00096
00097 #ifdef __CLDAQ_ROOT_DLL
00098 ClassImp(TCommandSpecified)
00099 #endif