メインページ   モジュール   名前空間一覧   クラス階層   アルファベット順一覧   構成   ファイル一覧   構成メンバ   ファイルメンバ   関連ページ    

THelpCommand.cc

解説を見る。
00001 // =====================================================================
00002 //  $Id: THelpCommand.cc,v 1.4 2004/03/07 10:30:28 goiwai Exp $
00003 //  $Name: CLDAQ-1-14-03 $
00004 //  $Log: THelpCommand.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:31  goiwai
00013 //  ファイルにコミットログをつけることにしました.
00014 //
00015 // =====================================================================
00016 #include "THelpCommand.hh"
00017 #include "TRunManager.hh"
00018 #include "TUserInterface.hh"
00019 
00020 static const Tstring _name = "help";
00021 static const Tstring _desc = "print a detail of command given as argument.";
00022 
00023 THelpCommand::THelpCommand( TRunManager* manager )
00024   : TCommand( manager, _name, _desc )
00025 {;}
00026 
00027 THelpCommand::~THelpCommand()
00028 {;}
00029 
00030 Tvoid THelpCommand::Execute( const TstringList& arguments )
00031 {
00032   if ( arguments.size() != 1 ) {
00033     ShowCommandDetail();
00034     return;
00035   }
00036 
00037   TUserInterface* ui = theRunManager -> GetUserInterface();
00038 
00039   if ( ui ) {
00040     Tstring path = ui -> ModifyPath( arguments[ 0 ] );
00041     TCommand* com = ui -> FindCommand( path );
00042     if ( com ) {
00043       const TCommandTable& table = ui -> GetCommandTable();
00044       Tcout << table.GetCommandSpecified( path ) << Tendl;
00045       Tcout << com -> GetGuidance() << Tendl;
00046     } else {
00047       ui -> NotFoundCommand( arguments[ 0 ] );
00048     }
00049   }
00050 
00051   return;
00052 }
00053 
00054 #ifdef __CLDAQ_ROOT_DLL
00055     ClassImp(THelpCommand)
00056 #endif


CLDAQ - a Class Library for DataAcQuisition (Version 1.14.3)
Go IWAI -- goiwai at users.sourceforge.jp