Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / TAO / tao / Strategies / UIOP_Factory.cpp
blobe7b004e9899bf5c2c9fdd2c419dcd1d064476b20
1 // -*- C++ -*-
2 #include "tao/Strategies/UIOP_Factory.h"
4 #if TAO_HAS_UIOP == 1
6 #include "tao/Strategies/UIOP_Acceptor.h"
7 #include "tao/Strategies/UIOP_Connector.h"
8 #include "tao/ORB_Constants.h"
9 #include "ace/OS_NS_strings.h"
11 static const char prefix_[] = "uiop";
13 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
15 TAO_UIOP_Protocol_Factory::TAO_UIOP_Protocol_Factory ()
16 : TAO_Protocol_Factory (TAO_TAG_UIOP_PROFILE)
20 TAO_UIOP_Protocol_Factory::~TAO_UIOP_Protocol_Factory ()
24 int
25 TAO_UIOP_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 (), ::prefix_) == 0);
31 const char *
32 TAO_UIOP_Protocol_Factory::prefix () const
34 return ::prefix_;
37 char
38 TAO_UIOP_Protocol_Factory::options_delimiter () const
40 return '|';
43 TAO_Acceptor *
44 TAO_UIOP_Protocol_Factory::make_acceptor ()
46 TAO_Acceptor *acceptor = 0;
48 ACE_NEW_RETURN (acceptor,
49 TAO_UIOP_Acceptor,
50 0);
52 return acceptor;
55 int
56 TAO_UIOP_Protocol_Factory::init (int /* argc */, ACE_TCHAR* /* argv */ [])
58 return 0;
61 TAO_Connector *
62 TAO_UIOP_Protocol_Factory::make_connector ()
64 TAO_Connector *connector = 0;
66 ACE_NEW_RETURN (connector,
67 TAO_UIOP_Connector,
68 0);
70 return connector;
73 int
74 TAO_UIOP_Protocol_Factory::requires_explicit_endpoint () const
76 return 1;
80 ACE_STATIC_SVC_DEFINE (TAO_UIOP_Protocol_Factory,
81 ACE_TEXT ("UIOP_Factory"),
82 ACE_SVC_OBJ_T,
83 &ACE_SVC_NAME (TAO_UIOP_Protocol_Factory),
84 ACE_Service_Type::DELETE_THIS |
85 ACE_Service_Type::DELETE_OBJ,
88 ACE_FACTORY_DEFINE (TAO_Strategies, TAO_UIOP_Protocol_Factory)
90 TAO_END_VERSIONED_NAMESPACE_DECL
93 #endif /* TAO_HAS_UIOP == 1 */