#include <basicobject.h>
Inheritance diagram for SignalMultiplier:
Public Member Functions | |
DECLSPEC | SignalMultiplier (const char *name, BasicObject *parent) |
DECLSPEC | SignalMultiplier (TiXmlElement *el, BasicObject *parent) |
DECLSPEC void | addSlot (Callback func, BasicObject *aim) |
DECLSPEC void | removeSlot (Callback func, BasicObject *aim) |
Static Public Member Functions | |
static void | event (void *sender, BasicObject *aim, void *data) |
Protected Member Functions | |
DECLSPEC void | onInit () |
This class is designed to be able to send an event to more than just one slot. To do so, create a SignalMultiplier object and connect its "event" slot with a signal. Furthermore you have to add slots that should recieve the event with addSlot().
SignalMultiplier::SignalMultiplier | ( | TiXmlElement * | el, | |
BasicObject * | parent | |||
) |
Construction, using XML-data. The XML element must have children, called "Slot", with each having an attribute "Aim".
void SignalMultiplier::onInit | ( | ) | [protected, virtual] |
Initializes the object's variables by reading data from the XML element. If there were no XML data used for creation, nothing is done. This function calls onInit() of its children recursively (after it has inited itself). It is highly recommended to call BasicObject::onInit(), usually at the end of the onInit() method, when overwriting it in a derived class.
Reimplemented from BasicObject.