GSI Object Oriented Online Offline (Go4) GO4-6.4.0
|
This is the Go4 Abstract Command Class; part of the Base command pattern. More...
#include <TGo4Command.h>
Public Member Functions | |
TGo4Command () | |
TGo4Command (const char *name, const char *description, Int_t id) | |
virtual | ~TGo4Command () |
virtual Int_t | ExeCom () |
Do the command action. | |
Int_t | GetCommandID () const |
Go4CommandMode_t | GetMode () const |
Go4CommandMode_t | GetProtection () const |
const char * | GetReceiverName () const |
const char * | GetTaskName () const |
virtual void | Help () |
Bool_t | IsEnabled () const |
Bool_t | IsExclusive () const |
Bool_t | IsLocal () const |
Bool_t | IsSynchron () const |
virtual Bool_t | Log (Int_t mode=0) |
virtual Int_t | RefuseCom () |
Optional action if command is not allowed (warning message e.g.) | |
virtual void | Set (TGo4RemoteCommand *remcon) |
Set internals of this command from specification of external remote command (command container). | |
void | SetDescription (const char *) |
void | SetMode (Go4CommandMode_t m) |
virtual void | SetReceiver (TGo4CommandReceiver *rec) |
void | SetReceiverName (const char *) |
void | SetTaskName (const char *) |
const char * | What () const |
Static Public Member Functions | |
static const char * | GetModeDescription (Go4CommandMode_t mode) |
text description of current execution mode | |
Protected Member Functions | |
void | SetProtection (Go4CommandMode_t m) |
Protected Attributes | |
Bool_t | fbIsEnabled {kFALSE} |
Bool_t | fbIsExclusive {kFALSE} |
Bool_t | fbIsLocal {kFALSE} |
Bool_t | fbIsSynchron {kFALSE} |
Int_t | fiCommandID {0} |
Go4CommandMode_t | fiMode {kGo4ComModeRefused} |
mode value for execution rights of sending task | |
Go4CommandMode_t | fiProtection {kGo4ComModeRefused} |
Execute protection of this command. | |
Int_t | fiVersion {0} |
TGo4CommandReceiver * | fxReceiverBase {nullptr} |
Static Protected Attributes | |
static const char * | fgcMODEDESCRIPTION [] |
resolve description of command modes here | |
Private Attributes | |
TString | fxDescription |
TString | fxReceiverName |
TString | fxTaskName |
This is the Go4 Abstract Command Class; part of the Base command pattern.
Definition at line 35 of file TGo4Command.h.
TGo4Command::TGo4Command | ( | ) |
Definition at line 42 of file TGo4Command.cxx.
References fbIsEnabled, fbIsExclusive, fbIsLocal, fbIsSynchron, fiCommandID, fiMode, fiProtection, fiVersion, fxReceiverBase, GO4TRACE, kGo4ComModeObserver, kGo4ComModeRefused, SetDescription(), SetReceiverName(), and SetTaskName().
Referenced by TGo4AnalysisCommand::TGo4AnalysisCommand(), TGo4AnalysisCommand::TGo4AnalysisCommand(), TGo4ExampleCommand::TGo4ExampleCommand(), TGo4ExampleCommand::TGo4ExampleCommand(), TGo4ExampleCommand::TGo4ExampleCommand(), TGo4RemoteCommand::TGo4RemoteCommand(), TGo4RemoteCommand::TGo4RemoteCommand(), TGo4TaskHandlerCommand::TGo4TaskHandlerCommand(), and TGo4TaskHandlerCommand::TGo4TaskHandlerCommand().
TGo4Command::TGo4Command | ( | const char * | name, |
const char * | description, | ||
Int_t | id ) |
Definition at line 24 of file TGo4Command.cxx.
References fbIsEnabled, fbIsExclusive, fbIsLocal, fbIsSynchron, fiCommandID, fiMode, fiProtection, fiVersion, fxReceiverBase, GO4TRACE, kGo4ComModeObserver, kGo4ComModeRefused, SetDescription(), SetReceiverName(), and SetTaskName().
|
virtual |
Definition at line 59 of file TGo4Command.cxx.
References GO4TRACE.
|
virtual |
Do the command action.
Reimplemented in TGo4ComAction1, TGo4ComAction2, TGo4ComAddTreeHistogram, TGo4ComAutosave, TGo4ComClearObject, TGo4ComCloseAnalysis, TGo4ComDeleteObject, TGo4ComDisconnectSlave, TGo4ComExecLine, TGo4ComGetAnalysisStatus, TGo4ComGetCurrentEvent, TGo4ComGetEnvelope, TGo4ComGetNamesList, TGo4ComGetObjectStatus, TGo4ComInitAnalysis, TGo4ComLoadAnalysisStatus, TGo4ComMasterQuit, TGo4ComPrintConditions, TGo4ComPrintDynList, TGo4ComPrintHistograms, TGo4ComQuit, TGo4ComRemoveClient, TGo4ComSaveAnalysisStatus, TGo4ComServerQuit, TGo4ComSetAnalysisStatus, TGo4ComSetObject, TGo4ComSetPrintEvent, TGo4ComSetProtections, TGo4ComStart, TGo4ComStop, and TGo4RemoteCommand.
Definition at line 123 of file TGo4Command.cxx.
References GO4TRACE, and What().
Referenced by TGo4CommandInvoker::Invoke().
Int_t TGo4Command::GetCommandID | ( | ) | const |
Definition at line 64 of file TGo4Command.cxx.
References fiCommandID, and GO4TRACE.
Referenced by TGo4AnalysisMainRunnable::Run(), and TGo4LocalCommandRunnable::Run().
|
inline |
Definition at line 76 of file TGo4Command.h.
References fiMode.
Referenced by TGo4CommandInvoker::ExecuteFromRemote(), TGo4CommandInvoker::Invoke(), TGo4AnalysisCommand::RefuseCom(), RefuseCom(), and TGo4TaskHandlerCommand::RefuseCom().
|
static |
text description of current execution mode
Definition at line 169 of file TGo4Command.cxx.
References fgcMODEDESCRIPTION.
Referenced by TGo4TaskManager::AddClient(), TGo4AnalysisProxy::ReceiveStatus(), TGo4AnalysisCommand::RefuseCom(), RefuseCom(), and TGo4TaskHandlerCommand::RefuseCom().
|
inline |
Definition at line 75 of file TGo4Command.h.
References fiProtection.
Referenced by TGo4CommandInvoker::Invoke().
const char * TGo4Command::GetReceiverName | ( | ) | const |
Definition at line 87 of file TGo4Command.cxx.
References fxReceiverName, and GO4TRACE.
Referenced by TGo4CommandInvoker::Invoke().
const char * TGo4Command::GetTaskName | ( | ) | const |
Definition at line 99 of file TGo4Command.cxx.
References fxTaskName, and GO4TRACE.
Referenced by TGo4ComGetAnalysisStatus::ExeCom(), TGo4ComGetCurrentEvent::ExeCom(), TGo4ComGetEnvelope::ExeCom(), TGo4ComGetNamesList::ExeCom(), TGo4ComGetObjectStatus::ExeCom(), TGo4CommandInvoker::ExecuteFromRemote(), TGo4AnalysisCommand::RefuseCom(), and TGo4TaskHandlerCommand::RefuseCom().
|
virtual |
Definition at line 70 of file TGo4Command.cxx.
References GO4TRACE.
Bool_t TGo4Command::IsEnabled | ( | ) | const |
Definition at line 75 of file TGo4Command.cxx.
References fbIsEnabled, and GO4TRACE.
Bool_t TGo4Command::IsExclusive | ( | ) | const |
Definition at line 81 of file TGo4Command.cxx.
References fbIsExclusive, and GO4TRACE.
Bool_t TGo4Command::IsLocal | ( | ) | const |
Definition at line 156 of file TGo4Command.cxx.
References fbIsLocal.
Referenced by TGo4Task::SubmitCommand().
Bool_t TGo4Command::IsSynchron | ( | ) | const |
Definition at line 150 of file TGo4Command.cxx.
References fbIsSynchron, and GO4TRACE.
|
virtual |
Definition at line 137 of file TGo4Command.cxx.
|
virtual |
Optional action if command is not allowed (warning message e.g.)
Reimplemented in TGo4AnalysisCommand, and TGo4TaskHandlerCommand.
Definition at line 130 of file TGo4Command.cxx.
References GetMode(), GetModeDescription(), and TGo4Log::Warn().
Referenced by TGo4CommandInvoker::Invoke(), TGo4AnalysisCommand::RefuseCom(), and TGo4TaskHandlerCommand::RefuseCom().
|
virtual |
Set internals of this command from specification of external remote command (command container).
Must be overloaded for each specific command!
Reimplemented in TGo4AnalysisObjectCommand, TGo4ComAddTreeHistogram, TGo4ComAutosave, TGo4ComGetCurrentEvent, TGo4ComLoadAnalysisStatus, TGo4ComSaveAnalysisStatus, TGo4ComSetAnalysisStatus, TGo4ComSetObject, TGo4ComSetPrintEvent, and TGo4ComSetProtections.
Definition at line 176 of file TGo4Command.cxx.
Referenced by TGo4CommandProtoList::MakeCommand().
void TGo4Command::SetDescription | ( | const char * | txt | ) |
Definition at line 111 of file TGo4Command.cxx.
References fxDescription, and GO4TRACE.
Referenced by TGo4ComAction1::TGo4ComAction1(), TGo4ComAction2::TGo4ComAction2(), TGo4ComExecLine::TGo4ComExecLine(), TGo4ComExecLine::TGo4ComExecLine(), TGo4ComGetEnvelope::TGo4ComGetEnvelope(), TGo4ComGetNamesList::TGo4ComGetNamesList(), TGo4Command(), TGo4Command(), TGo4ComSetProtections::TGo4ComSetProtections(), TGo4ComStart::TGo4ComStart(), TGo4ComStop::TGo4ComStop(), and TGo4RemoteCommand::InitPars().
|
inline |
Definition at line 83 of file TGo4Command.h.
References fiMode.
Referenced by TGo4CommandInvoker::ExecuteFromRemote(), TGo4ServerTask::NextCommand(), TGo4Task::NextCommand(), and TGo4Task::SubmitLocalCommand().
|
inlineprotected |
Definition at line 104 of file TGo4Command.h.
References fiProtection.
Referenced by TGo4ComAddTreeHistogram::TGo4ComAddTreeHistogram(), TGo4ComAddTreeHistogram::TGo4ComAddTreeHistogram(), TGo4ComAutosave::TGo4ComAutosave(), TGo4ComClearObject::TGo4ComClearObject(), TGo4ComClearObject::TGo4ComClearObject(), TGo4ComCloseAnalysis::TGo4ComCloseAnalysis(), TGo4ComDeleteObject::TGo4ComDeleteObject(), TGo4ComDeleteObject::TGo4ComDeleteObject(), TGo4ComInitAnalysis::TGo4ComInitAnalysis(), TGo4ComLoadAnalysisStatus::TGo4ComLoadAnalysisStatus(), TGo4ComLoadAnalysisStatus::TGo4ComLoadAnalysisStatus(), TGo4ComSaveAnalysisStatus::TGo4ComSaveAnalysisStatus(), TGo4ComSaveAnalysisStatus::TGo4ComSaveAnalysisStatus(), TGo4ComServerQuit::TGo4ComServerQuit(), TGo4ComSetAnalysisStatus::TGo4ComSetAnalysisStatus(), TGo4ComSetAnalysisStatus::TGo4ComSetAnalysisStatus(), TGo4ComSetObject::TGo4ComSetObject(), TGo4ComSetObject::TGo4ComSetObject(), TGo4ComSetProtections::TGo4ComSetProtections(), TGo4ComSetProtections::TGo4ComSetProtections(), TGo4TaskHandlerCommand::TGo4TaskHandlerCommand(), and TGo4TaskHandlerCommand::TGo4TaskHandlerCommand().
|
virtual |
Definition at line 162 of file TGo4Command.cxx.
References fxReceiverBase, and GO4TRACE.
Referenced by TGo4CommandInvoker::Invoke().
void TGo4Command::SetReceiverName | ( | const char * | name | ) |
Definition at line 93 of file TGo4Command.cxx.
References fxReceiverName, and GO4TRACE.
Referenced by TGo4AnalysisCommand::TGo4AnalysisCommand(), TGo4AnalysisCommand::TGo4AnalysisCommand(), TGo4ComAddTreeHistogram::TGo4ComAddTreeHistogram(), TGo4ComAutosave::TGo4ComAutosave(), TGo4ComClearObject::TGo4ComClearObject(), TGo4ComClearObject::TGo4ComClearObject(), TGo4ComCloseAnalysis::TGo4ComCloseAnalysis(), TGo4ComDeleteObject::TGo4ComDeleteObject(), TGo4ComDeleteObject::TGo4ComDeleteObject(), TGo4ComDisconnectSlave::TGo4ComDisconnectSlave(), TGo4ComGetAnalysisStatus::TGo4ComGetAnalysisStatus(), TGo4ComGetCurrentEvent::TGo4ComGetCurrentEvent(), TGo4ComGetCurrentEvent::TGo4ComGetCurrentEvent(), TGo4ComGetEnvelope::TGo4ComGetEnvelope(), TGo4ComGetEnvelope::TGo4ComGetEnvelope(), TGo4ComGetNamesList::TGo4ComGetNamesList(), TGo4ComGetObjectStatus::TGo4ComGetObjectStatus(), TGo4ComGetObjectStatus::TGo4ComGetObjectStatus(), TGo4ComInitAnalysis::TGo4ComInitAnalysis(), TGo4ComLoadAnalysisStatus::TGo4ComLoadAnalysisStatus(), TGo4ComLoadAnalysisStatus::TGo4ComLoadAnalysisStatus(), TGo4Command(), TGo4Command(), TGo4ComMasterQuit::TGo4ComMasterQuit(), TGo4ComPrintConditions::TGo4ComPrintConditions(), TGo4ComPrintDynList::TGo4ComPrintDynList(), TGo4ComPrintHistograms::TGo4ComPrintHistograms(), TGo4ComRemoveClient::TGo4ComRemoveClient(), TGo4ComSaveAnalysisStatus::TGo4ComSaveAnalysisStatus(), TGo4ComSaveAnalysisStatus::TGo4ComSaveAnalysisStatus(), TGo4ComServerQuit::TGo4ComServerQuit(), TGo4ComSetAnalysisStatus::TGo4ComSetAnalysisStatus(), TGo4ComSetAnalysisStatus::TGo4ComSetAnalysisStatus(), TGo4ComSetObject::TGo4ComSetObject(), TGo4ComSetObject::TGo4ComSetObject(), TGo4ComSetPrintEvent::TGo4ComSetPrintEvent(), TGo4ComSetPrintEvent::TGo4ComSetPrintEvent(), TGo4ComSetProtections::TGo4ComSetProtections(), TGo4ComSetProtections::TGo4ComSetProtections(), TGo4ExampleCommand::TGo4ExampleCommand(), TGo4ExampleCommand::TGo4ExampleCommand(), TGo4TaskHandlerCommand::TGo4TaskHandlerCommand(), TGo4TaskHandlerCommand::TGo4TaskHandlerCommand(), and TGo4RemoteCommand::InitPars().
void TGo4Command::SetTaskName | ( | const char * | name | ) |
Definition at line 105 of file TGo4Command.cxx.
References fxTaskName, and GO4TRACE.
Referenced by TGo4Command(), TGo4Command(), TGo4CommandInvoker::ExecuteFromRemote(), TGo4ServerTask::NextCommand(), and TGo4Task::NextCommand().
const char * TGo4Command::What | ( | ) | const |
Definition at line 117 of file TGo4Command.cxx.
References fxDescription, and GO4TRACE.
|
protected |
Definition at line 90 of file TGo4Command.h.
Referenced by TGo4AnalysisCommand::TGo4AnalysisCommand(), TGo4AnalysisCommand::TGo4AnalysisCommand(), TGo4Command(), TGo4Command(), TGo4ExampleCommand::TGo4ExampleCommand(), TGo4ExampleCommand::TGo4ExampleCommand(), TGo4TaskHandlerCommand::TGo4TaskHandlerCommand(), TGo4TaskHandlerCommand::TGo4TaskHandlerCommand(), TGo4RemoteCommand::InitPars(), and IsEnabled().
|
protected |
Definition at line 91 of file TGo4Command.h.
Referenced by TGo4Command(), TGo4Command(), TGo4RemoteCommand::InitPars(), and IsExclusive().
|
protected |
Definition at line 93 of file TGo4Command.h.
Referenced by TGo4ComDisconnectSlave::TGo4ComDisconnectSlave(), TGo4Command(), TGo4Command(), TGo4ComMasterQuit::TGo4ComMasterQuit(), TGo4ComRemoveClient::TGo4ComRemoveClient(), TGo4ComServerQuit::TGo4ComServerQuit(), TGo4RemoteCommand::InitPars(), and IsLocal().
|
protected |
Definition at line 92 of file TGo4Command.h.
Referenced by TGo4AnalysisCommand::TGo4AnalysisCommand(), TGo4AnalysisCommand::TGo4AnalysisCommand(), TGo4ComExecLine::TGo4ComExecLine(), TGo4ComExecLine::TGo4ComExecLine(), TGo4Command(), TGo4Command(), TGo4ComMasterQuit::TGo4ComMasterQuit(), TGo4ComQuit::TGo4ComQuit(), TGo4ComServerQuit::TGo4ComServerQuit(), TGo4ComStart::TGo4ComStart(), TGo4ComStop::TGo4ComStop(), TGo4ExampleCommand::TGo4ExampleCommand(), TGo4ExampleCommand::TGo4ExampleCommand(), TGo4TaskHandlerCommand::TGo4TaskHandlerCommand(), TGo4TaskHandlerCommand::TGo4TaskHandlerCommand(), TGo4RemoteCommand::InitPars(), and IsSynchron().
|
staticprotected |
resolve description of command modes here
Definition at line 20 of file TGo4Command.h.
Referenced by GetModeDescription().
|
protected |
Definition at line 95 of file TGo4Command.h.
Referenced by TGo4Command(), TGo4Command(), TGo4TaskHandlerCommand::TGo4TaskHandlerCommand(), GetCommandID(), and TGo4RemoteCommand::InitPars().
|
protected |
mode value for execution rights of sending task
Definition at line 99 of file TGo4Command.h.
Referenced by TGo4Command(), TGo4Command(), GetMode(), and SetMode().
|
protected |
Execute protection of this command.
If Execution mode is not sufficient, command is not allowed to be executed.
Definition at line 102 of file TGo4Command.h.
Referenced by TGo4Command(), TGo4Command(), GetProtection(), and SetProtection().
|
protected |
Definition at line 96 of file TGo4Command.h.
Referenced by TGo4Command(), TGo4Command(), and TGo4RemoteCommand::InitPars().
|
private |
Definition at line 111 of file TGo4Command.h.
Referenced by SetDescription(), and What().
|
protected |
Definition at line 116 of file TGo4Command.h.
Referenced by TGo4Command(), TGo4Command(), TGo4ComAction1::ExeCom(), TGo4ComAction2::ExeCom(), TGo4ComAddTreeHistogram::ExeCom(), TGo4ComAutosave::ExeCom(), TGo4ComClearObject::ExeCom(), TGo4ComCloseAnalysis::ExeCom(), TGo4ComDeleteObject::ExeCom(), TGo4ComDisconnectSlave::ExeCom(), TGo4ComExecLine::ExeCom(), TGo4ComGetAnalysisStatus::ExeCom(), TGo4ComGetCurrentEvent::ExeCom(), TGo4ComGetEnvelope::ExeCom(), TGo4ComGetNamesList::ExeCom(), TGo4ComGetObjectStatus::ExeCom(), TGo4ComInitAnalysis::ExeCom(), TGo4ComLoadAnalysisStatus::ExeCom(), TGo4ComMasterQuit::ExeCom(), TGo4ComPrintConditions::ExeCom(), TGo4ComPrintDynList::ExeCom(), TGo4ComPrintHistograms::ExeCom(), TGo4ComQuit::ExeCom(), TGo4ComRemoveClient::ExeCom(), TGo4ComSaveAnalysisStatus::ExeCom(), TGo4ComServerQuit::ExeCom(), TGo4ComSetAnalysisStatus::ExeCom(), TGo4ComSetObject::ExeCom(), TGo4ComSetPrintEvent::ExeCom(), TGo4ComSetProtections::ExeCom(), TGo4ComStart::ExeCom(), TGo4ComStop::ExeCom(), TGo4RemoteCommand::ExeCom(), TGo4AnalysisCommand::RefuseCom(), TGo4TaskHandlerCommand::RefuseCom(), and SetReceiver().
|
private |
Definition at line 112 of file TGo4Command.h.
Referenced by GetReceiverName(), and SetReceiverName().
|
private |
Definition at line 113 of file TGo4Command.h.
Referenced by GetTaskName(), and SetTaskName().