4 In order for a signal to be connected to object, the object must
5 have Object somewhere in its inheritence tree.
18 - Capable of deleting self if told to be managed.
21 Handles are used for internal memory management. They are a signature not
22 a real class so they can incapsulate any class that has the necessary
25 signature class Handle<ObjType,Policy>
30 ObjType* operator ->();
34 Handle& operator =(ObjType*);
35 Handle& operator =(ObjType&);
36 Handle& operator =(const Handle<O,P> &);
40 Handle(const Handle<O,P>&);
47 Slots are an encapsulation of a callable object. A factory called slot()
48 builds Slots from object/methods, static functions and signals.
50 class Slot#<rettype,ARGS>: public Object
58 Slots build up in a tree to contain a wide number of connection types.
60 There is a class of functions call Adaptors. Adaptors take a slot
61 and alter it to a different profile.
64 bind - bind callback data starting from the end.
65 extend - add dummy arguments to the end of a slot.
66 convert - convert the calling arguments with a function.
68 Internally slots are just handles to an internal abstract slot
69 type called Slot#_, which is a pimple on SlotData.
71 Slots can not be duplicated as they may have a large list of internal
72 data. You should not reuse a slot in multiple lists.
77 A list of slots can be called with a signal. A signal is considered a
80 class Signal#<RETURN,ARGS,Policy>
83 typedef Slot#<RETURN,ARGS> InSlotType;
84 typedef Slot#<MARSH_RETURN,ARGS> OutSlotType;
87 Connection connect(InSlotType& s);
88 MARSH_RETURN emit(ARGS);
89 MARSH_RETURN operator()(ARGS); // alias for emit
95 Two typedefs are specified InSlotType and OutSlotType. InSlotType
96 is the type taken by this signal for connections. OutSlotType
97 is the type of slot this function returns and is determented by
98 the Marshaller. In most cases InSlotType and OutSlotType match,
99 but this is not necessarily the case. Signals do not need to
100 have these typedefs, but it eases building new Signal classes from
103 The basic methods shown there are
104 emit - call all slots contained within.
105 slot - give away a slot that receive incoming calls.
106 connect - insert a slot into the call list.
108 Slots are removed by calling disconnect on their connections.
110 There is also the ablity to have a marshaller that takes care of handling
111 signal callbacks. This functionality is dependent on the implementation
112 of the signal. For the basic signal type, the marshaller is a hidden
115 Connect() may also take optional implementation dependent arguments
116 for specifying behavior. For example, timeout.connect(slot(&foo),10)
117 where the second argument it a time in seconds is a good use of
118 optional connect flags.
120 Additional functionality may optionally be defined such as
121 ablity to check if there are any signals attached (empty()) or
122 remove all connected signals (clear()). However these are
123 not a requirement and are implementation dependent.
128 Connections are given to the user on each connect to allow individual
129 connections to be broken or altered.
138 They are a handle to the data, so when the last connection goes away and
139 the slot is not yet properly held in a Signal the slot will go away.