00001 // ===================================================================== 00002 // $Id: TUnsetEnvironmentVariableCommand.cc,v 1.4 2004/03/07 10:30:28 goiwai Exp $ 00003 // $Name: CLDAQ-1-14-03 $ 00004 // $Log: TUnsetEnvironmentVariableCommand.cc,v $ 00005 // Revision 1.4 2004/03/07 10:30:28 goiwai 00006 // ROOTに組みこむためのおまじないマクロを埋めこみました。 00007 // 全てにおいて完全に動作するわけではありません。 00008 // 00009 // Revision 1.3 2003/10/06 17:02:37 goiwai 00010 // *** empty log message *** 00011 // 00012 // Revision 1.2 2003/07/30 16:17:33 goiwai 00013 // ファイルにコミットログをつけることにしました. 00014 // 00015 // ===================================================================== 00016 #include "TUnsetEnvironmentVariableCommand.hh" 00017 #include "TEnvironmentVariableTable.hh" 00018 00019 static const Tstring _name = "unsetenv"; 00020 static const Tstring _desc = "deletes the variable from the table.\nexample> unsetenv ITEM"; 00021 00022 TUnsetEnvironmentVariableCommand::TUnsetEnvironmentVariableCommand( TRunManager* manager, TEnvironmentVariableTable* table ) 00023 : TCommand( manager, _name, _desc ), TEnvironmentVariableCommand( table ) 00024 {;} 00025 00026 TUnsetEnvironmentVariableCommand::~TUnsetEnvironmentVariableCommand() 00027 {;} 00028 00029 Tvoid TUnsetEnvironmentVariableCommand::Execute( const TstringList& arguments ) 00030 { 00031 static const Tstring head = "TUnsetEnvironmentVariableCommand::Execute: "; 00032 00033 if ( arguments.empty() ) { 00034 Tcerr << head << "select no item." << Tendl; 00035 ShowCommandDetail(); 00036 } else if ( arguments.size() == 1 ) { 00037 theEnvironmentVariableTable -> UnsetEnvironment( arguments[ 0 ] ); 00038 } else { 00039 ShowCommandDetail(); 00040 } 00041 return; 00042 } 00043 00044 #ifdef __CLDAQ_ROOT_DLL 00045 ClassImp(TUnsetEnvironmentVariableCommand) 00046 #endif