Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

TGo4Command Class Reference

This is the Go4 Abstract Command Class; part of the Base command pattern. More...

#include <TGo4Command.h>

Inheritance diagram for TGo4Command:

TGo4AnalysisCommand TGo4ExampleCommand TGo4TaskHandlerCommand TGo4AnalysisObjectCommand TGo4AnalysisStepCommand TGo4ComAddTreeHistogram TGo4ComAutosave TGo4ComCloseAnalysis TGo4ComGetAnalysisStatus TGo4ComGetNamesList TGo4ComInitAnalysis TGo4ComLoadAnalysisStatus TGo4ComPrintConditions TGo4ComPrintDynList TGo4ComPrintHistograms TGo4ComSaveAnalysisStatus TGo4ComSetAnalysisStatus TGo4ComStartHistoServ TGo4ComStopHistoServ TGo4DynamicListCommand TGo4ComAction1 TGo4ComAction2 TGo4ComConnectSlave TGo4ComDisconnectSlave TGo4ComExecLine TGo4ComFlush TGo4ComGetStatus TGo4ComLaunchClient TGo4ComMasterQuit TGo4ComQuit TGo4ComRelaunch TGo4ComRemoveClient TGo4ComServerQuit TGo4ComStart TGo4ComStop List of all members.

Public Methods

 TGo4Command ()
 TGo4Command (const char *name, const char *description, Int_t id)
virtual ~TGo4Command ()
virtual Int_t ExeCom ()
 Do the command action. More...

virtual Int_t UnExeCom ()
 For undo functionality (not yet impl.). More...

virtual Int_t RefuseCom ()
 Optional action if command is not allowed (warning message e.g.). More...

virtual Bool_t Log (Int_t mode=0)
Bool_t IsEnabled () const
Bool_t IsExclusive () const
Bool_t IsLocal () const
virtual void Help ()
Int_t GetCommandID () const
Bool_t IsSynchron () const
const char * GetReceiverName () const
void SetReceiverName (const char *)
const char * GetTaskName () const
void SetTaskName (const char *)
const char * What () const
void SetDescription (const char *)
virtual void SetReceiver (TGo4CommandReceiver *rec)
Go4CommandMode_t GetProtection ()
Go4CommandMode_t GetMode ()
void SetMode (Go4CommandMode_t m)

Static Public Methods

const char * GetModeDescription (Go4CommandMode_t mode)
 text description of current execution mode. More...


Protected Methods

void SetProtection (Go4CommandMode_t m)

Protected Attributes

Bool_t fbIsEnabled
Bool_t fbIsExclusive
Bool_t fbIsSynchron
Bool_t fbIsLocal
Int_t fiCommandID
Int_t fiVersion
Go4CommandMode_t fiMode
 mode value for execution rights of sending task. More...

Go4CommandMode_t fiProtection
 Execute protection of this command. More...

TGo4CommandReceiverfxReceiverBase

Static Protected Attributes

char * fgcMODEDESCRIPTION []
 resolve description of command modes here. More...


Private Attributes

TString fxDescription
TString fxReceiverName
TString fxTaskName

Detailed Description

This is the Go4 Abstract Command Class; part of the Base command pattern.

Definition at line 40 of file TGo4Command.h.


Constructor & Destructor Documentation

TGo4Command::TGo4Command  
 

Definition at line 46 of file TGo4Command.cxx.

References fbIsEnabled, fbIsExclusive, fbIsLocal, fbIsSynchron, fiCommandID, fiMode, fiProtection, fiVersion, kGo4ComModeObserver, kGo4ComModeRefused, SetDescription(), SetReceiverName(), SetTaskName(), and TRACE.

TGo4Command::TGo4Command const char *    name,
const char *    description,
Int_t    id
 

Definition at line 29 of file TGo4Command.cxx.

References fbIsEnabled, fbIsExclusive, fbIsLocal, fbIsSynchron, fiCommandID, fiMode, fiProtection, fiVersion, kGo4ComModeObserver, kGo4ComModeRefused, SetDescription(), SetReceiverName(), SetTaskName(), and TRACE.

TGo4Command::~TGo4Command   [virtual]
 

Definition at line 62 of file TGo4Command.cxx.

References TRACE.


Member Function Documentation

Int_t TGo4Command::ExeCom   [virtual]
 

Do the command action.

