Developers will not use a TBoldPublisher directly except when Making_a_Class_Subscribable_Task. In most normal use, the methods on TBoldSubscribableObject will be used.
TBoldPublisher performs the publishing part of the Subscription_Mechanism.
If Subscriber already has a subscription with the same RequestedEvent, Events will be merged into that subscription. A consequence of this is that subscribing to the same event multiple times with the same RequestedEvent will only give one subscription.
Parameters
Subscriber
The subscriber to be notified if TBoldPublisher_SendEvent or TBoldPublisher_SendQuery is called with an event matching Event.
Events
The set of events to match
RequestedEvent
The value send as the RequestedEvent parameter to TBoldSubscriber_Receive or TBoldSubscriber_Answer.
Will raise an exception if the publicher still has subscribers. Subscribers should be cleared prior to destruction by calling NotifySubscribersAndClearSubscriptions.
In general this method will be called by the object using the publisher early in the destructor, in order to prepare all subscribers for the destruction, and ensure that no spurious events are generated during the destruction process.
Parameters
Originator
The objects to be sent as the Originator to SendEvent. In general the object using the publisher to become subscribable