|
|
@ -183,16 +183,27 @@ protected function Finalizer() |
|
|
|
* Must be a properly allocated `AcediaObject`. |
|
|
|
* Must be a properly allocated `AcediaObject`. |
|
|
|
* @return New `Slot` object that will be connected to the caller `Signal` if |
|
|
|
* @return New `Slot` object that will be connected to the caller `Signal` if |
|
|
|
* provided `receiver` is correct. Guaranteed to have class |
|
|
|
* provided `receiver` is correct. Guaranteed to have class |
|
|
|
* `relatedSlotClass`. |
|
|
|
* `relatedSlotClass`. Guaranteed to not be `none` if allocated `receiver` |
|
|
|
|
|
|
|
* is provided. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public final function Slot NewSlot(AcediaObject receiver) |
|
|
|
public final function Slot NewSlot(AcediaObject receiver) |
|
|
|
{ |
|
|
|
{ |
|
|
|
local Slot newSlot; |
|
|
|
local Slot newSlot; |
|
|
|
|
|
|
|
if (receiver == none) { |
|
|
|
|
|
|
|
return none; |
|
|
|
|
|
|
|
} |
|
|
|
newSlot = Slot(_.memory.Allocate(relatedSlotClass)); |
|
|
|
newSlot = Slot(_.memory.Allocate(relatedSlotClass)); |
|
|
|
newSlot.Initialize(self, receiver); |
|
|
|
if (newSlot.Initialize(self, receiver)) |
|
|
|
|
|
|
|
{ |
|
|
|
AddSlot(newSlot, receiver); |
|
|
|
AddSlot(newSlot, receiver); |
|
|
|
return newSlot; |
|
|
|
return newSlot; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
newSlot.FreeSelf(); |
|
|
|
|
|
|
|
if (!receiver.IsAllocated()) { |
|
|
|
|
|
|
|
Disconnect(receiver); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return none; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Disconnects all of the `receiver`'s `Slot`s from the caller `Signal`. |
|
|
|
* Disconnects all of the `receiver`'s `Slot`s from the caller `Signal`. |
|
|
|