00001 // -*- C++ -*- 00002 // 00003 //$Id: FilterAdmin.inl 85524 2009-06-05 14:35:28Z johnnyw $ 00004 00005 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00006 00007 ACE_INLINE CORBA::Boolean 00008 TAO_Notify_FilterAdmin::match (const TAO_Notify_Event* event) 00009 { 00010 ACE_GUARD_THROW_EX (TAO_SYNCH_MUTEX, ace_mon, this->lock_, 00011 CORBA::INTERNAL ()); 00012 00013 // If no filter is active, match is successfull. 00014 if (this->filter_list_.current_size () == 0) 00015 return 1; 00016 00017 // We want to return true if atleast one constraint matches. 00018 FILTER_LIST::ITERATOR iter (this->filter_list_); 00019 FILTER_LIST::ENTRY *entry = 0; 00020 CORBA::Boolean ret_val = 0; 00021 00022 for (; iter.next (entry); iter.advance ()) 00023 { 00024 ret_val = event->do_match (entry->int_id_.in ()); 00025 00026 if (ret_val == 1) 00027 return 1; 00028 } 00029 00030 return 0; 00031 } 00032 00033 TAO_END_VERSIONED_NAMESPACE_DECL