TAO_AV_SFP_Factory Class Reference

#include <sfp.h>

Inheritance diagram for TAO_AV_SFP_Factory:

Inheritance graph
[legend]
Collaboration diagram for TAO_AV_SFP_Factory:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TAO_AV_SFP_Factory (void)
virtual ~TAO_AV_SFP_Factory (void)
virtual int init (int argc, char *argv[])
virtual int match_protocol (const char *flow_string)
virtual TAO_AV_Protocol_Objectmake_protocol_object (TAO_FlowSpec_Entry *entry, TAO_Base_StreamEndPoint *endpoint, TAO_AV_Flow_Handler *handler, TAO_AV_Transport *transport)

Detailed Description

Definition at line 286 of file sfp.h.


Constructor & Destructor Documentation

TAO_AV_SFP_Factory::TAO_AV_SFP_Factory ( void   ) 

Definition at line 1225 of file sfp.cpp.

01226 {
01227 }

TAO_AV_SFP_Factory::~TAO_AV_SFP_Factory ( void   )  [virtual]

Definition at line 1229 of file sfp.cpp.

01230 {
01231 }


Member Function Documentation

virtual int TAO_AV_SFP_Factory::init ( int  argc,
char *  argv[] 
) [virtual]

Reimplemented from TAO_AV_Flow_Protocol_Factory.

TAO_AV_Protocol_Object * TAO_AV_SFP_Factory::make_protocol_object ( TAO_FlowSpec_Entry entry,
TAO_Base_StreamEndPoint endpoint,
TAO_AV_Flow_Handler handler,
TAO_AV_Transport transport 
) [virtual]

Reimplemented from TAO_AV_Flow_Protocol_Factory.

Definition at line 1249 of file sfp.cpp.

References ACE_NEW_RETURN, TAO_FlowSpec_Entry::flow_protocol_str(), TAO_FlowSpec_Entry::flowname(), TAO_Base_StreamEndPoint::get_callback(), TAO_AV_Callback::open(), TAO_FlowSpec_Entry::role(), TAO_Base_StreamEndPoint::set_protocol_object(), TAO_FlowSpec_Entry::TAO_AV_CONSUMER, TAO_FlowSpec_Entry::TAO_AV_INVALID_ROLE, and TAO_FlowSpec_Entry::TAO_AV_PRODUCER.

01253 {
01254   TAO_AV_Protocol_Object *object = 0;
01255   TAO_AV_Callback *callback = 0;
01256   endpoint->get_callback (entry->flowname (),
01257                        callback);
01258   ACE_CString flow_string( entry->flow_protocol_str () );
01259   switch (entry->role ())
01260     {
01261     case TAO_FlowSpec_Entry::TAO_AV_PRODUCER:
01262       {
01263         ACE_NEW_RETURN (object,
01264                         TAO_SFP_Producer_Object (callback,
01265                                                  transport,
01266                                                  flow_string.c_str() ),
01267                         0);
01268       }
01269       break;
01270     case TAO_FlowSpec_Entry::TAO_AV_CONSUMER:
01271       {
01272 
01273         ACE_NEW_RETURN (object,
01274                         TAO_SFP_Consumer_Object (callback,
01275                                                  transport,
01276                                                  flow_string),
01277                         0);
01278         entry->flow_protocol_str( flow_string.c_str() );
01279       }
01280       break;
01281     case TAO_FlowSpec_Entry::TAO_AV_INVALID_ROLE:
01282       return 0;
01283     }
01284   callback->open (object,
01285                   handler);
01286   endpoint->set_protocol_object (entry->flowname (),
01287                                  object);
01288   return object;
01289 }

int TAO_AV_SFP_Factory::match_protocol ( const char *  flow_string  )  [virtual]

Reimplemented from TAO_AV_Flow_Protocol_Factory.

Definition at line 1241 of file sfp.cpp.

References ACE_OS::strncasecmp().

01242 {
01243   if (ACE_OS::strncasecmp (flow_string,"sfp",3) == 0)
01244     return 1;
01245   return 0;
01246 }


The documentation for this class was generated from the following files:
Generated on Tue Feb 2 17:48:03 2010 for TAO_AV by  doxygen 1.4.7