Revert "Minor modernization of DynamicAny code"
[ACE_TAO.git] / TAO / tao / IIOP_Factory.cpp
blobd815510503669a1f587c095ae285f065bae0a5c7
1 // -*- C++ -*-
2 #include "tao/IIOP_Factory.h"
4 #if defined (TAO_HAS_IIOP) && (TAO_HAS_IIOP != 0)
6 #include "tao/IIOP_Acceptor.h"
7 #include "tao/IIOP_Connector.h"
8 #include "tao/IOPC.h"
9 #include "ace/OS_NS_strings.h"
11 static const char the_prefix[] = "iiop";
13 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
15 TAO_IIOP_Protocol_Factory::TAO_IIOP_Protocol_Factory ()
16 : TAO_Protocol_Factory (IOP::TAG_INTERNET_IOP)
20 TAO_IIOP_Protocol_Factory::~TAO_IIOP_Protocol_Factory ()
24 int
25 TAO_IIOP_Protocol_Factory::match_prefix (const ACE_CString &prefix)
27 // Check for the proper prefix for this protocol.
28 return (ACE_OS::strcasecmp (prefix.c_str (), ::the_prefix) == 0);
31 const char *
32 TAO_IIOP_Protocol_Factory::prefix () const
34 return ::the_prefix;
37 char
38 TAO_IIOP_Protocol_Factory::options_delimiter () const
40 return '/';
43 TAO_Acceptor *
44 TAO_IIOP_Protocol_Factory::make_acceptor ()
46 TAO_Acceptor *acceptor = nullptr;
48 ACE_NEW_RETURN (acceptor,
49 TAO_IIOP_Acceptor,
50 nullptr);
52 return acceptor;
55 int
56 TAO_IIOP_Protocol_Factory::init (int /* argc */,
57 ACE_TCHAR* /* argv */ [])
59 return 0;
62 TAO_Connector *
63 TAO_IIOP_Protocol_Factory::make_connector ()
65 TAO_Connector *connector = nullptr;
67 ACE_NEW_RETURN (connector,
68 TAO_IIOP_Connector,
69 nullptr);
70 return connector;
73 int
74 TAO_IIOP_Protocol_Factory::requires_explicit_endpoint () const
76 return 0;
79 ACE_STATIC_SVC_DEFINE (TAO_IIOP_Protocol_Factory,
80 ACE_TEXT ("IIOP_Factory"),
81 ACE_SVC_OBJ_T,
82 &ACE_SVC_NAME (TAO_IIOP_Protocol_Factory),
83 ACE_Service_Type::DELETE_THIS |
84 ACE_Service_Type::DELETE_OBJ,
87 ACE_FACTORY_DEFINE (TAO, TAO_IIOP_Protocol_Factory)
89 TAO_END_VERSIONED_NAMESPACE_DECL
91 #endif /* TAO_HAS_IIOP && TAO_HAS_IIOP != 0 */