00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #include "TGo4SubmittedCommandsEntry.h"
00017 #include "TGo4RecieverInfo.h"
00018
00019 TGo4SubmittedCommandsEntry::TGo4SubmittedCommandsEntry(const char* name) :
00020 TNamed(name, name),
00021 RecList()
00022 {
00023 RecList.SetOwner(kTRUE);
00024 }
00025
00026 TGo4SubmittedCommandsEntry::~TGo4SubmittedCommandsEntry()
00027 {
00028 }
00029
00030 void TGo4SubmittedCommandsEntry::SetNewReciever(TGo4SlotsBaseClass *Rec,
00031 Bool_t Monitor,
00032 TQRootCanvas *fxQRootCanvas,
00033 TPad *pad,
00034 Bool_t SubittsCommand)
00035 {
00036 RecList.Add(new TGo4RecieverInfo(Rec,fxQRootCanvas,pad,Monitor,SubittsCommand));
00037 }
00038
00039 void TGo4SubmittedCommandsEntry::RemoveSlotEntries(TGo4SlotsBaseClass* sl)
00040 {
00041 for(int n=0;n<=RecList.GetLast();n++) {
00042 TGo4RecieverInfo* entry = (TGo4RecieverInfo*) RecList.At(n);
00043 if (entry->GetRecvSlot()==sl) {
00044 RecList.Remove(entry);
00045 delete entry;
00046 }
00047 }
00048 RecList.Compress();
00049 }
00050
00051 void TGo4SubmittedCommandsEntry::RemoveCanvasEntries(TQRootCanvas *c)
00052 {
00053 for(int n=0;n<=RecList.GetLast();n++) {
00054 TGo4RecieverInfo* entry = (TGo4RecieverInfo*) RecList.At(n);
00055 if (entry->GetCanvas()==c) {
00056 RecList.Remove(entry);
00057 delete entry;
00058 }
00059 }
00060 RecList.Compress();
00061 }
00062
00063
00064 void TGo4SubmittedCommandsEntry::RemoveRecvEntry(TGo4RecieverInfo *info)
00065 {
00066 if (info!=0) {
00067 RecList.Remove(info);
00068 RecList.Compress();
00069 delete info;
00070 }
00071 }
00072
00073