Classes Files

Wombat::MamaRegexChannelFilter

A MamaResourcePool is a convenience wrapper to allow easy subscription and management of OpenMAMA related resources

Public Functions

  Name
  MamaRegexChannelFilter()
Creates a MAMA regex filter to help filter strings into channels (ints). The channel itself has no special meaning - it’s simply a number to produce when each regular expression is matched.
void setDefaultChannel(int channelId)
Sets a default channel to use if no filters produce hits during matching.
void addRegex(string regexStr, int channelId)
Adds a regex string and associated integer. During calls to getChannel, the target string will be matched against this regular expression to see which channel matches it.
int getChannel(string target)
Looks up all channel filters to see which channel this target should be routed to.

Public Functions Documentation

function MamaRegexChannelFilter

MamaRegexChannelFilter()

Creates a MAMA regex filter to help filter strings into channels (ints). The channel itself has no special meaning - it’s simply a number to produce when each regular expression is matched.

function setDefaultChannel

void setDefaultChannel(
    int channelId
)

Sets a default channel to use if no filters produce hits during matching.

function addRegex

void addRegex(
    string regexStr,
    int channelId
)

Adds a regex string and associated integer. During calls to getChannel, the target string will be matched against this regular expression to see which channel matches it.

function getChannel

int getChannel(
    string target
)

Looks up all channel filters to see which channel this target should be routed to.


Updated on 2023-03-31 at 15:29:32 +0100