GSI Object Oriented Online Offline (Go4)  GO4-6.3.0
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Attributes | List of all members
TGo4Command Class Reference

#include <TGo4Command.h>

+ Inheritance diagram for TGo4Command:

Public Member Functions

 TGo4Command ()
 
 TGo4Command (const char *name, const char *description, Int_t id)
 
virtual ~TGo4Command ()
 
virtual Int_t ExeCom ()
 
virtual Int_t RefuseCom ()
 
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 () const
 
Go4CommandMode_t GetMode () const
 
virtual void Set (TGo4RemoteCommand *remcon)
 
void SetMode (Go4CommandMode_t m)
 

Static Public Member Functions

static const char * GetModeDescription (Go4CommandMode_t mode)
 

Protected Member Functions

void SetProtection (Go4CommandMode_t m)
 

Protected Attributes

Bool_t fbIsEnabled {kFALSE}
 
Bool_t fbIsExclusive {kFALSE}
 
Bool_t fbIsSynchron {kFALSE}
 
Bool_t fbIsLocal {kFALSE}
 
Int_t fiCommandID {0}
 
Int_t fiVersion {0}
 
Go4CommandMode_t fiMode {kGo4ComModeRefused}
 
Go4CommandMode_t fiProtection {kGo4ComModeRefused}
 
TGo4CommandReceiverfxReceiverBase {nullptr}
 

Static Protected Attributes

static const char * fgcMODEDESCRIPTION []
 

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 35 of file TGo4Command.h.

Constructor & Destructor Documentation

◆ TGo4Command() [1/2]

TGo4Command::TGo4Command ( )

◆ TGo4Command() [2/2]

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

◆ ~TGo4Command()

TGo4Command::~TGo4Command ( )
virtual

Definition at line 59 of file TGo4Command.cxx.

References GO4TRACE.

Member Function Documentation

◆ ExeCom()

Int_t TGo4Command::ExeCom ( )
virtual

◆ GetCommandID()

Int_t TGo4Command::GetCommandID ( ) const

Definition at line 64 of file TGo4Command.cxx.

References fiCommandID, and GO4TRACE.

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

◆ GetMode()

Go4CommandMode_t TGo4Command::GetMode ( ) const
inline

◆ GetModeDescription()

const char * TGo4Command::GetModeDescription ( Go4CommandMode_t  mode)
static

◆ GetProtection()

Go4CommandMode_t TGo4Command::GetProtection ( ) const
inline

Definition at line 75 of file TGo4Command.h.

References fiProtection.

Referenced by TGo4CommandInvoker::Invoke().

◆ GetReceiverName()

const char * TGo4Command::GetReceiverName ( ) const

Definition at line 87 of file TGo4Command.cxx.

References fxReceiverName, and GO4TRACE.

Referenced by TGo4CommandInvoker::Invoke().

◆ GetTaskName()

const char * TGo4Command::GetTaskName ( ) const

◆ Help()

void TGo4Command::Help ( )
virtual

Definition at line 70 of file TGo4Command.cxx.

References GO4TRACE.

◆ IsEnabled()

Bool_t TGo4Command::IsEnabled ( ) const

Definition at line 75 of file TGo4Command.cxx.

References fbIsEnabled, and GO4TRACE.

◆ IsExclusive()

Bool_t TGo4Command::IsExclusive ( ) const

Definition at line 81 of file TGo4Command.cxx.

References fbIsExclusive, and GO4TRACE.

◆ IsLocal()

Bool_t TGo4Command::IsLocal ( ) const

Definition at line 156 of file TGo4Command.cxx.

References fbIsLocal.

Referenced by TGo4Task::SubmitCommand().

◆ IsSynchron()

Bool_t TGo4Command::IsSynchron ( ) const

Definition at line 150 of file TGo4Command.cxx.

References fbIsSynchron, and GO4TRACE.

◆ Log()

Bool_t TGo4Command::Log ( Int_t  mode = 0)
virtual

Definition at line 137 of file TGo4Command.cxx.

References GO4TRACE, and What().

◆ RefuseCom()

Int_t TGo4Command::RefuseCom ( )
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(), TGo4TaskHandlerCommand::RefuseCom(), and TGo4AnalysisCommand::RefuseCom().

◆ Set()

void TGo4Command::Set ( TGo4RemoteCommand remcon)
virtual

Set internals of this command from specification of external remote command (command container). Must be overloaded for each specific command!

Reimplemented in TGo4ComSetObject, TGo4AnalysisObjectCommand, TGo4ComAddTreeHistogram, TGo4ComGetCurrentEvent, TGo4ComSetAnalysisStatus, TGo4ComSetPrintEvent, TGo4ComSetProtections, TGo4ComLoadAnalysisStatus, TGo4ComSaveAnalysisStatus, and TGo4ComAutosave.

Definition at line 176 of file TGo4Command.cxx.

Referenced by GetMode(), and TGo4CommandProtoList::MakeCommand().

◆ SetDescription()

void TGo4Command::SetDescription ( const char *  txt)

◆ SetMode()

void TGo4Command::SetMode ( Go4CommandMode_t  m)
inline

◆ SetProtection()

void TGo4Command::SetProtection ( Go4CommandMode_t  m)
inlineprotected

◆ SetReceiver()

void TGo4Command::SetReceiver ( TGo4CommandReceiver rec)
virtual

Definition at line 162 of file TGo4Command.cxx.

References fxReceiverBase, and GO4TRACE.

Referenced by TGo4CommandInvoker::Invoke().

◆ SetReceiverName()

void TGo4Command::SetReceiverName ( const char *  name)

◆ SetTaskName()

void TGo4Command::SetTaskName ( const char *  name)

◆ What()

const char * TGo4Command::What ( ) const

Definition at line 117 of file TGo4Command.cxx.

References fxDescription, and GO4TRACE.

Referenced by ExeCom(), and Log().

Member Data Documentation

◆ fbIsEnabled

Bool_t TGo4Command::fbIsEnabled {kFALSE}
protected

◆ fbIsExclusive

Bool_t TGo4Command::fbIsExclusive {kFALSE}
protected

Definition at line 91 of file TGo4Command.h.

Referenced by TGo4RemoteCommand::InitPars(), IsExclusive(), and TGo4Command().

◆ fbIsLocal

Bool_t TGo4Command::fbIsLocal {kFALSE}
protected

◆ fbIsSynchron

Bool_t TGo4Command::fbIsSynchron {kFALSE}
protected

◆ fgcMODEDESCRIPTION

const char * TGo4Command::fgcMODEDESCRIPTION
staticprotected
Initial value:
=
{"NOMODE","Observer","Controller","Administrator"}

resolve description of command modes here

Definition at line 107 of file TGo4Command.h.

Referenced by GetModeDescription().

◆ fiCommandID

Int_t TGo4Command::fiCommandID {0}
protected

◆ fiMode

Go4CommandMode_t TGo4Command::fiMode {kGo4ComModeRefused}
protected

mode value for execution rights of sending task

Definition at line 99 of file TGo4Command.h.

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

◆ fiProtection

Go4CommandMode_t TGo4Command::fiProtection {kGo4ComModeRefused}
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 GetProtection(), SetProtection(), and TGo4Command().

◆ fiVersion

Int_t TGo4Command::fiVersion {0}
protected

Definition at line 96 of file TGo4Command.h.

Referenced by TGo4RemoteCommand::InitPars(), and TGo4Command().

◆ fxDescription

TString TGo4Command::fxDescription
private

Definition at line 111 of file TGo4Command.h.

Referenced by SetDescription(), and What().

◆ fxReceiverBase

TGo4CommandReceiver* TGo4Command::fxReceiverBase {nullptr}
protected

◆ fxReceiverName

TString TGo4Command::fxReceiverName
private

Definition at line 112 of file TGo4Command.h.

Referenced by GetReceiverName(), and SetReceiverName().

◆ fxTaskName

TString TGo4Command::fxTaskName
private

Definition at line 113 of file TGo4Command.h.

Referenced by GetTaskName(), and SetTaskName().


The documentation for this class was generated from the following files: