COIOP_Factory.cpp

Go to the documentation of this file.
00001 // $Id: COIOP_Factory.cpp 74533 2006-09-26 11:59:32Z johnnyw $
00002 
00003 #include "tao/Strategies/COIOP_Factory.h"
00004 
00005 #if defined (TAO_HAS_COIOP) && (TAO_HAS_COIOP != 0)
00006 
00007 #include "tao/Strategies/COIOP_Acceptor.h"
00008 #include "tao/Strategies/COIOP_Connector.h"
00009 
00010 #include "tao/ORB_Constants.h"
00011 
00012 #include "ace/OS_NS_strings.h"
00013 
00014 ACE_RCSID (Strategies,
00015            COIOP_Factory,
00016            "$Id: COIOP_Factory.cpp 74533 2006-09-26 11:59:32Z johnnyw $")
00017 
00018 static const char the_prefix[] = "COIOP";
00019 
00020 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00021 
00022 TAO_COIOP_Protocol_Factory::TAO_COIOP_Protocol_Factory (void)
00023   :  TAO_Protocol_Factory (TAO_TAG_COIOP_PROFILE)
00024 {
00025 }
00026 
00027 TAO_COIOP_Protocol_Factory::~TAO_COIOP_Protocol_Factory (void)
00028 {
00029 }
00030 
00031 int
00032 TAO_COIOP_Protocol_Factory::match_prefix (const ACE_CString &prefix)
00033 {
00034   // Check for the proper prefix for this protocol.
00035   return (ACE_OS::strcasecmp (prefix.c_str (), ::the_prefix) == 0);
00036 }
00037 
00038 const char *
00039 TAO_COIOP_Protocol_Factory::prefix (void) const
00040 {
00041   return ::the_prefix;
00042 }
00043 
00044 char
00045 TAO_COIOP_Protocol_Factory::options_delimiter (void) const
00046 {
00047   return '/';
00048 }
00049 
00050 TAO_Acceptor *
00051 TAO_COIOP_Protocol_Factory::make_acceptor (void)
00052 {
00053   TAO_Acceptor *acceptor = 0;
00054 
00055   ACE_NEW_RETURN (acceptor,
00056                   TAO_COIOP_Acceptor,
00057                   0);
00058 
00059   return acceptor;
00060 }
00061 
00062 int
00063 TAO_COIOP_Protocol_Factory::init (int /* argc */,
00064                                  ACE_TCHAR* /* argv */ [])
00065 {
00066   return 0;
00067 }
00068 
00069 TAO_Connector *
00070 TAO_COIOP_Protocol_Factory::make_connector (void)
00071 {
00072   TAO_Connector *connector = 0;
00073 
00074   ACE_NEW_RETURN (connector,
00075                   TAO_COIOP_Connector,
00076                   0);
00077   return connector;
00078 }
00079 
00080 int
00081 TAO_COIOP_Protocol_Factory::requires_explicit_endpoint (void) const
00082 {
00083   return 0;
00084 }
00085 
00086 TAO_END_VERSIONED_NAMESPACE_DECL
00087 
00088 ACE_STATIC_SVC_DEFINE (TAO_COIOP_Protocol_Factory,
00089                        ACE_TEXT ("COIOP_Factory"),
00090                        ACE_SVC_OBJ_T,
00091                        &ACE_SVC_NAME (TAO_COIOP_Protocol_Factory),
00092                        ACE_Service_Type::DELETE_THIS |
00093                                   ACE_Service_Type::DELETE_OBJ,
00094                        0)
00095 
00096 ACE_FACTORY_DEFINE (TAO_Strategies, TAO_COIOP_Protocol_Factory)
00097 
00098 #endif /* TAO_HAS_COIOP && TAO_HAS_COIOP != 0 */

Generated on Tue Feb 2 17:47:18 2010 for TAO_Strategies by  doxygen 1.4.7