EC_Sched_Filter_Builder.h

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

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