Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / TAO / tao / Strategies / SCIOP_Factory.cpp
blobaeb5c0d4c1759582f8e821fb23b70f0fba1b4678
1 #include "tao/Strategies/SCIOP_Factory.h"
2 #include "tao/Strategies/SCIOP_Acceptor.h"
3 #include "tao/Strategies/SCIOP_Connector.h"
4 #include "ace/OS_NS_strings.h"
6 #if TAO_HAS_SCIOP == 1
8 #include "tao/IOPC.h"
10 static const char prefix_[] = "sciop";
12 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
14 TAO_SCIOP_Protocol_Factory::TAO_SCIOP_Protocol_Factory ()
15 : TAO_Protocol_Factory (TAO_TAG_SCIOP_PROFILE)
19 int
20 TAO_SCIOP_Protocol_Factory::match_prefix (const ACE_CString &prefix)
22 // Check for the proper prefix for this protocol.
23 return (ACE_OS::strcasecmp (prefix.c_str (), ::prefix_) == 0);
26 const char *
27 TAO_SCIOP_Protocol_Factory::prefix () const
29 return ::prefix_;
32 char
33 TAO_SCIOP_Protocol_Factory::options_delimiter () const
35 return '/';
38 TAO_Acceptor *
39 TAO_SCIOP_Protocol_Factory::make_acceptor ()
41 TAO_Acceptor *acceptor = 0;
43 ACE_NEW_RETURN (acceptor,
44 TAO_SCIOP_Acceptor,
45 0);
47 return acceptor;
50 int
51 TAO_SCIOP_Protocol_Factory::init (int /* argc */, ACE_TCHAR* /* argv */ [])
53 return 0;
56 TAO_Connector *
57 TAO_SCIOP_Protocol_Factory::make_connector ()
59 TAO_Connector *connector = 0;
61 ACE_NEW_RETURN (connector,
62 TAO_SCIOP_Connector,
63 0);
64 return connector;
67 int
68 TAO_SCIOP_Protocol_Factory::requires_explicit_endpoint () const
70 return 1;
74 ACE_STATIC_SVC_DEFINE (TAO_SCIOP_Protocol_Factory,
75 ACE_TEXT ("SCIOP_Factory"),
76 ACE_SVC_OBJ_T,
77 &ACE_SVC_NAME (TAO_SCIOP_Protocol_Factory),
78 ACE_Service_Type::DELETE_THIS |
79 ACE_Service_Type::DELETE_OBJ,
82 ACE_FACTORY_DEFINE (TAO, TAO_SCIOP_Protocol_Factory)
84 TAO_END_VERSIONED_NAMESPACE_DECL
86 #endif /* TAO_HAS_SCIOP == 1 */