SCIOP_Factory.cpp

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

Generated on Tue Feb 2 17:47:18 2010 for TAO_Strategies by  doxygen 1.4.7