Public Member Functions | Protected Types | Protected Attributes

TAO_FDev< T_Producer, T_Consumer > Class Template Reference

Implementation of the AV/Streams Flow Device. A FlowConnection is used to bind FDevs for flows, much like how a StreamCtrl is used to bind MMDevices for streams. More...

#include <Flows_T.h>

Collaboration diagram for TAO_FDev< T_Producer, T_Consumer >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 TAO_FDev (void)
 default constructor
 TAO_FDev (const char *flowname)
 constructor taking a flowname.
 ~TAO_FDev (void)
 Destructor..
const char * flowname (void)
void flowname (const char *flowname)
AVStreams::FlowProducer_ptr create_producer (AVStreams::FlowConnection_ptr the_requester, AVStreams::QoS &the_qos, CORBA::Boolean_out met_qos, char *&named_fdev)
virtual AVStreams::FlowProducer_ptr make_producer (AVStreams::FlowConnection_ptr the_requester, AVStreams::QoS &the_qos, CORBA::Boolean_out met_qos, char *&named_fdev)
virtual AVStreams::FlowConsumer_ptr create_consumer (AVStreams::FlowConnection_ptr the_requester, AVStreams::QoS &the_qos, CORBA::Boolean_out met_qos, char *&named_fdev)
 create a flow consumer object.
virtual AVStreams::FlowConsumer_ptr make_consumer (AVStreams::FlowConnection_ptr the_requester, AVStreams::QoS &the_qos, CORBA::Boolean_out met_qos, char *&named_fdev)
virtual
AVStreams::FlowConnection_ptr 
bind (AVStreams::FDev_ptr peer_device, AVStreams::QoS &the_qos, CORBA::Boolean_out is_met)
 bind this FDev with another FDev.
virtual
AVStreams::FlowConnection_ptr 
bind_mcast (AVStreams::FDev_ptr first_peer, AVStreams::QoS &the_qos, CORBA::Boolean_out is_met)
 multicast bind is not implemented yet.
virtual void destroy (AVStreams::FlowEndPoint_ptr the_ep, const char *fdev_name)
 destroys this FDev.

Protected Types

typedef ACE_DLList_Iterator
< TAO_FlowProducer
PRODUCER_LIST_ITERATOR
typedef ACE_DLList_Iterator
< TAO_FlowConsumer
CONSUMER_LIST_ITERATOR

Protected Attributes

ACE_DLList< TAO_FlowProducerproducer_list_
ACE_DLList< TAO_FlowConsumerconsumer_list_
CORBA::String_var flowname_

Detailed Description

template<class T_Producer, class T_Consumer>
class TAO_FDev< T_Producer, T_Consumer >

Implementation of the AV/Streams Flow Device. A FlowConnection is used to bind FDevs for flows, much like how a StreamCtrl is used to bind MMDevices for streams.

Definition at line 29 of file Flows_T.h.


Member Typedef Documentation

template<class T_Producer , class T_Consumer >
typedef ACE_DLList_Iterator<TAO_FlowConsumer> TAO_FDev< T_Producer, T_Consumer >::CONSUMER_LIST_ITERATOR [protected]

Definition at line 90 of file Flows_T.h.

template<class T_Producer , class T_Consumer >
typedef ACE_DLList_Iterator<TAO_FlowProducer> TAO_FDev< T_Producer, T_Consumer >::PRODUCER_LIST_ITERATOR [protected]

Definition at line 88 of file Flows_T.h.


Constructor & Destructor Documentation

template<class T_Producer , class T_Consumer >
TAO_FDev< T_Producer, T_Consumer >::TAO_FDev ( void   ) 

default constructor

Definition at line 17 of file Flows_T.cpp.

{
}

template<class T_Producer , class T_Consumer >
TAO_FDev< T_Producer, T_Consumer >::TAO_FDev ( const char *  flowname  ) 

constructor taking a flowname.

Definition at line 22 of file Flows_T.cpp.

  :flowname_ (flowname)
{
  try
    {
      CORBA::Any flowname_any;
      flowname_any <<= flowname;
      this->define_property ("Flow",
                             flowname_any);
    }
  catch (const CORBA::Exception& ex)
    {
      ex._tao_print_exception ("TAO_FDev::TAO_FDev");
    }
}

template<class T_Producer , class T_Consumer >
TAO_FDev< T_Producer, T_Consumer >::~TAO_FDev ( void   ) 

Destructor..

Definition at line 39 of file Flows_T.cpp.

{
  //no-op
}


Member Function Documentation

template<class T_Producer , class T_Consumer >
AVStreams::FlowConnection_ptr TAO_FDev< T_Producer, T_Consumer >::bind ( AVStreams::FDev_ptr  peer_device,
AVStreams::QoS the_qos,
CORBA::Boolean_out  is_met 
) [virtual]

bind this FDev with another FDev.

Definition at line 150 of file Flows_T.cpp.

{
  ACE_UNUSED_ARG (peer_device);
  ACE_UNUSED_ARG (the_qos);
  ACE_UNUSED_ARG (is_met);
  return 0;
}

template<class T_Producer , class T_Consumer >
AVStreams::FlowConnection_ptr TAO_FDev< T_Producer, T_Consumer >::bind_mcast ( AVStreams::FDev_ptr  first_peer,
AVStreams::QoS the_qos,
CORBA::Boolean_out  is_met 
) [virtual]

multicast bind is not implemented yet.

Definition at line 163 of file Flows_T.cpp.

{
  ACE_UNUSED_ARG (first_peer);
  ACE_UNUSED_ARG (the_qos);
  ACE_UNUSED_ARG (is_met);
  return 0;
}

