JX Application Framework
|
#include <JBroadcastSnooper.h>
Public Member Functions | |
JBroadcastSnooper (const JBroadcaster *obj) | |
![]() | |
JBroadcaster () | |
virtual | ~JBroadcaster () |
JBroadcaster & | operator= (const JBroadcaster &source) |
bool | HasSenders () const |
JSize | GetSenderCount () const |
bool | HasRecipients () const |
JSize | GetRecipientCount () const |
virtual JString | ToString () const |
template<class T > | |
void | ListenTo (const JBroadcaster *sender, const std::function< void(const T &)> &f) |
Protected Member Functions | |
void | Receive (JBroadcaster *sender, const Message &message) override |
void | ReceiveGoingAway (JBroadcaster *sender) override |
![]() | |
JBroadcaster (const JBroadcaster &source) | |
void | ListenTo (const JBroadcaster *sender) |
void | StopListening (const JBroadcaster *sender) |
void | ClearWhenGoingAway (const JBroadcaster *sender, void *pointerToMember) |
void | StopListening (const JBroadcaster *sender, const std::type_info &messageType) |
template<class T > | |
void | Send (JBroadcaster *recipient, const T &message) |
template<class T > | |
void | Broadcast (const T &message) |
void | SendWithFeedback (JBroadcaster *recipient, Message *message) |
void | BroadcastWithFeedback (Message *message) |
virtual void | ReceiveWithFeedback (JBroadcaster *sender, Message *message) |
Interface for JBroadcastSnooper class.
Test class that prints out each message received from objects that it listens to.
JBroadcastSnooper::JBroadcastSnooper | ( | const JBroadcaster * | obj | ) |
|
overrideprotectedvirtual |
Display the message.
Reimplemented from JBroadcaster.
|
overrideprotectedvirtual |
The given sender has been deleted.
Warning: Since this function may be called from within a -chain- of destructors, it is not usually safe to do anything inside this function other than directly changing instance variables (e.g. setting pointers to nullptr).
This function is not pure virtual because not all classes will want to implement it.
Reimplemented from JBroadcaster.