SignalDeclaration.h File Reference

#include "SignalBase.h"
#include "Slot.h"

Include dependency graph for SignalDeclaration.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Signal< M >

Defines

#define SIGNAL(name,...)
#define EMIT(signalName,...)
#define CONNECT(signalObjectPtr, signalName, slotObjectPtr, slotClassName, slotMethodName)   ((signalObjectPtr)->_signal_##signalName.connect(slotObjectPtr, static_cast<SlotMethod_##slotMethodName>(&slotClassName::slotMethodName)))

Variables

static const char *const MSG_SIGNAL_SLOT_ALREADY_EXISTS = "Slot for this signal and this object (class = %s, id = %llu) already exists."
static const char *const MSG_SIGNAL_SLOT_DOES_NOT_EXISTS = "Slot for this signal and this object (class = %s, id = %llu) does not exist."


Define Documentation

#define CONNECT ( signalObjectPtr,
signalName,
slotObjectPtr,
slotClassName,
slotMethodName   )     ((signalObjectPtr)->_signal_##signalName.connect(slotObjectPtr, static_cast<SlotMethod_##slotMethodName>(&slotClassName::slotMethodName)))

Definition at line 83 of file SignalDeclaration.h.

Referenced by Inetd::Inetd(), FSh::start(), Browser::start(), Syslog::Syslog(), and Syslogd::Syslogd().

#define EMIT ( signalName,
...   ) 

Value:

{ \
  if (!suspended()) \
    if (_signal_##signalName._orphanSlotObject) { \
      if (!_signal_##signalName._orphanSlotObject->suspended()) { \
        ((Object *)(_signal_##signalName._orphanSlotObject))->profBegin(); \
        ((Object *)(_signal_##signalName._orphanSlotObject)->*(Signal_##signalName##_SlotMethod)(_signal_##signalName._orphanSlotMethod))(__VA_ARGS__); \
        ((Object *)(_signal_##signalName._orphanSlotObject))->profEnd(); \
      } \
    } else { \
        Object *slotObject; \
        Signal_##signalName##_SlotMethod slotMethod; \
        SlotMap::const_iterator i = _signal_##signalName._slots.begin(); \
        SlotMap::const_iterator ie = _signal_##signalName._slots.end(); \
        while (i != ie) { \
          slotObject = (Object *)(i->first); \
          if (!slotObject->suspended()) { \
            SlotList::const_iterator j = i->second.begin(); \
            SlotList::const_iterator je = i->second.end(); \
            while (j != je) { \
              slotMethod = (Signal_##signalName##_SlotMethod)(*j); \
              slotObject->profBegin(); \
              (slotObject->*slotMethod)(__VA_ARGS__); \
              slotObject->profEnd(); \
              ++j; \
            } \
          } \
          ++i; \
        } \
      } \
}

Definition at line 51 of file SignalDeclaration.h.

Referenced by TcpServer::accept(), Connection::close(), Core::dispatch(), Error::errorFatal(), Service< T >::fork(), Registry< T >::get(), BrowserWindow::hide(), Error::info(), ServiceBase::kill(), ServiceBase::notify(), BrowserWindow::onDelete(), BrowserWindow::onLoadFinished(), BrowserWindow::onLoadStarted(), Timer::resume(), ServiceBase::resume(), Registry< T >::set(), TcpConnection::setConnected(), Connection::setDataReady(), Connection::setDead(), Timer::shoot(), BrowserWindow::show(), Timer::suspend(), ServiceBase::suspend(), Error::verror(), and Error::warning().

#define SIGNAL ( name,
...   ) 

Value:

typedef int (Object::*Signal_##name##_SlotMethod)(__VA_ARGS__); \
static String signal_##name##_ownerClassName() \
{ \
  return CLASS_NAME(); \
} \
class Signal_##name : public Signal<Signal_##name##_SlotMethod> \
{ \
  PYLON_OBJECT \
public: \
  Signal_##name() : Signal<Signal_##name##_SlotMethod>(signal_##name##_ownerClassName(), #name) {} \
}; \
Signal_##name _signal_##name;

Definition at line 37 of file SignalDeclaration.h.


Variable Documentation

const char* const MSG_SIGNAL_SLOT_ALREADY_EXISTS = "Slot for this signal and this object (class = %s, id = %llu) already exists." [static]

Definition at line 14 of file SignalDeclaration.h.

const char* const MSG_SIGNAL_SLOT_DOES_NOT_EXISTS = "Slot for this signal and this object (class = %s, id = %llu) does not exist." [static]

Definition at line 15 of file SignalDeclaration.h.

Referenced by Signal< M >::disconnect().


Generated on Thu Sep 6 20:12:39 2007 for Pylon Application Platform by  doxygen 1.5.1