SignalBase.h

Go to the documentation of this file.
00001 #ifndef __SIGNALBASE_H__
00002 #define __SIGNALBASE_H__
00003 
00004 /*
00005 
00006 $Header$
00007 
00008 */
00009 
00010 #include "Object.h"
00011 #include "String.h"
00012 #include "Slot.h"
00013 
00014 using namespace std;
00015 
00016 class SignalBase : public Object
00017 {
00018 
00019   PYLON_OBJECT
00020 
00021 public:
00022 
00023   SignalBase(const String &className, const String &signalName);
00024   virtual ~SignalBase();
00025 
00026   String name() const;
00027   String ownerClassName() const;
00028 
00029   virtual int disconnect(const Object *slotObject) = 0;
00030 
00031   int listSlots(String &text);
00032 
00033   const Object *_orphanSlotObject;
00034   SlotMethod _orphanSlotMethod;
00035   SlotMap _slots;
00036 
00037 protected:
00038 
00039   int bind(Object *obj);
00040   int unbind(Object *obj);
00041 
00042 private:
00043 
00044   String _className;
00045   String _name;
00046 };
00047 
00048 inline
00049 String SIGNAL_COLOR_TITLE(const String &str)
00050 {
00051   return COLOR_STRING(str, LIGHT_CYAN, NONE);
00052 }
00053 
00054 inline
00055 SignalBase *SIGNAL_BASE(Object *obj)
00056 {
00057   return obj ? dynamic_cast<SignalBase *>(obj) : NULL;
00058 }
00059 
00060 #endif

Generated on Thu Sep 6 20:11:25 2007 for Pylon Application Platform by  doxygen 1.5.1