---
name: "corelinux_Mediator"
section: "3"
platform: "linux"
package: "libcorelinux-dev"
version: "0.4.32-5"
release: "Debian 3.1 (Sarge)"
platforms: ["linux"]
url: "https://new.carta.tech/corelinux_Mediator"
---

# corelinux\_Mediator(3)

Mediator declares an interface for communicating with Colleague objects.

## NAME

corelinux::Mediator - **Mediator** declares an interface for communicating with **Colleague** objects.

## SYNOPSIS

`#include <Mediator.hpp>`

Inherited by **ListMediator**.

### Public Member Functions

**Mediator** (void)\
 *Default constructor.*  **Mediator** (**MediatorCref**)\
 *Copy constructor.*  virtual **~Mediator** (void)\
 *Virtual destructor.*  **MediatorRef** **operator=** (**MediatorCref**)\
 *Assignment operator.*  bool **operator==** (**MediatorCref**) const \
 *Equality operator.*  virtual void **action** (**Event**\< **Identifier** \> \*)  throw ( NullPointerException )\

### Protected Member Functions

virtual void **colleagueCreated** (**ColleaguePtr**)=0\
 *colleagueCreated requires a implementation for derivations that need to gather information from the* **Colleague** *to distribute action events*  virtual **Iterator**\< **ColleaguePtr** \> \* **createIterator** (**Event**\< **Identifier** \> \*)=0\
 *When action is called on the* **Mediator***, it will ask the implementation for the Colleagues that are interested in the event identified by the identifier.*  virtual void **destroyIterator** (**Iterator**\< **ColleaguePtr** \> \*)=0\
 *Called when action is through with the colleague iteration.*

## Detailed Description

**Mediator** declares an interface for communicating with **Colleague** objects.

## Member Function Documentation

### virtual void corelinux::Mediator::colleagueCreated (ColleaguePtr)` [protected, pure virtual]`

colleagueCreated requires a implementation for derivations that need to gather information from the **Colleague** to distribute action events **Parameters:**

*Colleague* pointer

Implemented in **ListMediator**.

### virtual Iterator\<ColleaguePtr\>\* corelinux::Mediator::createIterator (Event\< Identifier \> \*)` [protected, pure virtual]`

When action is called on the **Mediator**, it will ask the implementation for the Colleagues that are interested in the event identified by the identifier. **Parameters:**

*IdentifierCref* key to interested parties

**Returns:**

**Iterator** over **Colleague** pointer

### virtual void corelinux::Mediator::destroyIterator (Iterator\< ColleaguePtr \> \*)` [protected, pure virtual]`

Called when action is through with the colleague iteration. **Parameters:**

*Iterator* over **Colleague** pointer

## Author

Generated automatically by Doxygen for CoreLinux++ from the source code.
