EC_And_Filter.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 /**
00004  *  @file   EC_And_Filter.h
00005  *
00006  *  $Id: EC_And_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_AND_FILTER_H
00017 #define TAO_EC_AND_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_And_Filter
00030  *
00031  * @brief The 'logical and' filter.
00032  *
00033  * This filter has a set of children (fixed at creation time),
00034  * only if all the children accept an event it does so too.
00035  *
00036  * <H2>Memory Management</H2>
00037  * It assumes ownership of the children.
00038  */
00039 class TAO_RTEvent_Serv_Export TAO_EC_And_Filter : public TAO_EC_Filter
00040 {
00041 public:
00042   /// Constructor. It assumes ownership of both the array and the
00043   /// children.
00044   TAO_EC_And_Filter (TAO_EC_Filter* children[],
00045                              size_t n);
00046 
00047   /// Destructor
00048   virtual ~TAO_EC_And_Filter (void);
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_And_Filter (const TAO_EC_And_Filter&);
00071   TAO_EC_And_Filter& operator= (const TAO_EC_And_Filter&);
00072 
00073 private:
00074   /// The children
00075   TAO_EC_Filter** children_;
00076 
00077   /// The number of children.
00078   size_t n_;
00079 };
00080 
00081 TAO_END_VERSIONED_NAMESPACE_DECL
00082 
00083 #include /**/ "ace/post.h"
00084 #endif /* TAO_EC_AND_FILTER_H */

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