Flows_T.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file   Flows_T.h
00006  *
00007  *  $Id: Flows_T.h 77001 2007-02-12 07:54:49Z johnnyw $
00008  *
00009  *  @author Nagarajan Surendran <naga@cs.wustl.edu>
00010  */
00011 //=============================================================================
00012 
00013 
00014 #ifndef TAO_AV_FLOWS_T_H
00015 #define TAO_AV_FLOWS_T_H
00016 #include /**/ "ace/pre.h"
00017 
00018 #include "orbsvcs/AV/AVStreams_i.h"
00019 
00020 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00021 
00022 /**
00023  * @class TAO_FDev
00024  * @brief Implementation of the AV/Streams Flow Device.
00025  *        A FlowConnection is used to bind FDevs for flows,
00026  *        much like how a StreamCtrl is used to bind MMDevices for streams.
00027  */
00028 template <class T_Producer, class T_Consumer>
00029 class TAO_FDev :
00030   public virtual POA_AVStreams::FDev,
00031   public virtual TAO_PropertySet
00032 {
00033 public:
00034   /// default constructor
00035   TAO_FDev (void);
00036 
00037   /// constructor taking a flowname.
00038   TAO_FDev (const char *flowname);
00039 
00040   /// Destructor..
00041   ~TAO_FDev (void);
00042 
00043   /// set/get the flowname.
00044   /// create a flow producer object.
00045   const char *flowname (void);
00046   void flowname (const char *flowname);
00047   AVStreams::FlowProducer_ptr create_producer (AVStreams::FlowConnection_ptr the_requester,
00048                                                        AVStreams::QoS & the_qos,
00049                                                        CORBA::Boolean_out met_qos,
00050                                                        char *& named_fdev);
00051 
00052   /// bridge method for the application to override the producer object
00053   /// creation. Default implementation creates a TAO_FlowProducer.
00054   virtual AVStreams::FlowProducer_ptr make_producer (AVStreams::FlowConnection_ptr the_requester,
00055                                                        AVStreams::QoS & the_qos,
00056                                                        CORBA::Boolean_out met_qos,
00057                                                        char *& named_fdev);
00058 
00059   /// create a flow consumer object.
00060   virtual AVStreams::FlowConsumer_ptr create_consumer (AVStreams::FlowConnection_ptr the_requester,
00061                                                        AVStreams::QoS & the_qos,
00062                                                        CORBA::Boolean_out met_qos,
00063                                                        char *& named_fdev);
00064 
00065   /// bridge method for the application to override the consumer object
00066   /// creation. Default implementation creates a TAO_FlowConsumer.
00067   virtual AVStreams::FlowConsumer_ptr make_consumer (AVStreams::FlowConnection_ptr the_requester,
00068                                                        AVStreams::QoS & the_qos,
00069                                                        CORBA::Boolean_out met_qos,
00070                                                        char *& named_fdev);
00071 
00072   /// bind this FDev with another FDev.
00073   virtual AVStreams::FlowConnection_ptr bind (AVStreams::FDev_ptr peer_device,
00074                                               AVStreams::QoS & the_qos,
00075                                               CORBA::Boolean_out is_met);
00076 
00077   /// multicast bind is not implemented yet.
00078   virtual AVStreams::FlowConnection_ptr bind_mcast (AVStreams::FDev_ptr first_peer,
00079                                                     AVStreams::QoS & the_qos,
00080                                                     CORBA::Boolean_out is_met);
00081 
00082   /// destroys this FDev.
00083   virtual void destroy (AVStreams::FlowEndPoint_ptr the_ep,
00084                         const char * fdev_name);
00085 
00086 protected:
00087   ACE_DLList <TAO_FlowProducer> producer_list_;
00088   typedef ACE_DLList_Iterator <TAO_FlowProducer> PRODUCER_LIST_ITERATOR;
00089   ACE_DLList <TAO_FlowConsumer> consumer_list_;
00090   typedef ACE_DLList_Iterator <TAO_FlowConsumer> CONSUMER_LIST_ITERATOR;
00091   CORBA::String_var flowname_;
00092 };
00093 
00094 TAO_END_VERSIONED_NAMESPACE_DECL
00095 
00096 #if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
00097 #include "orbsvcs/AV/Flows_T.cpp"
00098 #endif /*ACE_TEMPLATES_REQUIRE_SOURCE */
00099 
00100 #if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
00101 #pragma implementation ("Flows_T.cpp")
00102 #endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
00103 
00104 #include /**/ "ace/post.h"
00105 #endif /* TAO_AV_FLOWS_T_H */

Generated on Tue Feb 2 17:47:49 2010 for TAO_AV by  doxygen 1.4.7