GLOW API version 1.0 reference

Back to
Table of contents


class TReceiver

General information

type: abstract template < typename T > class
inherits: (none)
module: glowSenderReceiver

TReceiver is a templated class that represents the receiving endpoint of an object communication line. The template type is the type of message that is understood by this receiver. TSenders templated on the same message type should be bound to this receiver. A TReceiver may be deleted safely: any senders bound to it will be notified.

Most GLOW programs will encounter TReceivers when dealing with menus, idle and timer tasks, or widgets.

Types

Types

typename MessageType

A synonym for the type of message.

Methods

Destructor

~TReceiver(void)

Informs all bound senders that this receiver is going away. The senders are automatically unbound from this receiver.

Information on senders
A receiver can provide rudimentary information on which senders are bound to it.

unsigned int NumSenders(void)

Returns the number of senders bound to this receiver.

unsigned int NumTrackers(void)

Returns the number of trackers bound to this receiver.

Overrideable methods

Receiving messages

virtual void OnMessage(T message) = 0

This is a pure virtual method that must be overridden by a subclass. It is called whenever the receiver receives a message.

Back to
Table of contents


The GLOW Toolkit