GSI Object Oriented Online Offline (Go4) GO4-6.4.0
Loading...
Searching...
No Matches
TGo4CommandInvoker Class Reference

Class that knows Command Object; When Client gets the Command it is passed to the Invoker who sets the CommandClient as receiver and calls its Execute method. More...

#include <TGo4CommandInvoker.h>

+ Inheritance diagram for TGo4CommandInvoker:

Public Member Functions

virtual ~TGo4CommandInvoker ()
 
Int_t ExecuteFromRemote (TGo4RemoteCommand *remcom)
 Create real command from remote command and invoke it.
 
virtual void Invoke ()
 
virtual void Invoke (TGo4Command *com)
 
- Public Member Functions inherited from TGo4CommandReceiver
 TGo4CommandReceiver ()
 
virtual ~TGo4CommandReceiver ()
 

Static Public Member Functions

static TGo4CommandInvokerInstance ()
 
static void Register (const char *name, TGo4CommandReceiver *p)
 
static void SetCommandList (TGo4CommandProtoList *list)
 Application may exchange standard command list by own subclass with specialized commands, e.g.
 
static void UnRegister (TGo4CommandReceiver *p)
 

Protected Member Functions

 TGo4CommandInvoker ()
 

Static Protected Member Functions

static TGo4CommandReceiverLookup (const char *name)
 

Private Attributes

TGo4CommandfxCommand {nullptr}
 aggregation
 

Static Private Attributes

static TObjArray * fxArray = nullptr
 
static TGo4CommandProtoListfxCommandList = nullptr
 For remote commands, invoker will create the requested slave commands from own command list.
 
static TGo4CommandInvokerfxInstance = nullptr
 
static TMutex * fxMutex = nullptr
 

Detailed Description

Class that knows Command Object; When Client gets the Command it is passed to the Invoker who sets the CommandClient as receiver and calls its Execute method.

Decouples CommandClient and Command object circular dependencies

Definition at line 37 of file TGo4CommandInvoker.h.

Constructor & Destructor Documentation

◆ ~TGo4CommandInvoker()

TGo4CommandInvoker::~TGo4CommandInvoker ( )
virtual

Definition at line 59 of file TGo4CommandInvoker.cxx.

References fxArray, fxCommand, fxCommandList, fxMutex, and GO4TRACE.

◆ TGo4CommandInvoker()

TGo4CommandInvoker::TGo4CommandInvoker ( )
protected

Member Function Documentation

◆ ExecuteFromRemote()

Int_t TGo4CommandInvoker::ExecuteFromRemote ( TGo4RemoteCommand * remcom)

Create real command from remote command and invoke it.

Used when remote command acts on this invoker as receiver

Definition at line 151 of file TGo4CommandInvoker.cxx.

References fxCommandList, TGo4Command::GetMode(), TGo4Command::GetTaskName(), Invoke(), TGo4Command::SetMode(), and TGo4Command::SetTaskName().

Referenced by TGo4RemoteCommand::ExeCom().

◆ Instance()

◆ Invoke() [1/2]

void TGo4CommandInvoker::Invoke ( )
virtual

◆ Invoke() [2/2]

◆ Lookup()

TGo4CommandReceiver * TGo4CommandInvoker::Lookup ( const char * name)
staticprotected

◆ Register()

◆ SetCommandList()

void TGo4CommandInvoker::SetCommandList ( TGo4CommandProtoList * list)
static

Application may exchange standard command list by own subclass with specialized commands, e.g.

for analysis control

Definition at line 145 of file TGo4CommandInvoker.cxx.

References fxCommandList.

Referenced by TGo4Slave::TGo4Slave(), TGo4Task::TGo4Task(), TGo4Analysis::Constructor(), and TGo4AnalysisClient::Constructor().

◆ UnRegister()

Field Documentation

◆ fxArray

TObjArray * TGo4CommandInvoker::fxArray = nullptr
staticprivate

◆ fxCommand

TGo4Command* TGo4CommandInvoker::fxCommand {nullptr}
private

aggregation

Definition at line 70 of file TGo4CommandInvoker.h.

Referenced by TGo4CommandInvoker(), ~TGo4CommandInvoker(), and Invoke().

◆ fxCommandList

TGo4CommandProtoList * TGo4CommandInvoker::fxCommandList = nullptr
staticprivate

For remote commands, invoker will create the requested slave commands from own command list.

Definition at line 74 of file TGo4CommandInvoker.h.

Referenced by TGo4CommandInvoker(), ~TGo4CommandInvoker(), ExecuteFromRemote(), and SetCommandList().

◆ fxInstance

TGo4CommandInvoker * TGo4CommandInvoker::fxInstance = nullptr
staticprivate

Definition at line 76 of file TGo4CommandInvoker.h.

Referenced by Instance().

◆ fxMutex

TMutex * TGo4CommandInvoker::fxMutex = nullptr
staticprivate

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