IIOP_Factory.cpp

Go to the documentation of this file.
00001 #include "tao/IIOP_Factory.h"
00002 
00003 #if defined (TAO_HAS_IIOP) && (TAO_HAS_IIOP != 0)
00004 
00005 #include "tao/IIOP_Acceptor.h"
00006 #include "tao/IIOP_Connector.h"
00007 #include "tao/IOP_IORC.h"
00008 #include "ace/OS_NS_strings.h"
00009 
00010 ACE_RCSID (tao,
00011            IIOP_Factory,
00012            "$Id: IIOP_Factory.cpp 74199 2006-08-23 12:50:53Z johnnyw $")
00013 
00014 
00015 static const char the_prefix[] = "iiop";
00016 
00017 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00018 
00019 TAO_IIOP_Protocol_Factory::TAO_IIOP_Protocol_Factory (void)
00020   :  TAO_Protocol_Factory (IOP::TAG_INTERNET_IOP)
00021 {
00022 }
00023 
00024 TAO_IIOP_Protocol_Factory::~TAO_IIOP_Protocol_Factory (void)
00025 {
00026 }
00027 
00028 int
00029 TAO_IIOP_Protocol_Factory::match_prefix (const ACE_CString &prefix)
00030 {
00031   // Check for the proper prefix for this protocol.
00032   return (ACE_OS::strcasecmp (prefix.c_str (), ::the_prefix) == 0);
00033 }
00034 
00035 const char *
00036 TAO_IIOP_Protocol_Factory::prefix (void) const
00037 {
00038   return ::the_prefix;
00039 }
00040 
00041 char
00042 TAO_IIOP_Protocol_Factory::options_delimiter (void) const
00043 {
00044   return '/';
00045 }
00046 
00047 TAO_Acceptor *
00048 TAO_IIOP_Protocol_Factory::make_acceptor (void)
00049 {
00050   TAO_Acceptor *acceptor = 0;
00051 
00052   ACE_NEW_RETURN (acceptor,
00053                   TAO_IIOP_Acceptor,
00054                   0);
00055 
00056   return acceptor;
00057 }
00058 
00059 int
00060 TAO_IIOP_Protocol_Factory::init (int /* argc */,
00061                                  ACE_TCHAR* /* argv */ [])
00062 {
00063   return 0;
00064 }
00065 
00066 TAO_Connector *
00067 TAO_IIOP_Protocol_Factory::make_connector (void)
00068 {
00069   TAO_Connector *connector = 0;
00070 
00071   ACE_NEW_RETURN (connector,
00072                   TAO_IIOP_Connector,
00073                   0);
00074   return connector;
00075 }
00076 
00077 int
00078 TAO_IIOP_Protocol_Factory::requires_explicit_endpoint (void) const
00079 {
00080   return 0;
00081 }
00082 
00083 TAO_END_VERSIONED_NAMESPACE_DECL
00084 
00085 ACE_STATIC_SVC_DEFINE (TAO_IIOP_Protocol_Factory,
00086                        ACE_TEXT ("IIOP_Factory"),
00087                        ACE_SVC_OBJ_T,
00088                        &ACE_SVC_NAME (TAO_IIOP_Protocol_Factory),
00089                        ACE_Service_Type::DELETE_THIS |
00090                                   ACE_Service_Type::DELETE_OBJ,
00091                        0)
00092 
00093 ACE_FACTORY_DEFINE (TAO, TAO_IIOP_Protocol_Factory)
00094 
00095 #endif /* TAO_HAS_IIOP && TAO_HAS_IIOP != 0 */

Generated on Tue Feb 2 17:37:52 2010 for TAO by  doxygen 1.4.7