Reimplemented in TGo4ComAddTreeHistogram, TGo4ComAutosave, TGo4ComClearObject, TGo4ComCloseAnalysis, TGo4ComCopyObject, TGo4ComCreateCondition, TGo4ComCreateHistogram, TGo4ComCreateObject, TGo4ComDeleteObject, TGo4ComGetAnalysisStatus, TGo4ComGetCanvas, TGo4ComGetCondition, TGo4ComGetCurrentEvent, TGo4ComGetDynamicEntryStatus, TGo4ComGetEnvelope, TGo4ComGetNamesList, TGo4ComGetObject, TGo4ComGetObjectStatus, TGo4ComGetParameter, TGo4ComGetPicture, TGo4ComGetTreeStructure, TGo4ComInitAnalysis, TGo4ComLoadAnalysisStatus, TGo4ComPrintConditions, TGo4ComPrintDynList, TGo4ComPrintHistograms, TGo4ComRemoveDynamicEntry, TGo4ComSaveAnalysisStatus, TGo4ComSetAnalysisStatus, TGo4ComSetCanvas, TGo4ComSetCondition, TGo4ComSetDynamicEntry, TGo4ComSetFirstStep, TGo4ComSetLastStep, TGo4ComSetParameter, TGo4ComSetPicture, TGo4ComSetPrintEvent, TGo4ComSetProcessor, TGo4ComSetProtections, TGo4ComSetSource, TGo4ComSetStore, TGo4ComStartHistoServ, TGo4ComStopHistoServ, TGo4ComConnectSlave, TGo4ComDisconnectSlave, TGo4ComExecLine, TGo4ComFlush, TGo4ComGetStatus, TGo4ComLaunchClient, TGo4ComMasterQuit, TGo4ComQuit, TGo4ComRelaunch, TGo4ComRemoveClient, TGo4ComServerQuit, TGo4ComStart, TGo4ComStop, TGo4ComAction1, and TGo4ComAction2.

Definition at line 125 of file TGo4Command.cxx.

References TRACE, and What().

Referenced by TGo4CommandInvoker::Invoke().

Int_t TGo4Command::UnExeCom   [virtual]
 

For undo functionality (not yet impl.).

Definition at line 132 of file TGo4Command.cxx.

References TRACE.

Int_t TGo4Command::RefuseCom   [virtual]
 

Optional action if command is not allowed (warning message e.g.).

Reimplemented in TGo4AnalysisCommand, and TGo4TaskHandlerCommand.

Definition at line 138 of file TGo4Command.cxx.

References GetMode(), GetModeDescription(), and TGo4Log::Warn().

Referenced by TGo4CommandInvoker::Invoke(), TGo4TaskHandlerCommand::RefuseCom(), and TGo4AnalysisCommand::RefuseCom().

Bool_t TGo4Command::Log Int_t    mode = 0 [virtual]
 

Definition at line 145 of file TGo4Command.cxx.

References TRACE, and What().

Bool_t TGo4Command::IsEnabled   const
 

Definition at line 78 of file TGo4Command.cxx.

References fbIsEnabled, and TRACE.

Bool_t TGo4Command::IsExclusive   const
 

Definition at line 84 of file TGo4Command.cxx.

References fbIsExclusive, and TRACE.

Bool_t TGo4Command::IsLocal   const
 

Definition at line 165 of file TGo4Command.cxx.

References fbIsLocal.

Referenced by TGo4Task::SubmitCommand().

void TGo4Command::Help   [virtual]
 

Definition at line 73 of file TGo4Command.cxx.

References TRACE.

Int_t TGo4Command::GetCommandID   const
 

Definition at line 67 of file TGo4Command.cxx.

References fiCommandID, and TRACE.

Referenced by TGo4LocalCommandRunnable::Run(), and TGo4AnalysisMainRunnable::Run().

Bool_t TGo4Command::IsSynchron   const
 

Definition at line 159 of file TGo4Command.cxx.

References fbIsSynchron, and TRACE.

const char * TGo4Command::GetReceiverName   const
 

Definition at line 90 of file TGo4Command.cxx.

References fxReceiverName, and TRACE.

Referenced by TGo4CommandInvoker::Invoke().

void TGo4Command::SetReceiverName const char *   
 

Definition at line 96 of file TGo4Command.cxx.

References fxReceiverName, and TRACE.

Referenced by TGo4AnalysisCommand::TGo4AnalysisCommand(), TGo4ComAddTreeHistogram::TGo4ComAddTreeHistogram(), TGo4ComAutosave::TGo4ComAutosave(), TGo4ComClearObject::TGo4ComClearObject(), TGo4ComCloseAnalysis::TGo4ComCloseAnalysis(), TGo4ComConnectSlave::TGo4ComConnectSlave(), TGo4ComCreateObject::TGo4ComCreateObject(), TGo4ComDeleteObject::TGo4ComDeleteObject(), TGo4ComDisconnectSlave::TGo4ComDisconnectSlave(), TGo4ComGetAnalysisStatus::TGo4ComGetAnalysisStatus(), TGo4ComGetCanvas::TGo4ComGetCanvas(), TGo4ComGetCondition::TGo4ComGetCondition(), TGo4ComGetCurrentEvent::TGo4ComGetCurrentEvent(), TGo4ComGetEnvelope::TGo4ComGetEnvelope(), TGo4ComGetNamesList::TGo4ComGetNamesList(), TGo4ComGetObject::TGo4ComGetObject(), TGo4ComGetObjectStatus::TGo4ComGetObjectStatus(), TGo4ComGetParameter::TGo4ComGetParameter(), TGo4ComGetPicture::TGo4ComGetPicture(), TGo4ComGetTreeStructure::TGo4ComGetTreeStructure(), TGo4ComInitAnalysis::TGo4ComInitAnalysis(), TGo4ComLaunchClient::TGo4ComLaunchClient(), TGo4ComLoadAnalysisStatus::TGo4ComLoadAnalysisStatus(), TGo4Command(), TGo4ComMasterQuit::TGo4ComMasterQuit(), TGo4ComPrintConditions::TGo4ComPrintConditions(), TGo4ComPrintDynList::TGo4ComPrintDynList(), TGo4ComPrintHistograms::TGo4ComPrintHistograms(), TGo4ComRemoveClient::TGo4ComRemoveClient(), TGo4ComSaveAnalysisStatus::TGo4ComSaveAnalysisStatus(), TGo4ComServerQuit::TGo4ComServerQuit(), TGo4ComSetAnalysisStatus::TGo4ComSetAnalysisStatus(), TGo4ComSetCanvas::TGo4ComSetCanvas(), TGo4ComSetCondition::TGo4ComSetCondition(), TGo4ComSetFirstStep::TGo4ComSetFirstStep(), TGo4ComSetLastStep::TGo4ComSetLastStep(), TGo4ComSetParameter::TGo4ComSetParameter(), TGo4ComSetPicture::TGo4ComSetPicture(), TGo4ComSetPrintEvent::TGo4ComSetPrintEvent(), TGo4ComSetProcessor::TGo4ComSetProcessor(), TGo4ComSetProtections::TGo4ComSetProtections(), TGo4ComSetSource::TGo4ComSetSource(), TGo4ComSetStore::TGo4ComSetStore(), TGo4ComStartHistoServ::TGo4ComStartHistoServ(), TGo4ComStopHistoServ::TGo4ComStopHistoServ(), TGo4DynamicListCommand::TGo4DynamicListCommand(), TGo4ExampleCommand::TGo4ExampleCommand(), and TGo4TaskHandlerCommand::TGo4TaskHandlerCommand().

const char * TGo4Command::GetTaskName   const
 

Definition at line 102 of file TGo4Command.cxx.

References fxTaskName, and TRACE.

Referenced by TGo4ComGetTreeStructure::ExeCom(), TGo4ComGetPicture::ExeCom(), TGo4ComGetParameter::ExeCom(), TGo4ComGetObjectStatus::ExeCom(), TGo4ComGetObject::ExeCom(), TGo4ComGetNamesList::ExeCom(), TGo4ComGetEnvelope::ExeCom(), TGo4ComGetDynamicEntryStatus::ExeCom(), TGo4ComGetCurrentEvent::ExeCom(), TGo4ComGetCondition::ExeCom(), TGo4ComGetCanvas::ExeCom(), TGo4ComGetAnalysisStatus::ExeCom(), TGo4TaskHandlerCommand::RefuseCom(), and TGo4AnalysisCommand::RefuseCom().

void TGo4Command::SetTaskName const char *   
 

Definition at line 108 of file TGo4Command.cxx.

References fxTaskName, and TRACE.

Referenced by TGo4Task::NextCommand(), TGo4ServerTask::NextCommand(), and TGo4Command().

const char * TGo4Command::What   const
 

Definition at line 119 of file TGo4Command.cxx.

References fxDescription, and TRACE.

Referenced by ExeCom(), Log(), and TGo4CommandProtoList::ShowCommands().

void TGo4Command::SetDescription const char *   
 

Definition at line 114 of file TGo4Command.cxx.

