void
formatters_data_channels::update(message const& msg) {

	channel_info const &msg_ch_info = msg.get_channel_info();
	assert(!msg_ch_info.empty());

	if (!msg_ch_info.data().empty()) {
		channels_data::iterator ch_it = channels_data_.find(msg_ch_info);
		if (channels_data_.end() != ch_it) {
			channel_data &ch_data = ch_it->second;
			ch_data.first.assign(msg_ch_info.data());
		}
	}
}
bool
formatters_data_channels::allow_message(message const& msg, message_filter const *filter) const {

	channel_info const &msg_ch_info = msg.get_channel_info();
	if (msg_ch_info.empty()) {
		return false;
	}

	channels_data::const_iterator ch_it = channels_data_.find(msg_ch_info);
	if (channels_data_.end() == ch_it) {
		return false;
	}
	channel_data const &ch_data = ch_it->second;
	return NULL == filter || filter->allow_message(msg, ch_data.first, ch_data.second);
}