EC_Negation_Filter.cpp

Go to the documentation of this file.
00001 // $Id: EC_Negation_Filter.cpp 76589 2007-01-25 18:04:11Z elliott_c $
00002 
00003 #include "orbsvcs/Event/EC_Negation_Filter.h"
00004 
00005 ACE_RCSID(Event, EC_Negation_Filter, "$Id: EC_Negation_Filter.cpp 76589 2007-01-25 18:04:11Z elliott_c $")
00006 
00007 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00008 
00009 TAO_EC_Negation_Filter::TAO_EC_Negation_Filter (TAO_EC_Filter* child)
00010   :  child_ (child)
00011 {
00012   this->adopt_child (this->child_);
00013 }
00014 
00015 TAO_EC_Negation_Filter::~TAO_EC_Negation_Filter (void)
00016 {
00017   delete this->child_;
00018 }
00019 
00020 TAO_EC_Filter::ChildrenIterator
00021 TAO_EC_Negation_Filter::begin (void) const
00022 {
00023   return const_cast<TAO_EC_Filter**> (&this->child_);
00024 }
00025 
00026 TAO_EC_Filter::ChildrenIterator
00027 TAO_EC_Negation_Filter::end (void) const
00028 {
00029   return const_cast<TAO_EC_Filter**> (&this->child_) + 1;
00030 }
00031 
00032 int
00033 TAO_EC_Negation_Filter::size (void) const
00034 {
00035   return 1;
00036 }
00037 
00038 int
00039 TAO_EC_Negation_Filter::filter (const RtecEventComm::EventSet& event,
00040                                 TAO_EC_QOS_Info& qos_info)
00041 {
00042   int n =
00043     this->child_->filter (event, qos_info);
00044   if (this->parent () != 0 && n == 0)
00045     {
00046       this->parent ()->push (event, qos_info);
00047       return 1;
00048     }
00049   return 0;
00050 }
00051 
00052 int
00053 TAO_EC_Negation_Filter::filter_nocopy (RtecEventComm::EventSet& event,
00054                                    TAO_EC_QOS_Info& qos_info)
00055 {
00056   int n =
00057     this->child_->filter_nocopy (event, qos_info);
00058   if (this->parent () != 0 && n == 0)
00059     {
00060       this->parent ()->push_nocopy (event, qos_info);
00061       return 1;
00062     }
00063   return 0;
00064 }
00065 
00066 void
00067 TAO_EC_Negation_Filter::push (const RtecEventComm::EventSet&,
00068                                  TAO_EC_QOS_Info&)
00069 {
00070 }
00071 
00072 void
00073 TAO_EC_Negation_Filter::push_nocopy (RtecEventComm::EventSet&,
00074                                         TAO_EC_QOS_Info&)
00075 {
00076 }
00077 
00078 void
00079 TAO_EC_Negation_Filter::clear (void)
00080 {
00081   this->child_->clear ();
00082 }
00083 
00084 CORBA::ULong
00085 TAO_EC_Negation_Filter::max_event_size (void) const
00086 {
00087   return this->child_->max_event_size ();
00088 }
00089 
00090 int
00091 TAO_EC_Negation_Filter::can_match (
00092       const RtecEventComm::EventHeader& header) const
00093 {
00094   return !this->child_->can_match (header);
00095 }
00096 
00097 int
00098 TAO_EC_Negation_Filter::add_dependencies (
00099       const RtecEventComm::EventHeader&,
00100       const TAO_EC_QOS_Info &)
00101 {
00102   return 0;
00103 }
00104 
00105 TAO_END_VERSIONED_NAMESPACE_DECL

Generated on Tue Feb 2 17:44:05 2010 for TAO_RTEvent by  doxygen 1.4.7