EC_Filter.cpp

Go to the documentation of this file.
00001 // $Id: EC_Filter.cpp 76589 2007-01-25 18:04:11Z elliott_c $
00002 
00003 #include "orbsvcs/Event/EC_Filter.h"
00004 #include "orbsvcs/Event/EC_QOS_Info.h"
00005 
00006 #include "tao/ORB_Constants.h"
00007 
00008 #if ! defined (__ACE_INLINE__)
00009 #include "orbsvcs/Event/EC_Filter.inl"
00010 #endif /* __ACE_INLINE__ */
00011 
00012 ACE_RCSID (Event,
00013            EC_Filter,
00014            "$Id: EC_Filter.cpp 76589 2007-01-25 18:04:11Z elliott_c $")
00015 
00016 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00017 
00018 TAO_EC_Filter::~TAO_EC_Filter (void)
00019 {
00020 }
00021 
00022 void
00023 TAO_EC_Filter::adopt_child (TAO_EC_Filter* child)
00024 {
00025   child->parent_ = this;
00026 }
00027 
00028 TAO_EC_Filter::ChildrenIterator
00029 TAO_EC_Filter::begin (void) const
00030 {
00031   return 0;
00032 }
00033 
00034 TAO_EC_Filter::ChildrenIterator
00035 TAO_EC_Filter::end (void) const
00036 {
00037   return 0;
00038 }
00039 
00040 int
00041 TAO_EC_Filter::size (void) const
00042 {
00043   return 0;
00044 }
00045 
00046 void
00047 TAO_EC_Filter::get_qos_info (TAO_EC_QOS_Info& qos_info)
00048 {
00049   ACE_UNUSED_ARG (qos_info);
00050   throw CORBA::NO_IMPLEMENT (TAO::VMCID, CORBA::COMPLETED_NO);
00051 }
00052 
00053 // ****************************************************************
00054 
00055 int
00056 TAO_EC_Null_Filter::filter (const RtecEventComm::EventSet& event,
00057                             TAO_EC_QOS_Info& qos_info)
00058 {
00059   // This is a leaf, no need to query any children, and we accept all
00060   // events, so push it.
00061   this->push (event, qos_info);
00062   return 1;
00063 }
00064 
00065 int
00066 TAO_EC_Null_Filter::filter_nocopy (RtecEventComm::EventSet& event,
00067                                    TAO_EC_QOS_Info& qos_info)
00068 {
00069   // This is a leaf, no need to query any children, and we accept all
00070   // events, so push it.
00071   this->push_nocopy (event, qos_info);
00072   return 1;
00073 }
00074 
00075 void
00076 TAO_EC_Null_Filter::push (const RtecEventComm::EventSet& event,
00077                           TAO_EC_QOS_Info& qos_info)
00078 {
00079   if (this->parent () != 0)
00080     this->parent ()->push (event, qos_info);
00081 }
00082 
00083 void
00084 TAO_EC_Null_Filter::push_nocopy (RtecEventComm::EventSet& event,
00085                                  TAO_EC_QOS_Info& qos_info)
00086 {
00087   if (this->parent () != 0)
00088     this->parent ()->push_nocopy (event, qos_info);
00089 }
00090 
00091 void
00092 TAO_EC_Null_Filter::clear (void)
00093 {
00094   // do nothing
00095 }
00096 
00097 CORBA::ULong
00098 TAO_EC_Null_Filter::max_event_size (void) const
00099 {
00100   // @@ Is there a better way to express this?
00101   return 0;
00102 }
00103 
00104 int
00105 TAO_EC_Null_Filter::can_match (const RtecEventComm::EventHeader&) const
00106 {
00107   // @@ This method should be correctly so we can implement null
00108   // filtering at the consumers but real filtering on the suppliers.
00109   return 1;
00110 }
00111 
00112 int
00113 TAO_EC_Null_Filter::add_dependencies (
00114       const RtecEventComm::EventHeader &,
00115       const TAO_EC_QOS_Info &)
00116 
00117 {
00118   return 0;
00119 }
00120 
00121 TAO_END_VERSIONED_NAMESPACE_DECL

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