JX Application Framework
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
JBroadcastSnooper Class Reference

#include <JBroadcastSnooper.h>

Inheritance diagram for JBroadcastSnooper:
[legend]

Public Member Functions

 JBroadcastSnooper (const JBroadcaster *obj)
 
- Public Member Functions inherited from JBroadcaster
 JBroadcaster ()
 
virtual ~JBroadcaster ()
 
JBroadcasteroperator= (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
 
- Protected Member Functions inherited from JBroadcaster
 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)
 

Detailed Description

Interface for JBroadcastSnooper class.

Test class that prints out each message received from objects
that it listens to.

Constructor & Destructor Documentation

◆ JBroadcastSnooper()

JBroadcastSnooper::JBroadcastSnooper ( const JBroadcaster obj)

Member Function Documentation

◆ Receive()

void JBroadcastSnooper::Receive ( JBroadcaster sender,
const Message message 
)
overrideprotectedvirtual

Display the message.

Reimplemented from JBroadcaster.

◆ ReceiveGoingAway()

void JBroadcastSnooper::ReceiveGoingAway ( JBroadcaster sender)
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.


The documentation for this class was generated from the following files: