IIOP_Lite_Factory.cpp

Go to the documentation of this file.
00001 #include "tao/IIOP_Lite_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            "IIOP_Lite_Factory.cpp,v 1.15 2006/04/19 11:37:03 jwillemsen Exp")
00013 
00014 
00015 static const char the_prefix[] = "iiop";
00016 
00017 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00018 
00019 TAO_IIOP_Lite_Protocol_Factory::TAO_IIOP_Lite_Protocol_Factory (void)
00020   :  TAO_Protocol_Factory (IOP::TAG_INTERNET_IOP),
00021      major_ (TAO_DEF_GIOP_MAJOR),
00022      minor_ (TAO_DEF_GIOP_MINOR)
00023 {
00024 }
00025 
00026 TAO_IIOP_Lite_Protocol_Factory::~TAO_IIOP_Lite_Protocol_Factory (void)
00027 {
00028 
00029 }
00030 
00031 int
00032 TAO_IIOP_Lite_Protocol_Factory::match_prefix (const ACE_CString &prefix)
00033 {
00034   // Check for the proper prefix for this protocol.
00035   return (ACE_OS::strcasecmp (prefix.c_str (), ::the_prefix) == 0);
00036 }
00037 
00038 const char *
00039 TAO_IIOP_Lite_Protocol_Factory::prefix (void) const
00040 {
00041   return ::the_prefix;
00042 }
00043 
00044 char
00045 TAO_IIOP_Lite_Protocol_Factory::options_delimiter (void) const
00046 {
00047   return '/';
00048 }
00049 
00050 TAO_Acceptor *
00051 TAO_IIOP_Lite_Protocol_Factory::make_acceptor (void)
00052 {
00053   TAO_Acceptor *acceptor = 0;
00054 
00055   // We are a Lite factory
00056   CORBA::Boolean lite_flag = true;
00057   ACE_NEW_RETURN (acceptor,
00058                   TAO_IIOP_Acceptor (lite_flag),
00059                   0);
00060 
00061   return acceptor;
00062 }
00063 
00064 int
00065 TAO_IIOP_Lite_Protocol_Factory::init (int /*argc*/,
00066                                       ACE_TCHAR* /*argv*/ [])
00067 {
00068   return 0;
00069 }
00070 
00071 TAO_Connector *
00072 TAO_IIOP_Lite_Protocol_Factory::make_connector (void)
00073 {
00074   TAO_Connector *connector = 0;
00075 
00076   // We are a Lite factory
00077   CORBA::Boolean lite_flag = true;
00078 
00079   ACE_NEW_RETURN (connector,
00080                   TAO_IIOP_Connector (lite_flag),
00081                   0);
00082   return connector;
00083 }
00084 
00085 int
00086 TAO_IIOP_Lite_Protocol_Factory::requires_explicit_endpoint (void) const
00087 {
00088   return 0;
00089 }
00090 
00091 TAO_END_VERSIONED_NAMESPACE_DECL
00092 
00093 ACE_STATIC_SVC_DEFINE (TAO_IIOP_Lite_Protocol_Factory,
00094                        ACE_TEXT ("IIOP_Lite_Factory"),
00095                        ACE_SVC_OBJ_T,
00096                        &ACE_SVC_NAME (TAO_IIOP_Lite_Protocol_Factory),
00097                        ACE_Service_Type::DELETE_THIS |
00098                        ACE_Service_Type::DELETE_OBJ,
00099                        0)
00100 
00101 ACE_FACTORY_DEFINE (TAO, TAO_IIOP_Lite_Protocol_Factory)
00102 
00103 #endif /* TAO_HAS_IIOP && TAO_HAS_IIOP != 0 */

Generated on Thu Nov 9 11:54:13 2006 for TAO by doxygen 1.3.6