Go to the documentation of this file.00001
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 84281 2009-01-30 15:01:17Z wotte $")
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
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 ,
00064 ACE_TCHAR* [])
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
00087 ACE_STATIC_SVC_DEFINE (TAO_COIOP_Protocol_Factory,
00088 ACE_TEXT ("COIOP_Factory"),
00089 ACE_SVC_OBJ_T,
00090 &ACE_SVC_NAME (TAO_COIOP_Protocol_Factory),
00091 ACE_Service_Type::DELETE_THIS |
00092 ACE_Service_Type::DELETE_OBJ,
00093 0)
00094
00095 ACE_FACTORY_DEFINE (TAO_Strategies, TAO_COIOP_Protocol_Factory)
00096
00097 TAO_END_VERSIONED_NAMESPACE_DECL
00098
00099 #endif