EC_Basic_Filter_Builder.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 /**
00004  *  @file   EC_Basic_Filter_Builder.h
00005  *
00006  *  $Id: EC_Basic_Filter_Builder.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_BASIC_FILTER_BUILDER_H
00017 #define TAO_EC_BASIC_FILTER_BUILDER_H
00018 
00019 #include /**/ "ace/pre.h"
00020 
00021 #include "orbsvcs/Event/EC_Filter_Builder.h"
00022 
00023 #include /**/ "orbsvcs/Event/event_serv_export.h"
00024 
00025 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00026 # pragma once
00027 #endif /* ACE_LACKS_PRAGMA_ONCE */
00028 
00029 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00030 
00031 class TAO_EC_Filter;
00032 class TAO_EC_Event_Channel_Base;
00033 
00034 /**
00035  * @class TAO_EC_Basic_Filter_Builder
00036  *
00037  * @brief Implement a builder for the fundamental filters.
00038  *
00039  * The basic filtering mechanisms in the Event channel
00040  * (source/type based filtering + disjunctions, conjunctions, logical ands,
00041  * negations, and bitmasks) are constructed using this class.
00042  */
00043 class TAO_RTEvent_Serv_Export TAO_EC_Basic_Filter_Builder : public TAO_EC_Filter_Builder
00044 {
00045 public:
00046   /// constructor.
00047   TAO_EC_Basic_Filter_Builder (TAO_EC_Event_Channel_Base* ec);
00048 
00049   /// destructor...
00050   virtual ~TAO_EC_Basic_Filter_Builder (void);
00051 
00052   // = The TAO_EC_Filter_Builder methods...
00053   TAO_EC_Filter* build (TAO_EC_ProxyPushSupplier *supplier,
00054                         RtecEventChannelAdmin::ConsumerQOS& qos) const;
00055 
00056 private:
00057   /// Recursively build the filter tree.
00058   TAO_EC_Filter* recursive_build (TAO_EC_ProxyPushSupplier *supplier,
00059                                   RtecEventChannelAdmin::ConsumerQOS& qos,
00060                                   CORBA::ULong& pos) const;
00061 
00062   /// Count the number of children of the current node, i.e. until a
00063   /// conjunction, disjunction, logical and, bitmask, or negation occurs.
00064   CORBA::ULong count_children (RtecEventChannelAdmin::ConsumerQOS& qos,
00065                                CORBA::ULong pos) const;
00066 
00067 private:
00068   /// The event channel.
00069   TAO_EC_Event_Channel_Base* event_channel_;
00070 };
00071 
00072 TAO_END_VERSIONED_NAMESPACE_DECL
00073 
00074 #if defined (__ACE_INLINE__)
00075 #include "orbsvcs/Event/EC_Basic_Filter_Builder.inl"
00076 #endif /* __ACE_INLINE__ */
00077 
00078 #include /**/ "ace/post.h"
00079 
00080 #endif /* TAO_EC_BASIC_FILTER_BUILDER_H */

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