Go to the documentation of this file.00001
00002
00003 #include "tao/Strategies/DIOP_Factory.h"
00004
00005 #if defined (TAO_HAS_DIOP) && (TAO_HAS_DIOP != 0)
00006
00007 #include "tao/Strategies/DIOP_Acceptor.h"
00008 #include "tao/Strategies/DIOP_Connector.h"
00009
00010 #include "tao/ORB_Constants.h"
00011
00012 #include "ace/OS_NS_strings.h"
00013
00014 ACE_RCSID (Strategies,
00015 DIOP_Factory,
00016 "$Id: DIOP_Factory.cpp 84281 2009-01-30 15:01:17Z wotte $")
00017
00018 static const char the_prefix[] = "diop";
00019
00020 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00021
00022 TAO_DIOP_Protocol_Factory::TAO_DIOP_Protocol_Factory (void)
00023 : TAO_Protocol_Factory (TAO_TAG_DIOP_PROFILE)
00024 {
00025 }
00026
00027 TAO_DIOP_Protocol_Factory::~TAO_DIOP_Protocol_Factory (void)
00028 {
00029 }
00030
00031 int
00032 TAO_DIOP_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_DIOP_Protocol_Factory::prefix (void) const
00040 {
00041 return ::the_prefix;
00042 }
00043
00044 char
00045 TAO_DIOP_Protocol_Factory::options_delimiter (void) const
00046 {
00047 return '/';
00048 }
00049
00050 TAO_Acceptor *
00051 TAO_DIOP_Protocol_Factory::make_acceptor (void)
00052 {
00053 TAO_Acceptor *acceptor = 0;
00054
00055 ACE_NEW_RETURN (acceptor,
00056 TAO_DIOP_Acceptor,
00057 0);
00058
00059 return acceptor;
00060 }
00061
00062 int
00063 TAO_DIOP_Protocol_Factory::init (int , ACE_TCHAR* [])
00064 {
00065 return 0;
00066 }
00067
00068 TAO_Connector *
00069 TAO_DIOP_Protocol_Factory::make_connector (void)
00070 {
00071 TAO_Connector *connector = 0;
00072
00073 ACE_NEW_RETURN (connector,
00074 TAO_DIOP_Connector,
00075 0);
00076 return connector;
00077 }
00078
00079 int
00080 TAO_DIOP_Protocol_Factory::requires_explicit_endpoint (void) const
00081 {
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091 return 1;
00092 }
00093
00094
00095 ACE_STATIC_SVC_DEFINE (TAO_DIOP_Protocol_Factory,
00096 ACE_TEXT ("DIOP_Factory"),
00097 ACE_SVC_OBJ_T,
00098 &ACE_SVC_NAME (TAO_DIOP_Protocol_Factory),
00099 ACE_Service_Type::DELETE_THIS |
00100 ACE_Service_Type::DELETE_OBJ,
00101 0)
00102
00103 ACE_FACTORY_DEFINE (TAO_Strategies, TAO_DIOP_Protocol_Factory)
00104
00105 TAO_END_VERSIONED_NAMESPACE_DECL
00106
00107 #endif