template<class T_Producer , class T_Consumer >
AVStreams::FlowConsumer_ptr TAO_FDev< T_Producer, T_Consumer >::create_consumer ( AVStreams::FlowConnection_ptr  the_requester,
AVStreams::QoS the_qos,
CORBA::Boolean_out  met_qos,
char *&  named_fdev 
) [virtual]

create a flow consumer object.

Definition at line 136 of file Flows_T.cpp.

{
  return this->make_consumer (the_requester,
                              the_qos,
                              met_qos,
                              named_fdev);
}

template<class T_Producer , class T_Consumer >
AVStreams::FlowProducer_ptr TAO_FDev< T_Producer, T_Consumer >::create_producer ( AVStreams::FlowConnection_ptr  the_requester,
AVStreams::QoS the_qos,
CORBA::Boolean_out  met_qos,
char *&  named_fdev 
)

Definition at line 71 of file Flows_T.cpp.

{
  // call the bridge method.
  return this->make_producer (the_requester,
                              the_qos,
                              met_qos,
                              named_fdev);
}

template<class T_Producer , class T_Consumer >
void TAO_FDev< T_Producer, T_Consumer >::destroy ( AVStreams::FlowEndPoint_ptr  the_ep,
const char *  fdev_name 
) [virtual]

destroys this FDev.

Definition at line 175 of file Flows_T.cpp.

{
  // @@ Shouldn't the parameters be made use of!
  // Destroy/delete all the producers and consumers.

  TAO_FlowProducer *producer_i;

  for (PRODUCER_LIST_ITERATOR producer_list_iterator (this->producer_list_);
       (producer_i = producer_list_iterator.next ()) != 0;
       producer_list_iterator.advance ())
    {
      TAO_AV_Core::deactivate_servant (producer_i);
      delete producer_i;
    }

  TAO_FlowConsumer *consumer_i;

  for (CONSUMER_LIST_ITERATOR consumer_list_iterator (this->consumer_list_);
       (consumer_i = consumer_list_iterator.next ()) != 0;
       consumer_list_iterator.advance ())
    {
      TAO_AV_Core::deactivate_servant (consumer_i);
      delete consumer_i;
    }
  int result = TAO_AV_Core::deactivate_servant (this);
  if (result < 0)
    if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG,"TAO_StreamEndPoint::destroy failed\n"));
}

template<class T_Producer , class T_Consumer >
void TAO_FDev< T_Producer, T_Consumer >::flowname ( const char *  flowname  ) 

Definition at line 53 of file Flows_T.cpp.

{
  try
    {
      CORBA::Any flowname_any;
      flowname_any <<= flow_name;
      this->define_property ("Flow",
                             flowname_any);
    }
  catch (const CORBA::Exception& ex)
    {
      ex._tao_print_exception ("TAO_FDev::flowname");
    }
  this->flowname_ = flow_name;
}

template<class T_Producer , class T_Consumer >
const char * TAO_FDev< T_Producer, T_Consumer >::flowname ( void   ) 

set/get the flowname. create a flow producer object.

Definition at line 46 of file Flows_T.cpp.

{
  return this->flowname_.in ();
}

template<class T_Producer , class T_Consumer >
AVStreams::FlowConsumer_ptr TAO_FDev< T_Producer, T_Consumer >::make_consumer ( AVStreams::FlowConnection_ptr  the_requester,
AVStreams::QoS the_qos,
CORBA::Boolean_out  met_qos,
char *&  named_fdev 
) [virtual]

bridge method for the application to override the consumer object creation. Default implementation creates a TAO_FlowConsumer.

Definition at line 111 of file Flows_T.cpp.

{
  AVStreams::FlowConsumer_ptr consumer = AVStreams::FlowConsumer::_nil ();
  try
    {
      // Activate the consumer implementation under the Root POA.
      T_Consumer *consumer_i;
      ACE_NEW_RETURN (consumer_i, T_Consumer, 0 );

      this->consumer_list_.insert_tail (consumer_i);
      consumer = consumer_i->_this ();
    }
  catch (const CORBA::Exception& ex)
    {
      ex._tao_print_exception ("TAO_FDev::make_consumer");
      return consumer;
    }
  return consumer;
}

template<class T_Producer , class T_Consumer >
AVStreams::FlowProducer_ptr TAO_FDev< T_Producer, T_Consumer >::make_producer ( AVStreams::FlowConnection_ptr  the_requester,
AVStreams::QoS the_qos,
CORBA::Boolean_out  met_qos,
char *&  named_fdev 
) [virtual]

bridge method for the application to override the producer object creation. Default implementation creates a TAO_FlowProducer.

Definition at line 86 of file Flows_T.cpp.

{
  AVStreams::FlowProducer_ptr producer = AVStreams::FlowProducer::_nil ();
  try
    {
      // Activate the producer implementation under the Root POA.
      T_Producer *producer_i = 0;
      ACE_NEW_RETURN (producer_i, T_Producer, 0);
      this->producer_list_.insert_tail (producer_i);
      producer = producer_i->_this ();
    }
  catch (const CORBA::Exception& ex)
    {
      ex._tao_print_exception ("TAO_FDev::make_producer");
      return producer;
    }
  return producer;
}


Member Data Documentation

template<class T_Producer , class T_Consumer >
ACE_DLList<TAO_FlowConsumer> TAO_FDev< T_Producer, T_Consumer >::consumer_list_ [protected]

Definition at line 89 of file Flows_T.h.

template<class T_Producer , class T_Consumer >
CORBA::String_var TAO_FDev< T_Producer, T_Consumer >::flowname_ [protected]

Definition at line 91 of file Flows_T.h.

template<class T_Producer , class T_Consumer >
ACE_DLList<TAO_FlowProducer> TAO_FDev< T_Producer, T_Consumer >::producer_list_ [protected]

Definition at line 87 of file Flows_T.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines