Yate: MessageFilter Class Reference

Yate

Public Member Functions | List of all members
MessageFilter Class Reference

A message filter. More...

`#include <yatengine.h>`

Inheritance diagram for MessageFilter:

## Public Member Functions
| MessageFilter ()
| ~MessageFilter ()
bool | matchesMsg (const Message &msg) const
const MatchingItemBase * | getFilter () const
const MatchingItemBase * | getMsgFilter () const
void | setFilter (MatchingItemBase *filter)
void | setMsgFilter (MatchingItemBase *filter)
void | clearFilter ()
void | clearMsgFilter ()
void | setFilter (NamedString *filter)
void | setFilter (const char *name, const char *value)

## Detailed Description

A message filter.

This class holds a message filter

## Constructor & Destructor Documentation

## ◆ MessageFilter()

MessageFilter | ( |  | ) |
| inline

Constructor

## ◆ ~MessageFilter()

~MessageFilter | ( |  | ) |
| inline

Destructor

## Member Function Documentation

## ◆ clearFilter()

void clearFilter | ( |  | ) |
| inline

Remove and destroy the message parameters filter

## ◆ clearMsgFilter()

void clearMsgFilter | ( |  | ) |
| inline

Remove and destroy the message filter

## ◆ getFilter()

const MatchingItemBase * getFilter | ( |  | ) | const
| inline

Retrieve the message parameters filter

Returns
  MatchingItemBase pointer, NULL if not set

Referenced by MessageHandler::filter().

## ◆ getMsgFilter()

const MatchingItemBase * getMsgFilter | ( |  | ) | const
| inline

Retrieve the message filter

Returns
  MatchingItemBase pointer, NULL if not set

## ◆ matchesMsg()

bool matchesMsg | ( | const Message & | msg | ) | const
| inline

Check if a message matches this filter's rules

Parameters

  msg | The message to match

## ◆ setFilter() [1/3]

void setFilter | ( | const char * | name,
|  | const char * | value )
| inline

Set the message parameters filter

Parameters

  name | Name of the parameter to filter
  value | Value of the parameter to filter

References setFilter().

## ◆ setFilter() [2/3]

void setFilter | ( | MatchingItemBase * | filter | ) |
| inline

Set the message parameters filter

Parameters

  filter | Pointer to matching list to set, will be owned and destroyed by the filter

Referenced by setFilter().

## ◆ setFilter() [3/3]

void setFilter | ( | NamedString * | filter | ) |

Set the message parameters filter

Parameters

  filter | Pointer to the filter to set, will be owned and destroyed by this object. The filter may be a NamedPointer carrying a Regexp

## ◆ setMsgFilter()

void setMsgFilter | ( | MatchingItemBase * | filter | ) |
| inline

Set the message filter

Parameters

  filter | Pointer to matching list to set, will be owned and destroyed by the filter

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

- yatengine.h