diff options
Diffstat (limited to 'TAO/orbsvcs/orbsvcs/Notify/Proxy.inl')
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Notify/Proxy.inl | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Proxy.inl b/TAO/orbsvcs/orbsvcs/Notify/Proxy.inl index 3610f2b3167..1d74171a622 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/Proxy.inl +++ b/TAO/orbsvcs/orbsvcs/Notify/Proxy.inl @@ -5,3 +5,39 @@ TAO_NS_Proxy::updates_off (void) { return this->updates_off_; } + +ACE_INLINE CORBA::Boolean +TAO_NS_Proxy::check_filters (const TAO_NS_Event_var &event + , TAO_NS_FilterAdmin& parent_filter_admin + , CosNotifyChannelAdmin::InterFilterGroupOperator filter_operator + ACE_ENV_ARG_DECL) +{ + return this->check_filters (event.get (), parent_filter_admin, filter_operator ACE_ENV_ARG_PARAMETER); +} + +ACE_INLINE CORBA::Boolean +TAO_NS_Proxy::check_filters (const TAO_NS_Event* event + , TAO_NS_FilterAdmin& parent_filter_admin + , CosNotifyChannelAdmin::InterFilterGroupOperator filter_operator + ACE_ENV_ARG_DECL) +{ + // check if it passes the parent filter. + CORBA::Boolean parent_val = + parent_filter_admin.match (event ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN (0); + + CORBA::Boolean val = 0; + + if (filter_operator == CosNotifyChannelAdmin::AND_OP) + { + val = parent_val && this->filter_admin_.match (event ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN (0); + } + else + { + val = parent_val || this->filter_admin_.match (event ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN (0); + } + + return val; +} |