Revert "Minor modernization of DynamicAny code"
[ACE_TAO.git] / TAO / tao / Strategies / COIOP_Factory.cpp
blobe4b25c4bdffa1b9fe9afa0d5ea5ef307896916f8
1 #include "tao/Strategies/COIOP_Factory.h"
3 #if defined (TAO_HAS_COIOP) && (TAO_HAS_COIOP != 0)
5 #include "tao/Strategies/COIOP_Acceptor.h"
6 #include "tao/Strategies/COIOP_Connector.h"
8 #include "tao/ORB_Constants.h"
10 #include "ace/OS_NS_strings.h"
12 static const char the_prefix[] = "COIOP";
14 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
16 TAO_COIOP_Protocol_Factory::TAO_COIOP_Protocol_Factory ()
17 : TAO_Protocol_Factory (TAO_TAG_COIOP_PROFILE)
21 int
22 TAO_COIOP_Protocol_Factory::match_prefix (const ACE_CString &prefix)
24 // Check for the proper prefix for this protocol.
25 return (ACE_OS::strcasecmp (prefix.c_str (), ::the_prefix) == 0);
28 const char *
29 TAO_COIOP_Protocol_Factory::prefix () const
31 return ::the_prefix;
34 char
35 TAO_COIOP_Protocol_Factory::options_delimiter () const
37 return '/';
40 TAO_Acceptor *
41 TAO_COIOP_Protocol_Factory::make_acceptor ()
43 TAO_Acceptor *acceptor = 0;
45 ACE_NEW_RETURN (acceptor,
46 TAO_COIOP_Acceptor,
47 0);
49 return acceptor;
52 int
53 TAO_COIOP_Protocol_Factory::init (int /* argc */,
54 ACE_TCHAR* /* argv */ [])
56 return 0;
59 TAO_Connector *
60 TAO_COIOP_Protocol_Factory::make_connector ()
62 TAO_Connector *connector = 0;
64 ACE_NEW_RETURN (connector,
65 TAO_COIOP_Connector,
66 0);
67 return connector;
70 int
71 TAO_COIOP_Protocol_Factory::requires_explicit_endpoint () const
73 return 0;
77 ACE_STATIC_SVC_DEFINE (TAO_COIOP_Protocol_Factory,
78 ACE_TEXT ("COIOP_Factory"),
79 ACE_SVC_OBJ_T,
80 &ACE_SVC_NAME (TAO_COIOP_Protocol_Factory),
81 ACE_Service_Type::DELETE_THIS |
82 ACE_Service_Type::DELETE_OBJ,
85 ACE_FACTORY_DEFINE (TAO_Strategies, TAO_COIOP_Protocol_Factory)
87 TAO_END_VERSIONED_NAMESPACE_DECL
89 #endif /* TAO_HAS_COIOP && TAO_HAS_COIOP != 0 */