00001 // -*- C++ -*- 00002 00003 /** 00004 * @file EC_Negation_Filter.h 00005 * 00006 * $Id: EC_Negation_Filter.h 76589 2007-01-25 18:04:11Z elliott_c $ 00007 * 00008 * @author Carlos O'Ryan (coryan@cs.wustl.edu) 00009 * 00010 * Based on previous work by Tim Harrison (harrison@cs.wustl.edu) and 00011 * other members of the DOC group. More details can be found in: 00012 * 00013 * http://doc.ece.uci.edu/~coryan/EC/index.html 00014 */ 00015 00016 #ifndef TAO_EC_NEGATION_FILTER_H 00017 #define TAO_EC_NEGATION_FILTER_H 00018 #include /**/ "ace/pre.h" 00019 00020 #include "orbsvcs/Event/EC_Filter.h" 00021 #include /**/ "orbsvcs/Event/event_serv_export.h" 00022 00023 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00024 # pragma once 00025 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00026 00027 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00028 00029 /** 00030 * @class TAO_EC_Negation_Filter 00031 * 00032 * @brief The negation filter. 00033 * 00034 * This filter accepts all the events rejected by its child, and 00035 * rejects any events accepted by the child. 00036 * 00037 * <H2>Memory Management</H2> 00038 * It assumes ownership of its child. 00039 */ 00040 class TAO_RTEvent_Serv_Export TAO_EC_Negation_Filter : public TAO_EC_Filter 00041 { 00042 public: 00043 /// Constructor. It assumes ownership of the child. 00044 TAO_EC_Negation_Filter (TAO_EC_Filter* child); 00045 00046 /// Destructor 00047 virtual ~TAO_EC_Negation_Filter (void); 00048 00049 00050 // = The TAO_EC_Filter methods, please check the documentation in 00051 // TAO_EC_Filter. 00052 virtual ChildrenIterator begin (void) const; 00053 virtual ChildrenIterator end (void) const; 00054 virtual int size (void) const; 00055 virtual int filter (const RtecEventComm::EventSet& event, 00056 TAO_EC_QOS_Info& qos_info); 00057 virtual int filter_nocopy (RtecEventComm::EventSet& event, 00058 TAO_EC_QOS_Info& qos_info); 00059 virtual void push (const RtecEventComm::EventSet& event, 00060 TAO_EC_QOS_Info& qos_info); 00061 virtual void push_nocopy (RtecEventComm::EventSet& event, 00062 TAO_EC_QOS_Info& qos_info); 00063 virtual void clear (void); 00064 virtual CORBA::ULong max_event_size (void) const; 00065 virtual int can_match (const RtecEventComm::EventHeader& header) const; 00066 virtual int add_dependencies (const RtecEventComm::EventHeader& header, 00067 const TAO_EC_QOS_Info &qos_info); 00068 00069 private: 00070 TAO_EC_Negation_Filter (const TAO_EC_Negation_Filter&); 00071 TAO_EC_Negation_Filter& operator= (const TAO_EC_Negation_Filter&); 00072 00073 private: 00074 /// The child 00075 TAO_EC_Filter* child_; 00076 }; 00077 00078 TAO_END_VERSIONED_NAMESPACE_DECL 00079 00080 #include /**/ "ace/post.h" 00081 #endif /* TAO_EC_NEGATION_FILTER_H */