// =====================================================================
//  $Id: TSourceCommand.cc,v 1.3 2003/10/06 17:02:37 goiwai Exp $
//  $Name: CLDAQ-1-11-00 $
//  $Log: TSourceCommand.cc,v $
//  Revision 1.3  2003/10/06 17:02:37  goiwai
//  *** empty log message ***
//
//  Revision 1.2  2003/07/30 16:17:33  goiwai
//  ファイルにコミットログをつけることにしました.
//
// =====================================================================
#include "TSourceCommand.hh"
#include "TUserInterface.hh"
#include "TRunManager.hh"

static const Tstring _name = "source";
static const Tstring _desc = "read and set environment from filename.";

TSourceCommand::TSourceCommand( TRunManager* manager )
  : TCommand( manager, _name, _desc )
{;}

TSourceCommand::~TSourceCommand()
{;}

Tvoid TSourceCommand::Execute( const TstringList& arguments )
{
  if ( arguments.size() == 1 ) {
    TUserInterface* ui = theRunManager -> GetUserInterface();
    ui -> ExecuteCommand( "setenv", arguments );
  } else {
    ShowCommandDetail();
  }
  return;
}
