Itasca C++ Interface
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
isignalbase.h
Go to the documentation of this file.
1 #pragma once
2 
5 
6 #include "base/src/baseqt.h"
7 
8 namespace itasca {
9 
10 #ifndef DOXYGEN
11  class ISignalBase;
12 #endif
13 
21  // This is a slot base class - used to identify a slot, and to allow a slot to
22  // automatically remove itself.
23  class ISlotBase {
24  public:
27  virtual void attachNotice(ISignalBase *signal)=0;
30  virtual void removeNotice(ISignalBase *signal)=0;
31  };
32 
34 
35 
44  class ISignalBase : public ISlotBase {
45  public:
52  virtual bool remove(ISlotBase *slot,const QString &name=QString())=0;
53  };
54 
56 
65  template <class Param1,class Param2>
66  class ISlot2 {
67  public:
68  virtual ~ISlot2() { }
70  virtual void execute(Param1,Param2)=0;
72  virtual ISlotBase *getBase()=0;
73  };
75 
76  template<class Param1,class Param2> class Signal2;
77 
78 } // namespace itasca
79 // EoF
virtual void execute(Param1, Param2)=0
Execute the attached method with 0, 1 or 2 arguments.
namespace Itasca
Definition: basememory.cpp:9
Definition of a Signal2 object, holding a list of ISlot2 objects.
Definition: isignalbase.h:76
Signal base class.
Definition: isignalbase.h:44
virtual void attachNotice(ISignalBase *signal)=0
virtual void removeNotice(ISignalBase *signal)=0
Slot base class.
Definition: isignalbase.h:23
ISlot2 interface - a two-argument class.
Definition: isignalbase.h:66
virtual bool remove(ISlotBase *slot, const QString &name=QString())=0
All default base headers if Qt is being used.
virtual ISlotBase * getBase()=0
Returns the ISlotBase pointer to the base class from which this ISlot2 is derived.