# MessageRelay Class Reference

A message handler relay. More...

`#include <yatengine.h>`

Inheritance diagram for MessageRelay:

List of all members.

## Public Member Functions

| MessageRelay (const char *name, MessageReceiver *receiver, int id, int priority=100)
virtual bool | received (Message &msg)

## Detailed Description

A message handler relay.

A message handler that allows to relay several messages to a single receiver

## Constructor & Destructor Documentation

MessageRelay | ( | const char * | name,
|  | MessageReceiver * | receiver,
|  | int | id,
|  | int | priority = `100` |
| ) |  |  | `[inline]`

Creates a new message relay.

Parameters:

  | name | Name of the handled message - may be NULL
  | receiver | Receiver of th relayed messages
  | id | Numeric identifier to pass to receiver
  | priority | Priority of the handler, 0 = top

## Member Function Documentation

virtual bool received | ( | Message & | msg | ) | `[inline, virtual]`

This method is called whenever the registered name matches the message.

Parameters:

  | msg | The received message

Returns:
  True to stop processing, false to try other handlers

Implements MessageHandler.

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

- yatengine.h