EC_Disjunction_Filter.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 /**
00004  *  @file   EC_Disjunction_Filter.h
00005  *
00006  *  $Id: EC_Disjunction_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_DISJUNCTION_FILTER_H
00017 #define TAO_EC_DISJUNCTION_FILTER_H
00018 #include /**/ "ace/pre.h"
00019 
00020 #include "orbsvcs/Event/EC_Filter.h"
00021 
00022 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00023 # pragma once
00024 #endif /* ACE_LACKS_PRAGMA_ONCE */
00025 
00026 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00027 
00028 /**
00029  * @class TAO_EC_Disjunction_Filter
00030  *
00031  * @brief The disjunction filter.
00032  *
00033  * This filter has a set of children (fixed at creation time), if
00034  * any of the children accepts an event then it also does.
00035  *
00036  * <H2>Memory Management</H2>
00037  * It assumes ownership of the children.
00038  */
00039 class TAO_RTEvent_Serv_Export TAO_EC_Disjunction_Filter : public TAO_EC_Filter
00040 {
00041 public:
00042   /// Constructor. It assumes ownership of both the array and the
00043   /// children.
00044   TAO_EC_Disjunction_Filter (TAO_EC_Filter* children[],
00045                              size_t n);
00046 
00047   /// Destructor
00048   virtual ~TAO_EC_Disjunction_Filter (void);
00049 
00050 
00051   // = The TAO_EC_Filter methods, please check the documentation in
00052   // TAO_EC_Filter.
00053   virtual ChildrenIterator begin (void) const;
00054   virtual ChildrenIterator end (void) const;
00055   virtual int size (void) const;
00056   virtual int filter (const RtecEventComm::EventSet& event,
00057                       TAO_EC_QOS_Info& qos_info);
00058   virtual int filter_nocopy (RtecEventComm::EventSet& event,
00059                              TAO_EC_QOS_Info& qos_info);
00060   virtual void push (const RtecEventComm::EventSet& event,
00061                      TAO_EC_QOS_Info& qos_info);
00062   virtual void push_nocopy (RtecEventComm::EventSet& event,
00063                             TAO_EC_QOS_Info& qos_info);
00064   virtual void clear (void);
00065   virtual CORBA::ULong max_event_size (void) const;
00066   virtual int can_match (const RtecEventComm::EventHeader& header) const;
00067   virtual int add_dependencies (const RtecEventComm::EventHeader& header,
00068                                 const TAO_EC_QOS_Info &qos_info);
00069 
00070 private:
00071   TAO_EC_Disjunction_Filter (const TAO_EC_Disjunction_Filter&);
00072   TAO_EC_Disjunction_Filter& operator= (const TAO_EC_Disjunction_Filter&);
00073 
00074 private:
00075   /// The children
00076   TAO_EC_Filter** children_;
00077 
00078   /// The number of children.
00079   size_t n_;
00080 };
00081 
00082 TAO_END_VERSIONED_NAMESPACE_DECL
00083 
00084 #include /**/ "ace/post.h"
00085 #endif /* TAO_EC_DISJUNCTION_FILTER_H */

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