21#include "TGo4LockGuard.h"
26 TNamed(name,
"This is a TGo4CommandProtoList")
28 GO4TRACE((14,
"TGo4CommandProtoList::TGo4CommandProtoList(const char *) ctor",__LINE__, __FILE__));
37 GO4TRACE((14,
"TGo4CommandProtoList::~TGo4CommandProtoList() dtor",__LINE__, __FILE__));
48 GO4TRACE((12,
"TGo4CommandProtoList::ShowCommands()",__LINE__, __FILE__));
53 std::cout <<
" Name: \t| Description:"<<std::endl;
55 std::cout <<
" "<< com->GetName()<<
"\t| "<<com->What()<<std::endl;
60 GO4TRACE((12,
"TGo4CommandProtoList::MakeCommand(const char *)",__LINE__, __FILE__));
66 GO4TRACE((10,
"TGo4CommandProtoList::RemoveCommand(TGo4Command *) command not found in array",__LINE__, __FILE__));
69 GO4TRACE((10,
"TGo4CommandProtoList::RemoveCommand(TGo4Command *) cloning command",__LINE__, __FILE__));
78 if(!remcon)
return nullptr;
88 GO4TRACE((12,
"TGo4CommandProtoList::RemoveCommand(const char *)",__LINE__, __FILE__));
94 GO4TRACE((10,
"TGo4CommandProtoList::RemoveCommand(TGo4Command *) command not found in array",__LINE__, __FILE__));
97 GO4TRACE((10,
"TGo4CommandProtoList::RemoveCommand(TGo4Command *) removing command from array",__LINE__, __FILE__));
108 GO4TRACE((12,
"TGo4CommandProtoList::AddCommand(TGo4Command *)",__LINE__, __FILE__));
112 GO4TRACE((10,
"TGo4CommandProtoList::AddCommand(TGo4Command *) Adding new go4 commandto array",__LINE__, __FILE__));
116 GO4TRACE((10,
"TGo4CommandProtoList::AddCommand(TGo4Command *) command was already in array",__LINE__, __FILE__));
125 while (
auto com =
dynamic_cast<TGo4Command *
>(iter()))
127 std::cout <<
"CommandProtoList "<< GetName() <<
"used operator += for adding list " << two.GetName() << std::endl;
TGo4CommandProtoList & operator+=(const TGo4CommandProtoList &two)
Adds second command list to this.
void AddCommand(TGo4Command *com)
Adds a Command to the list.
TMutex * fxListMutex
aggregation 1
TGo4Command * MakeCommand(const char *name)
Creates a Clone of the specified command by name.
virtual ~TGo4CommandProtoList()
virtual void ShowCommands()
Display all commands in list by name and description.
void RemoveCommand(const char *name)
removes command from list
TGo4CommandProtoList(const char *name)
TObjArray * fxCommandList
aggregation 1
This is the Go4 Abstract Command Class; part of the Base command pattern.
virtual void Set(TGo4RemoteCommand *remcon)
Set internals of this command from specification of external remote command (command container).
static void Debug(const char *text,...) GO4_PRINTF_ARGS
User shortcut for message with prio 0.
This command is a container for commands to be send from master to slave via inter-process transport.
const char * GetCommandName() const