References fxDescription, and TRACE.

Referenced by TGo4ComAction1::TGo4ComAction1(), TGo4ComAction2::TGo4ComAction2(), TGo4ComExecLine::TGo4ComExecLine(), TGo4ComGetEnvelope::TGo4ComGetEnvelope(), TGo4ComGetNamesList::TGo4ComGetNamesList(), TGo4ComGetObject::TGo4ComGetObject(), TGo4Command(), TGo4ComSetProtections::TGo4ComSetProtections(), TGo4ComStart::TGo4ComStart(), and TGo4ComStop::TGo4ComStop().

void TGo4Command::SetReceiver TGo4CommandReceiver   rec [virtual]
 

Definition at line 171 of file TGo4Command.cxx.

References fxReceiverBase, and TRACE.

Referenced by TGo4CommandInvoker::Invoke().

Go4CommandMode_t TGo4Command::GetProtection   [inline]
 

Definition at line 83 of file TGo4Command.h.

References fiProtection, and Go4CommandMode_t.

Referenced by TGo4CommandInvoker::Invoke().

Go4CommandMode_t TGo4Command::GetMode   [inline]
 

Definition at line 84 of file TGo4Command.h.

References fiMode, and Go4CommandMode_t.

Referenced by TGo4CommandInvoker::Invoke(), TGo4TaskHandlerCommand::RefuseCom(), RefuseCom(), and TGo4AnalysisCommand::RefuseCom().

void TGo4Command::SetMode Go4CommandMode_t    m [inline]
 

Definition at line 86 of file TGo4Command.h.

References fiMode, and Go4CommandMode_t.

Referenced by TGo4Task::NextCommand(), TGo4ServerTask::NextCommand(), and TGo4Task::SubmitLocalCommand().

const char * TGo4Command::GetModeDescription Go4CommandMode_t    mode [static]
 

text description of current execution mode.

Definition at line 178 of file TGo4Command.cxx.

References fgcMODEDESCRIPTION, and Go4CommandMode_t.

Referenced by TGo4TaskManager::AddClient(), TGo4GUIRegistry::DisplayLog(), TGo4TaskHandlerCommand::RefuseCom(), RefuseCom(), and TGo4AnalysisCommand::RefuseCom().

void TGo4Command::SetProtection Go4CommandMode_t    m [inline, protected]
 

Definition at line 108 of file TGo4Command.h.

References fiProtection, and Go4CommandMode_t.

Referenced by TGo4AnalysisStepCommand::TGo4AnalysisStepCommand(), TGo4ComAddTreeHistogram::TGo4ComAddTreeHistogram(), TGo4ComAutosave::TGo4ComAutosave(), TGo4ComClearObject::TGo4ComClearObject(), TGo4ComCloseAnalysis::TGo4ComCloseAnalysis(), TGo4ComCopyObject::TGo4ComCopyObject(), TGo4ComCreateObject::TGo4ComCreateObject(), TGo4ComDeleteObject::TGo4ComDeleteObject(), TGo4ComInitAnalysis::TGo4ComInitAnalysis(), TGo4ComLoadAnalysisStatus::TGo4ComLoadAnalysisStatus(), TGo4ComRemoveDynamicEntry::TGo4ComRemoveDynamicEntry(), TGo4ComSaveAnalysisStatus::TGo4ComSaveAnalysisStatus(), TGo4ComServerQuit::TGo4ComServerQuit(), TGo4ComSetAnalysisStatus::TGo4ComSetAnalysisStatus(), TGo4ComSetCanvas::TGo4ComSetCanvas(), TGo4ComSetCondition::TGo4ComSetCondition(), TGo4ComSetDynamicEntry::TGo4ComSetDynamicEntry(), TGo4ComSetParameter::TGo4ComSetParameter(), TGo4ComSetPicture::TGo4ComSetPicture(), TGo4ComSetProtections::TGo4ComSetProtections(), TGo4ComStartHistoServ::TGo4ComStartHistoServ(), TGo4ComStopHistoServ::TGo4ComStopHistoServ(), and TGo4TaskHandlerCommand::TGo4TaskHandlerCommand().


Member Data Documentation

Bool_t TGo4Command::fbIsEnabled [protected]
 

Definition at line 93 of file TGo4Command.h.

Referenced by IsEnabled(), TGo4AnalysisCommand::TGo4AnalysisCommand(), TGo4Command(), TGo4ExampleCommand::TGo4ExampleCommand(), and TGo4TaskHandlerCommand::TGo4TaskHandlerCommand().

Bool_t TGo4Command::fbIsExclusive [protected]
 

Definition at line 94 of file TGo4Command.h.

Referenced by IsExclusive(), and TGo4Command().

Bool_t TGo4Command::fbIsSynchron [protected]
 

Definition at line 95 of file TGo4Command.h.

Referenced by IsSynchron(), TGo4AnalysisCommand::TGo4AnalysisCommand(), TGo4ComExecLine::TGo4ComExecLine(), TGo4ComGetStatus::TGo4ComGetStatus(), TGo4Command(), TGo4ComMasterQuit::TGo4ComMasterQuit(), TGo4ComQuit::TGo4ComQuit(), TGo4ComRelaunch::TGo4ComRelaunch(), TGo4ComServerQuit::TGo4ComServerQuit(), TGo4ComStart::TGo4ComStart(), TGo4ComStop::TGo4ComStop(), TGo4ExampleCommand::TGo4ExampleCommand(), and TGo4TaskHandlerCommand::TGo4TaskHandlerCommand().

Bool_t TGo4Command::fbIsLocal [protected]
 

Definition at line 96 of file TGo4Command.h.

Referenced by IsLocal(), TGo4ComConnectSlave::TGo4ComConnectSlave(), TGo4ComDisconnectSlave::TGo4ComDisconnectSlave(), TGo4ComLaunchClient::TGo4ComLaunchClient(), TGo4Command(), TGo4ComMasterQuit::TGo4ComMasterQuit(), TGo4ComRemoveClient::TGo4ComRemoveClient(), and TGo4ComServerQuit::TGo4ComServerQuit().

Int_t TGo4Command::fiCommandID [protected]
 

Definition at line 98 of file TGo4Command.h.

Referenced by GetCommandID(), TGo4Command(), and TGo4TaskHandlerCommand::TGo4TaskHandlerCommand().

Int_t TGo4Command::fiVersion [protected]
 

Definition at line 99 of file TGo4Command.h.

Referenced by TGo4Command().

Go4CommandMode_t TGo4Command::fiMode [protected]
 

mode value for execution rights of sending task.

Reimplemented in TGo4ComConnectSlave, and TGo4ComLaunchClient.

Definition at line 102 of file TGo4Command.h.

Referenced by GetMode(), SetMode(), and TGo4Command().

Go4CommandMode_t TGo4Command::fiProtection [protected]
 

Execute protection of this command.

If Execution mode is not sufficient, command is not allowed to be executed.

Definition at line 105 of file TGo4Command.h.

Referenced by GetProtection(), SetProtection(), and TGo4Command().

char * TGo4Command::fgcMODEDESCRIPTION [static, protected]
 

Initial value:

   {"NOMODE","Observer","Controller","Administrator"}
resolve description of command modes here.

Definition at line 25 of file TGo4Command.cxx.

Referenced by GetModeDescription().

TString TGo4Command::fxDescription [private]
 

Definition at line 115 of file TGo4Command.h.

Referenced by SetDescription(), and What().

TString TGo4Command::fxReceiverName [private]
 

Definition at line 116 of file TGo4Command.h.

Referenced by GetReceiverName(), and SetReceiverName().

TString TGo4Command::fxTaskName [private]
 

Definition at line 117 of file TGo4Command.h.

Referenced by GetTaskName(), and SetTaskName().

TGo4CommandReceiver* TGo4Command::fxReceiverBase [protected]
 

Definition at line 120 of file TGo4Command.h.

Referenced by TGo4ComAction2::ExeCom(), TGo4ComAction1::ExeCom(), TGo4ComQuit::ExeCom(), TGo4ComFlush::ExeCom(), TGo4ComSetStore::ExeCom(), TGo4ComSetSource::ExeCom(), TGo4ComSetProcessor::ExeCom(), TGo4ComSetLastStep::ExeCom(), TGo4ComSetFirstStep::ExeCom(), TGo4ComGetTreeStructure::ExeCom(), TGo4ComGetPicture::ExeCom(), TGo4ComGetParameter::ExeCom(), TGo4ComGetObjectStatus::ExeCom(), TGo4ComGetCondition::ExeCom(), TGo4ComGetCanvas::ExeCom(), TGo4ComCreateCondition::ExeCom(), TGo4ComCopyObject::ExeCom(), and SetReceiver().


The documentation for this class was generated from the following files:
Generated on Tue Nov 8 10:56:32 2005 for Go4-v2.10-5 by doxygen1.2.15