EC_Type_Filter.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 /**
00004  *  @file   EC_Type_Filter.h
00005  *
00006  *  $Id: EC_Type_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_TYPE_FILTER_H
00017 #define TAO_EC_TYPE_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_Type_Filter
00031  *
00032  * @brief A filter based on event type/source
00033  *
00034  * This filter only accept events with a predefined type/source,
00035  * both the source and the type can be wildcards.
00036  */
00037 class TAO_RTEvent_Serv_Export TAO_EC_Type_Filter : public TAO_EC_Filter
00038 {
00039 public:
00040   /// Constructor.
00041   TAO_EC_Type_Filter (const RtecEventComm::EventHeader& header);
00042 
00043   // = The TAO_EC_Filter methods, please check the documentation in
00044   // TAO_EC_Filter.
00045   virtual int filter (const RtecEventComm::EventSet& event,
00046                       TAO_EC_QOS_Info& qos_info);
00047   virtual int filter_nocopy (RtecEventComm::EventSet& event,
00048                              TAO_EC_QOS_Info& qos_info);
00049   virtual void push (const RtecEventComm::EventSet& event,
00050                      TAO_EC_QOS_Info& qos_info);
00051   virtual void push_nocopy (RtecEventComm::EventSet& event,
00052                             TAO_EC_QOS_Info& qos_info);
00053   virtual void clear (void);
00054   virtual CORBA::ULong max_event_size (void) const;
00055   virtual int can_match (const RtecEventComm::EventHeader& header) const;
00056   virtual int add_dependencies (const RtecEventComm::EventHeader& header,
00057                                 const TAO_EC_QOS_Info &qos_info);
00058 
00059 private:
00060   TAO_EC_Type_Filter (const TAO_EC_Type_Filter&);
00061   TAO_EC_Type_Filter& operator= (const TAO_EC_Type_Filter&);
00062 
00063   /// Filter an EventSet that contains more than one event.
00064   int filter_set (const RtecEventComm::EventSet& event,
00065                   TAO_EC_QOS_Info& qos_info);
00066 
00067 private:
00068   /// Encapsulate the type/source that we must match.
00069   RtecEventComm::EventHeader header_;
00070 };
00071 
00072 TAO_END_VERSIONED_NAMESPACE_DECL
00073 
00074 #include /**/ "ace/post.h"
00075 #endif /* TAO_EC_TYPE_FILTER_H */

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