summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbala <balanatarajan@users.noreply.github.com>2003-08-29 16:52:15 +0000
committerbala <balanatarajan@users.noreply.github.com>2003-08-29 16:52:15 +0000
commitf61a34ee607e223f9b6581db289a1f054b05bb2f (patch)
tree898f2914322e783e39a446fdfa44461e6ec745cf
parentbf80062faebe67a03bbe04a39a9518449cbb2228 (diff)
downloadATCD-f61a34ee607e223f9b6581db289a1f054b05bb2f.tar.gz
*** empty log message ***
-rw-r--r--TAO/tests/Bench/wire/Hello.cpp25
-rw-r--r--TAO/tests/Bench/wire/Hello.h45
-rw-r--r--TAO/tests/Bench/wire/TestC.cpp508
-rw-r--r--TAO/tests/Bench/wire/TestC.h267
-rw-r--r--TAO/tests/Bench/wire/TestC.i85
-rw-r--r--TAO/tests/Bench/wire/TestS.cpp1169
-rw-r--r--TAO/tests/Bench/wire/TestS.h291
-rw-r--r--TAO/tests/Bench/wire/TestS.i26
-rw-r--r--TAO/tests/Bench/wire/client.cpp86
-rw-r--r--TAO/tests/Bench/wire/server.cpp114
-rw-r--r--TAO/tests/Bench/wire/test.idl10
-rw-r--r--TAO/tests/Bench/wire/testC.cpp526
12 files changed, 3142 insertions, 10 deletions
diff --git a/TAO/tests/Bench/wire/Hello.cpp b/TAO/tests/Bench/wire/Hello.cpp
new file mode 100644
index 00000000000..70af3ea8a11
--- /dev/null
+++ b/TAO/tests/Bench/wire/Hello.cpp
@@ -0,0 +1,25 @@
+//
+// $Id$
+//
+#include "Hello.h"
+
+ACE_RCSID(Hello, Hello, "$Id$")
+
+Hello::Hello (CORBA::ORB_ptr orb)
+ : orb_ (CORBA::ORB::_duplicate (orb))
+{
+}
+
+char *
+Hello::get_string (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ return CORBA::string_dup ("Hello there!");
+}
+
+void
+Hello::shutdown (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
+}
diff --git a/TAO/tests/Bench/wire/Hello.h b/TAO/tests/Bench/wire/Hello.h
new file mode 100644
index 00000000000..9097ddddbb4
--- /dev/null
+++ b/TAO/tests/Bench/wire/Hello.h
@@ -0,0 +1,45 @@
+//
+// $Id$
+//
+
+#ifndef HELLO_H
+#define HELLO_H
+#include /**/ "ace/pre.h"
+
+#include "TestS.h"
+
+#if defined (_MSC_VER)
+# if (_MSC_VER >= 1200)
+# pragma warning(push)
+# endif /* _MSC_VER >= 1200 */
+# pragma warning (disable:4250)
+#endif /* _MSC_VER */
+
+/// Implement the Test::Hello interface
+class Hello
+ : public virtual POA_Test::Hello
+ , public virtual PortableServer::RefCountServantBase
+{
+public:
+ /// Constructor
+ Hello (CORBA::ORB_ptr orb);
+
+ // = The skeleton methods
+ virtual char * get_string (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+private:
+ /// Use an ORB reference to conver strings to objects and shutdown
+ /// the application.
+ CORBA::ORB_var orb_;
+};
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma warning(pop)
+#endif /* _MSC_VER */
+
+#include /**/ "ace/post.h"
+#endif /* HELLO_H */
diff --git a/TAO/tests/Bench/wire/TestC.cpp b/TAO/tests/Bench/wire/TestC.cpp
new file mode 100644
index 00000000000..548127dd1ae
--- /dev/null
+++ b/TAO/tests/Bench/wire/TestC.cpp
@@ -0,0 +1,508 @@
+// -*- C++ -*-
+//
+// $Id$
+
+// **** Code generated by the The ACE ORB (TAO) IDL Compiler ****
+// TAO and the TAO IDL Compiler have been developed by:
+// Center for Distributed Object Computing
+// Washington University
+// St. Louis, MO
+// USA
+// http://www.cs.wustl.edu/~schmidt/doc-center.html
+// and
+// Distributed Object Computing Laboratory
+// University of California at Irvine
+// Irvine, CA
+// USA
+// http://doc.ece.uci.edu/
+// and
+// Institute for Software Integrated Systems
+// Vanderbilt University
+// Nashville, TN
+// USA
+// http://www.isis.vanderbilt.edu/
+//
+// Information about TAO is available at:
+// http://www.cs.wustl.edu/~schmidt/TAO.html
+
+// TAO_IDL - Generated from
+// be/be_codegen.cpp:301
+
+
+#include "TestC.h"
+#include "tao/Stub.h"
+#include "tao/Invocation_Adapter.h"
+#include "tao/Any_Impl_T.h"
+
+#if defined (__BORLANDC__)
+#pragma option -w-rvl -w-rch -w-ccc -w-aus -w-sig
+#endif /* __BORLANDC__ */
+
+#if !defined (__ACE_INLINE__)
+#include "TestC.i"
+#endif /* !defined INLINE */
+
+// TAO_IDL - Generated from
+// be/be_visitor_interface/interface_cs.cpp:60
+
+// Traits specializations for Test::Hello.
+
+Test::Hello_ptr
+TAO::Objref_Traits<Test::Hello>::tao_duplicate (
+ Test::Hello_ptr p
+ )
+{
+ return Test::Hello::_duplicate (p);
+}
+
+void
+TAO::Objref_Traits<Test::Hello>::tao_release (
+ Test::Hello_ptr p
+ )
+{
+ CORBA::release (p);
+}
+
+Test::Hello_ptr
+TAO::Objref_Traits<Test::Hello>::tao_nil (void)
+{
+ return Test::Hello::_nil ();
+}
+
+CORBA::Boolean
+TAO::Objref_Traits<Test::Hello>::tao_marshal (
+ Test::Hello_ptr p,
+ TAO_OutputCDR & cdr
+ )
+{
+ return p->marshal (cdr);
+}
+
+int Test::Hello::_tao_class_id = 0;
+
+// Function pointer for collocation factory initialization.
+TAO::Collocation_Proxy_Broker *
+(*Test__TAO_Hello_Proxy_Broker_Factory_function_pointer) (
+ CORBA::Object_ptr obj
+ ) = 0;
+
+// TAO_IDL - Generated from
+// be/be_visitor_operation/operation_cs.cpp:78
+
+char * Test::Hello::get_string (
+ ACE_ENV_SINGLE_ARG_DECL
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ))
+{
+ if (!this->is_evaluated ())
+ {
+ ACE_NESTED_CLASS (CORBA, Object)::tao_object_initialize (this);
+ }
+
+ if (this->the_TAO_Hello_Proxy_Broker_ == 0)
+ {
+ Test_Hello_setup_collocation (
+ this->ACE_NESTED_CLASS (CORBA, Object)::_is_collocated ()
+ );
+ }
+
+ TAO::Arg_Traits<CORBA::Char *>::ret_val _tao_retval;
+
+ TAO::Argument *_tao_signature [] =
+ {
+ &_tao_retval
+ };
+
+ TAO::Invocation_Adapter _tao_call (
+ this,
+ _tao_signature,
+ 1,
+ "get_string",
+ 10,
+ this->the_TAO_Hello_Proxy_Broker_
+ );
+
+ _tao_call.invoke (0, 0 ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (_tao_retval.excp ());
+
+ return _tao_retval.retn ();
+}
+
+// TAO_IDL - Generated from
+// be/be_visitor_operation/operation_cs.cpp:78
+
+void Test::Hello::shutdown (
+ ACE_ENV_SINGLE_ARG_DECL
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ))
+{
+ if (!this->is_evaluated ())
+ {
+ ACE_NESTED_CLASS (CORBA, Object)::tao_object_initialize (this);
+ }
+
+ if (this->the_TAO_Hello_Proxy_Broker_ == 0)
+ {
+ Test_Hello_setup_collocation (
+ this->ACE_NESTED_CLASS (CORBA, Object)::_is_collocated ()
+ );
+ }
+
+ TAO::Arg_Traits<void>::ret_val _tao_retval;
+
+ TAO::Argument *_tao_signature [] =
+ {
+ &_tao_retval
+ };
+
+ TAO::Invocation_Adapter _tao_call (
+ this,
+ _tao_signature,
+ 1,
+ "shutdown",
+ 8,
+ this->the_TAO_Hello_Proxy_Broker_,
+ TAO::TAO_ONEWAY_INVOCATION
+ );
+
+ _tao_call.invoke (0, 0 ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+}
+
+Test::Hello::Hello (int collocated)
+ : the_TAO_Hello_Proxy_Broker_ (0)
+{
+ this->Test_Hello_setup_collocation (collocated);
+}
+
+void
+Test::Hello::Test_Hello_setup_collocation (int collocated)
+{
+ if (collocated)
+ this->the_TAO_Hello_Proxy_Broker_ =
+ ::Test__TAO_Hello_Proxy_Broker_Factory_function_pointer (this);
+}
+
+Test::Hello::~Hello (void)
+{}
+
+void
+Test::Hello::_tao_any_destructor (void *_tao_void_pointer)
+{
+ Hello *_tao_tmp_pointer = ACE_static_cast (Hello *, _tao_void_pointer);
+ CORBA::release (_tao_tmp_pointer);
+}
+
+Test::Hello_ptr
+Test::Hello::_narrow (
+ CORBA::Object_ptr obj
+ ACE_ENV_ARG_DECL
+ )
+{
+ if (CORBA::is_nil (obj))
+ {
+ return ACE_NESTED_CLASS (Test, Hello)::_nil ();
+ }
+
+ if (! obj->_is_local ())
+ {
+ CORBA::Boolean is_a =
+ obj->_is_a (
+ "IDL:Test/Hello:1.0"
+ ACE_ENV_ARG_PARAMETER
+ );
+ ACE_CHECK_RETURN (ACE_NESTED_CLASS (Test, Hello)::_nil ());
+
+ if (is_a == 0)
+ {
+ return ACE_NESTED_CLASS (Test, Hello)::_nil ();
+ }
+ }
+
+ return ACE_NESTED_CLASS (Test, Hello)::_unchecked_narrow (obj ACE_ENV_ARG_PARAMETER);
+}
+
+Test::Hello_ptr
+Test::Hello::_unchecked_narrow (
+ CORBA::Object_ptr obj
+ ACE_ENV_ARG_DECL_NOT_USED
+ )
+{
+ if (CORBA::is_nil (obj))
+ {
+ return Hello::_nil ();
+ }
+
+ Hello_ptr default_proxy = Hello::_nil ();
+
+ // Code for lazily evaluated IOR's
+ if (!obj->is_evaluated ())
+ {
+ ACE_NEW_RETURN (
+ default_proxy,
+ ::Test::Hello (
+ obj->steal_ior (),
+ obj->orb_core ()
+ ),
+ Hello::_nil ()
+ );
+
+ return default_proxy;
+ }
+
+ if (! obj->_is_local ())
+ {
+ TAO_Stub* stub = obj->_stubobj ();
+
+ if (stub != 0)
+ {
+ stub->_incr_refcnt ();
+ }
+
+ if (
+ !CORBA::is_nil (stub->servant_orb_var ().ptr ()) &&
+ stub->servant_orb_var ()->orb_core ()->optimize_collocation_objects () &&
+ obj->_is_collocated () &&
+ Test__TAO_Hello_Proxy_Broker_Factory_function_pointer != 0
+ )
+ {
+ ACE_NEW_RETURN (
+ default_proxy,
+ ::Test::Hello (
+ stub,
+ 1,
+ obj->_servant ()
+ ),
+ Hello::_nil ()
+ );
+ }
+
+ if (CORBA::is_nil (default_proxy))
+ {
+ ACE_NEW_RETURN (
+ default_proxy,
+ ::Test::Hello (
+ stub,
+ 0,
+ obj->_servant ()
+ ),
+ Hello::_nil ()
+ );
+ }
+
+ return default_proxy;
+ }
+ else
+ {
+ Test::Hello_ptr p =
+ dynamic_cast <Hello_ptr> (obj);
+
+ p->_add_ref ();
+
+ return p;
+ }
+}
+
+Test::Hello_ptr
+Test::Hello::_duplicate (Hello_ptr obj)
+{
+ if (! CORBA::is_nil (obj))
+ {
+ obj->_add_ref ();
+ }
+
+ return obj;
+}
+
+CORBA::Boolean
+Test::Hello::_is_a (
+ const char *value
+ ACE_ENV_ARG_DECL
+ )
+{
+ if (
+ !ACE_OS::strcmp (
+ (char *)value,
+ "IDL:Test/Hello:1.0"
+ ) ||
+ !ACE_OS::strcmp (
+ (char *)value,
+ "IDL:omg.org/CORBA/Object:1.0"
+ )
+ )
+ {
+ return 1; // success using local knowledge
+ }
+ else
+ {
+ return this->ACE_NESTED_CLASS (CORBA, Object)::_is_a (
+ value
+ ACE_ENV_ARG_PARAMETER
+ );
+ }
+}
+
+void *Test::Hello::_tao_QueryInterface (ptrdiff_t type)
+{
+ void *retv = 0;
+
+ if (type == ACE_reinterpret_cast (
+ ptrdiff_t,
+ &ACE_NESTED_CLASS (::Test, Hello)::_tao_class_id)
+ )
+ {
+ retv = ACE_reinterpret_cast (void*, this);
+ }
+ else if (type == ACE_reinterpret_cast (
+ ptrdiff_t,
+ &CORBA::Object::_tao_class_id)
+ )
+ {
+ retv =
+ ACE_reinterpret_cast (
+ void *,
+ ACE_static_cast (CORBA::Object_ptr, this)
+ );
+ }
+
+ if (retv != 0)
+ {
+ this->_add_ref ();
+ }
+
+ return retv;
+}
+
+const char* Test::Hello::_interface_repository_id (void) const
+{
+ return "IDL:Test/Hello:1.0";
+}
+
+CORBA::Boolean
+Test::Hello::marshal (TAO_OutputCDR &cdr)
+{
+ return (cdr << this);
+}
+
+// TAO_IDL - Generated from
+// be/be_visitor_typecode/typecode_defn.cpp:284
+
+static const CORBA::Long _oc_Test_Hello[] =
+{
+ TAO_ENCAP_BYTE_ORDER, // byte order
+ 19,
+ ACE_NTOHL (0x49444c3a),
+ ACE_NTOHL (0x54657374),
+ ACE_NTOHL (0x2f48656c),
+ ACE_NTOHL (0x6c6f3a31),
+ ACE_NTOHL (0x2e300000), // repository ID = IDL:Test/Hello:1.0
+ 6,
+ ACE_NTOHL (0x48656c6c),
+ ACE_NTOHL (0x6f000000), // name = Hello
+ };
+
+static CORBA::TypeCode _tc_TAO_tc_Test_Hello (
+ CORBA::tk_objref,
+ sizeof (_oc_Test_Hello),
+ (char *) &_oc_Test_Hello,
+ 0,
+ sizeof (Test::Hello)
+ );
+
+namespace Test
+{
+ ::CORBA::TypeCode_ptr _tc_Hello =
+ &_tc_TAO_tc_Test_Hello;
+}
+
+// TAO_IDL - Generated from
+// be/be_visitor_interface/any_op_cs.cpp:50
+
+// Copying insertion.
+void
+operator<<= (
+ CORBA::Any &_tao_any,
+ Test::Hello_ptr _tao_elem
+ )
+{
+ Test::Hello_ptr _tao_objptr =
+ Test::Hello::_duplicate (_tao_elem);
+ _tao_any <<= &_tao_objptr;
+}
+
+// Non-copying insertion.
+void
+operator<<= (
+ CORBA::Any &_tao_any,
+ Test::Hello_ptr *_tao_elem
+ )
+{
+ TAO::Any_Impl_T<Test::Hello>::insert (
+ _tao_any,
+ Test::Hello::_tao_any_destructor,
+ Test::_tc_Hello,
+ *_tao_elem
+ );
+}
+
+CORBA::Boolean
+operator>>= (
+ const CORBA::Any &_tao_any,
+ Test::Hello_ptr &_tao_elem
+ )
+{
+ return
+ TAO::Any_Impl_T<Test::Hello>::extract (
+ _tao_any,
+ Test::Hello::_tao_any_destructor,
+ Test::_tc_Hello,
+ _tao_elem
+ );
+}
+
+// TAO_IDL - Generated from
+// be/be_visitor_interface/cdr_op_cs.cpp:63
+
+CORBA::Boolean operator<< (
+ TAO_OutputCDR &strm,
+ const Test::Hello_ptr _tao_objref
+ )
+{
+ CORBA::Object_ptr _tao_corba_obj = _tao_objref;
+ return (strm << _tao_corba_obj);
+}
+
+CORBA::Boolean operator>> (
+ TAO_InputCDR &strm,
+ Test::Hello_ptr &_tao_objref
+ )
+{
+ ACE_TRY_NEW_ENV
+ {
+ CORBA::Object_var obj;
+
+ if ((strm >> obj.inout ()) == 0)
+ {
+ return 0;
+ }
+
+ // Narrow to the right type.
+ _tao_objref =
+ Test::Hello::_unchecked_narrow (
+ obj.in ()
+ ACE_ENV_ARG_PARAMETER
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ ACE_CATCHANY
+ {
+ // do nothing
+ }
+ ACE_ENDTRY;
+ return 0;
+}
diff --git a/TAO/tests/Bench/wire/TestC.h b/TAO/tests/Bench/wire/TestC.h
new file mode 100644
index 00000000000..22cbbc5eebe
--- /dev/null
+++ b/TAO/tests/Bench/wire/TestC.h
@@ -0,0 +1,267 @@
+// -*- C++ -*-
+//
+// $Id$
+
+// **** Code generated by the The ACE ORB (TAO) IDL Compiler ****
+// TAO and the TAO IDL Compiler have been developed by:
+// Center for Distributed Object Computing
+// Washington University
+// St. Louis, MO
+// USA
+// http://www.cs.wustl.edu/~schmidt/doc-center.html
+// and
+// Distributed Object Computing Laboratory
+// University of California at Irvine
+// Irvine, CA
+// USA
+// http://doc.ece.uci.edu/
+// and
+// Institute for Software Integrated Systems
+// Vanderbilt University
+// Nashville, TN
+// USA
+// http://www.isis.vanderbilt.edu/
+//
+// Information about TAO is available at:
+// http://www.cs.wustl.edu/~schmidt/TAO.html
+
+// TAO_IDL - Generated from
+// be/be_codegen.cpp:151
+
+#ifndef _TAO_IDL_TESTC_H_
+#define _TAO_IDL_TESTC_H_
+
+
+#include "tao/corba.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "tao/Objref_VarOut_T.h"
+#include "tao/Basic_Arguments.h"
+#include "tao/UB_String_Arguments.h"
+
+#if defined (TAO_EXPORT_MACRO)
+#undef TAO_EXPORT_MACRO
+#endif
+#define TAO_EXPORT_MACRO
+
+#if defined (TAO_EXPORT_NESTED_CLASSES)
+# if defined (TAO_EXPORT_NESTED_MACRO)
+# undef TAO_EXPORT_NESTED_MACRO
+# endif /* defined (TAO_EXPORT_NESTED_MACRO) */
+# define TAO_EXPORT_NESTED_MACRO
+#endif /* TAO_EXPORT_NESTED_CLASSES */
+
+#if defined(_MSC_VER)
+#if (_MSC_VER >= 1200)
+#pragma warning(push)
+#endif /* _MSC_VER >= 1200 */
+#pragma warning(disable:4250)
+#endif /* _MSC_VER */
+
+#if defined (__BORLANDC__)
+#pragma option push -w-rvl -w-rch -w-ccc -w-inl
+#endif /* __BORLANDC__ */
+
+// TAO_IDL - Generated from
+// be/be_visitor_root/root_ch.cpp:63
+
+namespace TAO
+{
+ class Collocation_Proxy_Broker;
+}
+
+// TAO_IDL - Generated from
+// be/be_visitor_module/module_ch.cpp:48
+
+namespace Test
+{
+
+ // TAO_IDL - Generated from
+ // be/be_interface.cpp:601
+
+#if !defined (_TEST_HELLO__VAR_OUT_CH_)
+#define _TEST_HELLO__VAR_OUT_CH_
+
+ class Hello;
+ typedef Hello *Hello_ptr;
+
+ typedef
+ TAO_Objref_Var_T<
+ Hello
+ >
+ Hello_var;
+
+ typedef
+ TAO_Objref_Out_T<
+ Hello
+ >
+ Hello_out;
+
+#endif /* end #if !defined */
+
+ // TAO_IDL - Generated from
+ // be/be_visitor_interface/interface_ch.cpp:53
+
+#if !defined (_TEST_HELLO_CH_)
+#define _TEST_HELLO_CH_
+
+ class Hello
+ : public virtual CORBA::Object
+ {
+ public:
+ typedef Hello_ptr _ptr_type;
+ typedef Hello_var _var_type;
+ static int _tao_class_id;
+
+ // The static operations.
+ static Hello_ptr _duplicate (Hello_ptr obj);
+
+ static Hello_ptr _narrow (
+ CORBA::Object_ptr obj
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS
+ );
+
+ static Hello_ptr _unchecked_narrow (
+ CORBA::Object_ptr obj
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS
+ );
+
+ static Hello_ptr _nil (void)
+ {
+ return (Hello_ptr)0;
+ }
+
+ static void _tao_any_destructor (void *);
+
+ // TAO_IDL - Generated from
+ // be/be_visitor_operation/operation_ch.cpp:46
+
+ virtual char * get_string (
+ ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ));
+
+ // TAO_IDL - Generated from
+ // be/be_visitor_operation/operation_ch.cpp:46
+
+ virtual void shutdown (
+ ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ));
+
+ // TAO_IDL - Generated from
+ // be/be_visitor_interface/interface_ch.cpp:200
+
+ virtual CORBA::Boolean _is_a (
+ const char *type_id
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS
+ );
+
+ virtual void *_tao_QueryInterface (ptrdiff_t type);
+
+ virtual const char* _interface_repository_id (void) const;
+ virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr);
+ private:
+ TAO::Collocation_Proxy_Broker *the_TAO_Hello_Proxy_Broker_;
+
+ protected:
+ Hello (int collocated = 0);
+
+ // These methods travese the inheritance tree and set the
+ // parents piece of the given class in the right mode.
+ virtual void Test_Hello_setup_collocation (int collocated);
+
+ Hello (IOP::IOR *ior,
+ TAO_ORB_Core *orb_core = 0);
+
+ Hello (
+ TAO_Stub *objref,
+ CORBA::Boolean _tao_collocated = 0,
+ TAO_Abstract_ServantBase *servant = 0,
+ TAO_ORB_Core *orb_core = 0
+ );
+ virtual ~Hello (void);
+
+ private:
+ Hello (const Hello &);
+ void operator= (const Hello &);
+ };
+
+#endif /* end #if !defined */
+
+ // TAO_IDL - Generated from
+ // be/be_visitor_typecode/typecode_decl.cpp:44
+
+ TAO_NAMESPACE_STORAGE_CLASS ::CORBA::TypeCode_ptr _tc_Hello;
+
+// TAO_IDL - Generated from
+// be/be_visitor_module/module_ch.cpp:66
+
+} // module Test
+
+// Proxy Broker Factory function pointer declarations.
+
+// TAO_IDL - Generated from
+// be/be_visitor_root/root.cpp:76
+
+extern
+TAO::Collocation_Proxy_Broker *
+(*Test__TAO_Hello_Proxy_Broker_Factory_function_pointer) (
+ CORBA::Object_ptr obj
+ );
+
+// TAO_IDL - Generated from
+// be/be_visitor_traits.cpp:58
+
+// Traits specializations.
+namespace TAO
+{
+};
+
+// TAO_IDL - Generated from
+// be/be_visitor_interface/any_op_ch.cpp:52
+
+ void operator<<= (CORBA::Any &, Test::Hello_ptr); // copying
+ void operator<<= (CORBA::Any &, Test::Hello_ptr *); // non-copying
+ CORBA::Boolean operator>>= (const CORBA::Any &, Test::Hello_ptr &);
+
+// TAO_IDL - Generated from
+// be/be_visitor_root/cdr_op.cpp:48
+
+#ifndef __ACE_INLINE__
+
+// TAO_IDL - Generated from
+// be/be_visitor_interface/cdr_op_ch.cpp:55
+
+ CORBA::Boolean operator<< (TAO_OutputCDR &, const Test::Hello_ptr );
+ CORBA::Boolean operator>> (TAO_InputCDR &, Test::Hello_ptr &);
+
+// TAO_IDL - Generated from
+// be/be_visitor_root/cdr_op.cpp:64
+
+#endif /* __ACE_INLINE__ */
+
+// TAO_IDL - Generated from
+// be/be_codegen.cpp:963
+
+#if defined (__ACE_INLINE__)
+#include "TestC.i"
+#endif /* defined INLINE */
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+#pragma warning(pop)
+#endif /* _MSC_VER */
+
+#if defined (__BORLANDC__)
+#pragma option pop
+#endif /* __BORLANDC__ */
+
+#endif /* ifndef */
+
diff --git a/TAO/tests/Bench/wire/TestC.i b/TAO/tests/Bench/wire/TestC.i
new file mode 100644
index 00000000000..c9bce331a27
--- /dev/null
+++ b/TAO/tests/Bench/wire/TestC.i
@@ -0,0 +1,85 @@
+// -*- C++ -*-
+//
+// $Id$
+
+// **** Code generated by the The ACE ORB (TAO) IDL Compiler ****
+// TAO and the TAO IDL Compiler have been developed by:
+// Center for Distributed Object Computing
+// Washington University
+// St. Louis, MO
+// USA
+// http://www.cs.wustl.edu/~schmidt/doc-center.html
+// and
+// Distributed Object Computing Laboratory
+// University of California at Irvine
+// Irvine, CA
+// USA
+// http://doc.ece.uci.edu/
+// and
+// Institute for Software Integrated Systems
+// Vanderbilt University
+// Nashville, TN
+// USA
+// http://www.isis.vanderbilt.edu/
+//
+// Information about TAO is available at:
+// http://www.cs.wustl.edu/~schmidt/TAO.html
+
+
+// TAO_IDL - Generated from
+// be/be_visitor_interface/interface_ci.cpp:63
+
+#if !defined (_TEST_HELLO___CI_)
+#define _TEST_HELLO___CI_
+
+ACE_INLINE
+Test::Hello::Hello (
+ TAO_Stub *objref,
+ CORBA::Boolean _tao_collocated,
+ TAO_Abstract_ServantBase *servant,
+ TAO_ORB_Core *oc
+ )
+ : ACE_NESTED_CLASS (CORBA, Object) (objref, _tao_collocated, servant, oc),
+ the_TAO_Hello_Proxy_Broker_ (0)
+
+{
+ this->Test_Hello_setup_collocation (_tao_collocated);
+}
+
+template<>
+ACE_INLINE
+CORBA::Boolean
+TAO::Any_Impl_T<Test::Hello>::to_object (
+ CORBA::Object_ptr &_tao_elem
+ ) const
+{
+ _tao_elem = CORBA::Object::_duplicate (this->value_);
+ return 1;
+}
+
+ACE_INLINE
+Test::Hello::Hello (
+ IOP::IOR *ior,
+ TAO_ORB_Core *oc
+ )
+ : ACE_NESTED_CLASS (CORBA, Object) (ior, oc),
+ the_TAO_Hello_Proxy_Broker_ (0)
+
+{
+}
+
+#endif /* end #if !defined */
+
+// TAO_IDL - Generated from
+// be/be_visitor_interface/cdr_op_ci.cpp:72
+
+ CORBA::Boolean operator<< (
+ TAO_OutputCDR &,
+ const Test::Hello_ptr
+ );
+
+ CORBA::Boolean operator>> (
+ TAO_InputCDR &,
+ Test::Hello_ptr &
+ );
+
diff --git a/TAO/tests/Bench/wire/TestS.cpp b/TAO/tests/Bench/wire/TestS.cpp
new file mode 100644
index 00000000000..dec2bf5ce91
--- /dev/null
+++ b/TAO/tests/Bench/wire/TestS.cpp
@@ -0,0 +1,1169 @@
+// -*- C++ -*-
+//
+// $Id$
+
+// **** Code generated by the The ACE ORB (TAO) IDL Compiler ****
+// TAO and the TAO IDL Compiler have been developed by:
+// Center for Distributed Object Computing
+// Washington University
+// St. Louis, MO
+// USA
+// http://www.cs.wustl.edu/~schmidt/doc-center.html
+// and
+// Distributed Object Computing Laboratory
+// University of California at Irvine
+// Irvine, CA
+// USA
+// http://doc.ece.uci.edu/
+// and
+// Institute for Software Integrated Systems
+// Vanderbilt University
+// Nashville, TN
+// USA
+// http://www.isis.vanderbilt.edu/
+//
+// Information about TAO is available at:
+// http://www.cs.wustl.edu/~schmidt/TAO.html
+
+
+// TAO_IDL - Generated from
+// be/be_codegen.cpp:619
+
+#ifndef _TAO_IDL_TESTS_CPP_
+#define _TAO_IDL_TESTS_CPP_
+
+
+#include "TestS.h"
+#include "tao/PortableServer/Object_Adapter.h"
+#include "tao/PortableServer/Operation_Table.h"
+#include "tao/TAO_Server_Request.h"
+#include "tao/ORB_Core.h"
+#include "tao/Profile.h"
+#include "tao/Stub.h"
+#include "tao/IFR_Client_Adapter.h"
+#include "tao/PortableInterceptor.h"
+#if TAO_HAS_INTERCEPTORS == 1
+#include "tao/RequestInfo_Util.h"
+#include "tao/PICurrent.h"
+#include "tao/PortableServer/ServerRequestInfo.h"
+#include "tao/PortableServer/ServerInterceptorAdapter.h"
+#endif /* TAO_HAS_INTERCEPTORS == 1 */
+
+#include "ace/Dynamic_Service.h"
+#include "ace/config-all.h"
+
+#if defined (__BORLANDC__)
+#pragma option -w-rvl -w-rch -w-ccc -w-aus
+#endif /* __BORLANDC__ */
+
+#if !defined (__ACE_INLINE__)
+#include "TestS.i"
+#endif /* !defined INLINE */
+
+
+
+// TAO_IDL - Generated from
+// be/be_interface.cpp:1403
+
+class TAO_Test_Hello_Perfect_Hash_OpTable : public TAO_Perfect_Hash_OpTable
+{
+private:
+ unsigned int hash (const char *str, unsigned int len);
+public:
+ const TAO_operation_db_entry * lookup (const char *str, unsigned int len);
+};
+
+/* C++ code produced by gperf version 2.8 (ACE version) */
+/* Command-line: /project/tangotmp/bala/work/ACE+TAO/refactor/ACE_wrappers/bin/gperf -m -M -J -c -C -D -E -T -f 0 -F 0,0,0 -a -o -t -p -K opname_ -L C++ -Z TAO_Test_Hello_Perfect_Hash_OpTable -N lookup */
+unsigned int
+TAO_Test_Hello_Perfect_Hash_OpTable::hash (const char *str, unsigned int len)
+{
+ static const unsigned char asso_values[] =
+ {
+#if defined (ACE_MVS)
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 0,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 0,
+ 21, 21, 21, 5, 21, 5, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 0,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 0, 0, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21,
+#else
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 0, 21, 0, 21, 21,
+ 21, 5, 21, 5, 21, 21, 21, 21, 21, 21,
+ 0, 21, 21, 21, 21, 0, 0, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21,
+#endif /* ACE_MVS */
+ };
+ return len + asso_values[(int) str[len - 1]] + asso_values[(int) str[0]];
+}
+
+const class TAO_operation_db_entry *
+TAO_Test_Hello_Perfect_Hash_OpTable::lookup (const char *str, unsigned int len)
+{
+ enum
+ {
+ TOTAL_KEYWORDS = 6,
+ MIN_WORD_LENGTH = 5,
+ MAX_WORD_LENGTH = 13,
+ MIN_HASH_VALUE = 5,
+ MAX_HASH_VALUE = 20,
+ HASH_VALUE_RANGE = 16,
+ DUPLICATES = 0,
+ WORDLIST_SIZE = 11
+ };
+
+ static const class TAO_operation_db_entry wordlist[] =
+ {
+ {"",0,0,0},{"",0,0,0},{"",0,0,0},{"",0,0,0},{"",0,0,0},
+ {"_is_a", &POA_Test::Hello::_is_a_skel, 0, 0},
+ {"",0,0,0},{"",0,0,0},
+ {"shutdown", &POA_Test::Hello::shutdown_skel, &POA_Test::_TAO_Hello_ThruPOA_Proxy_Impl::shutdown, 0},
+ {"",0,0,0},
+ {"_component", &POA_Test::Hello::_component_skel, 0, 0},
+ {"",0,0,0},{"",0,0,0},
+ {"_non_existent", &POA_Test::Hello::_non_existent_skel, 0, 0},
+ {"",0,0,0},
+ {"_interface", &POA_Test::Hello::_interface_skel, 0, 0},
+ {"",0,0,0},{"",0,0,0},{"",0,0,0},{"",0,0,0},
+ {"get_string", &POA_Test::Hello::get_string_skel, &POA_Test::_TAO_Hello_ThruPOA_Proxy_Impl::get_string, 0},
+ };
+
+ if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
+ {
+ unsigned int key = hash (str, len);
+
+ if (key <= MAX_HASH_VALUE && key >= MIN_HASH_VALUE)
+ {
+ const char *s = wordlist[key].opname_;
+
+ if (*str == *s && !strncmp (str + 1, s + 1, len - 1))
+ return &wordlist[key];
+ }
+ }
+ return 0;
+}
+static TAO_Test_Hello_Perfect_Hash_OpTable tao_Test_Hello_optable;
+
+// TAO_IDL - Generated from
+// be/be_visitor_interface/interceptors_ss.cpp:52
+
+#if (TAO_HAS_INTERCEPTORS == 1)
+
+// TAO_IDL - Generated from
+// be/be_visitor_operation/interceptors_ss.cpp:74
+
+class TAO_ServerRequestInfo_Test_Hello_get_string : public TAO_ServerRequestInfo
+{
+public:
+ TAO_ServerRequestInfo_Test_Hello_get_string (
+ TAO_ServerRequest &_tao_server_request,
+ TAO_Object_Adapter::Servant_Upcall *tao_servant_upcall,
+ POA_Test::Hello *tao_impl
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS
+ );
+
+ virtual Dynamic::ParameterList * arguments (
+ ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ virtual Dynamic::ExceptionList * exceptions (
+ ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ virtual CORBA::Any * result (
+ ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ virtual char * target_most_derived_interface (
+ ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ virtual CORBA::Boolean target_is_a (
+ const char * id
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ void result (char * result);
+
+private:
+ TAO_ServerRequestInfo_Test_Hello_get_string (
+ const TAO_ServerRequestInfo_Test_Hello_get_string &
+ );
+
+ void operator= (
+ const TAO_ServerRequestInfo_Test_Hello_get_string &
+ );
+
+private:
+ POA_Test::Hello *_tao_impl;
+
+ char * _result;
+};
+
+// TAO_IDL - Generated from
+// be/be_visitor_operation/interceptors_ss.cpp:438
+
+TAO_ServerRequestInfo_Test_Hello_get_string::TAO_ServerRequestInfo_Test_Hello_get_string (
+ TAO_ServerRequest &_tao_server_request,
+ TAO_Object_Adapter::Servant_Upcall *_tao_servant_upcall,
+ POA_Test::Hello *tao_impl
+ ACE_ENV_ARG_DECL_NOT_USED
+ )
+ : TAO_ServerRequestInfo (_tao_server_request, _tao_servant_upcall),
+ _tao_impl (tao_impl)
+{}
+
+Dynamic::ParameterList *
+TAO_ServerRequestInfo_Test_Hello_get_string::arguments (
+ ACE_ENV_SINGLE_ARG_DECL
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ // Generate the argument list on demand.
+ Dynamic::ParameterList *parameter_list =
+ TAO_RequestInfo_Util::make_parameter_list (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+
+ return parameter_list;
+}
+
+Dynamic::ExceptionList *
+TAO_ServerRequestInfo_Test_Hello_get_string::exceptions (
+ ACE_ENV_SINGLE_ARG_DECL
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ // Generate the exception list on demand.
+ Dynamic::ExceptionList *exception_list =
+ TAO_RequestInfo_Util::make_exception_list (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+
+ return exception_list;
+}
+
+CORBA::Any *
+TAO_ServerRequestInfo_Test_Hello_get_string::result (
+ ACE_ENV_SINGLE_ARG_DECL
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ // Generate the result on demand.
+ CORBA::Boolean tk_void_any = 0;
+ CORBA::Any *result_any =
+ TAO_RequestInfo_Util::make_any (tk_void_any ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+
+ CORBA::Any_var safe_result_any = result_any;
+
+ (*result_any) <<= this->_result;
+
+ return safe_result_any._retn ();
+}
+
+char *
+TAO_ServerRequestInfo_Test_Hello_get_string::target_most_derived_interface (
+ ACE_ENV_SINGLE_ARG_DECL_NOT_USED
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ return
+ CORBA::string_dup (this->_tao_impl->_interface_repository_id ());
+}
+
+CORBA::Boolean
+TAO_ServerRequestInfo_Test_Hello_get_string::target_is_a (
+ const char * id
+ ACE_ENV_ARG_DECL
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ return this->_tao_impl->_is_a (id ACE_ENV_ARG_PARAMETER);
+}
+
+void
+TAO_ServerRequestInfo_Test_Hello_get_string::result (char * result)
+{
+ // Update the result.
+ this->_result = result;
+}
+
+// TAO_IDL - Generated from
+// be/be_visitor_operation/interceptors_ss.cpp:74
+
+class TAO_ServerRequestInfo_Test_Hello_shutdown : public TAO_ServerRequestInfo
+{
+public:
+ TAO_ServerRequestInfo_Test_Hello_shutdown (
+ TAO_ServerRequest &_tao_server_request,
+ TAO_Object_Adapter::Servant_Upcall *tao_servant_upcall,
+ POA_Test::Hello *tao_impl
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS
+ );
+
+ virtual Dynamic::ParameterList * arguments (
+ ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ virtual Dynamic::ExceptionList * exceptions (
+ ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ virtual CORBA::Any * result (
+ ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ virtual char * target_most_derived_interface (
+ ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ virtual CORBA::Boolean target_is_a (
+ const char * id
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+private:
+ TAO_ServerRequestInfo_Test_Hello_shutdown (
+ const TAO_ServerRequestInfo_Test_Hello_shutdown &
+ );
+
+ void operator= (
+ const TAO_ServerRequestInfo_Test_Hello_shutdown &
+ );
+
+private:
+ POA_Test::Hello *_tao_impl;
+
+};
+
+// TAO_IDL - Generated from
+// be/be_visitor_operation/interceptors_ss.cpp:438
+
+TAO_ServerRequestInfo_Test_Hello_shutdown::TAO_ServerRequestInfo_Test_Hello_shutdown (
+ TAO_ServerRequest &_tao_server_request,
+ TAO_Object_Adapter::Servant_Upcall *_tao_servant_upcall,
+ POA_Test::Hello *tao_impl
+ ACE_ENV_ARG_DECL_NOT_USED
+ )
+ : TAO_ServerRequestInfo (_tao_server_request, _tao_servant_upcall),
+ _tao_impl (tao_impl)
+{}
+
+Dynamic::ParameterList *
+TAO_ServerRequestInfo_Test_Hello_shutdown::arguments (
+ ACE_ENV_SINGLE_ARG_DECL
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ // Generate the argument list on demand.
+ Dynamic::ParameterList *parameter_list =
+ TAO_RequestInfo_Util::make_parameter_list (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+
+ return parameter_list;
+}
+
+Dynamic::ExceptionList *
+TAO_ServerRequestInfo_Test_Hello_shutdown::exceptions (
+ ACE_ENV_SINGLE_ARG_DECL
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ // Generate the exception list on demand.
+ Dynamic::ExceptionList *exception_list =
+ TAO_RequestInfo_Util::make_exception_list (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+
+ return exception_list;
+}
+
+CORBA::Any *
+TAO_ServerRequestInfo_Test_Hello_shutdown::result (
+ ACE_ENV_SINGLE_ARG_DECL
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ // Generate the result on demand.
+ CORBA::Boolean tk_void_any = 1;
+ CORBA::Any *result_any =
+ TAO_RequestInfo_Util::make_any (tk_void_any ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+
+ return result_any;
+}
+
+char *
+TAO_ServerRequestInfo_Test_Hello_shutdown::target_most_derived_interface (
+ ACE_ENV_SINGLE_ARG_DECL_NOT_USED
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ return
+ CORBA::string_dup (this->_tao_impl->_interface_repository_id ());
+}
+
+CORBA::Boolean
+TAO_ServerRequestInfo_Test_Hello_shutdown::target_is_a (
+ const char * id
+ ACE_ENV_ARG_DECL
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ return this->_tao_impl->_is_a (id ACE_ENV_ARG_PARAMETER);
+}
+
+#endif /* TAO_HAS_INTERCEPTORS */
+
+///////////////////////////////////////////////////////////////////////
+// Strategized Proxy Broker Implementation
+//
+
+// TAO_IDL - Generated from
+// be/be_visitor_interface/strategized_proxy_broker_ss.cpp:40
+
+// Factory function Implementation.
+POA_Test::_TAO_Hello_Strategized_Proxy_Broker *
+POA_Test::_TAO_Hello_Strategized_Proxy_Broker::the_TAO_Hello_Strategized_Proxy_Broker (void)
+{
+ static POA_Test::_TAO_Hello_Strategized_Proxy_Broker strategized_proxy_broker;
+ return &strategized_proxy_broker;
+}
+
+POA_Test::_TAO_Hello_Strategized_Proxy_Broker::_TAO_Hello_Strategized_Proxy_Broker (void)
+{
+}
+
+POA_Test::_TAO_Hello_Strategized_Proxy_Broker::~_TAO_Hello_Strategized_Proxy_Broker (void)
+{
+}
+
+TAO::Collocation_Strategy
+POA_Test::_TAO_Hello_Strategized_Proxy_Broker::get_strategy (
+ CORBA::Object_ptr obj
+ ACE_ENV_ARG_DECL
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ TAO::Collocation_Strategy strategy =
+ TAO_ORB_Core::collocation_strategy_new (obj ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (TAO::TAO_CS_REMOTE_STRATEGY);
+
+ return strategy;
+}
+
+void
+POA_Test::_TAO_Hello_Strategized_Proxy_Broker::dispatch (
+ CORBA::Object_ptr obj,
+ CORBA::Object_out forward_obj,
+ TAO::Argument ** args,
+ int num_args,
+ const char * op,
+ size_t op_len,
+ TAO::Collocation_Strategy strategy
+ ACE_ENV_ARG_DECL
+ )
+ ACE_THROW_SPEC ((CORBA::Exception))
+{
+ TAO_Collocated_Skeleton collocated_skel;
+
+ if (obj->_servant ()->_find (op,
+ collocated_skel,
+ strategy,
+ op_len) == -1)
+ ACE_THROW (CORBA::BAD_OPERATION ());
+
+ ACE_TRY
+ {
+ collocated_skel (
+ obj,
+ forward_obj,
+ args,
+ num_args
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ }
+ #if (TAO_HAS_MINIMUM_CORBA == 0)
+ ACE_CATCH (PortableServer::ForwardRequest, forward_request)
+ {
+ forward_obj =
+ CORBA::Object::_duplicate (forward_request.forward_reference.in ());
+ return;
+ }
+#else
+ ACE_CATCHANY
+ {
+ ACE_UNUSED_ARG (forward_obj);
+ ACE_RE_THROW;
+ }
+#endif /* TAO_HAS_MINIMUM_CORBA */
+ ACE_ENDTRY;
+ ACE_CHECK;
+}
+
+//
+// End Strategized Proxy Broker Implementation
+///////////////////////////////////////////////////////////////////////
+
+// TAO_IDL - Generated from
+// be/be_visitor_interface/interface_ss.cpp:597
+
+TAO::Collocation_Proxy_Broker *
+Test__TAO_Hello_Proxy_Broker_Factory_function (CORBA::Object_ptr)
+{
+ return
+ ::POA_Test::_TAO_Hello_Strategized_Proxy_Broker::the_TAO_Hello_Strategized_Proxy_Broker();
+}
+
+int
+Test__TAO_Hello_Proxy_Broker_Factory_Initializer (size_t)
+{
+ Test__TAO_Hello_Proxy_Broker_Factory_function_pointer =
+ Test__TAO_Hello_Proxy_Broker_Factory_function;
+
+ return 0;
+}
+
+static int
+Test__TAO_Hello_Proxy_Broker_Stub_Factory_Initializer_Scarecrow =
+ Test__TAO_Hello_Proxy_Broker_Factory_Initializer (
+ ACE_reinterpret_cast (
+ size_t,
+ Test__TAO_Hello_Proxy_Broker_Factory_Initializer
+ )
+ );
+
+
+///////////////////////////////////////////////////////////////////////
+// ThruPOA Proxy Implementation
+//
+
+// TAO_IDL - Generated from
+// be/be_visitor_interface/thru_poa_proxy_impl_ss.cpp:37
+
+POA_Test::_TAO_Hello_ThruPOA_Proxy_Impl::_TAO_Hello_ThruPOA_Proxy_Impl (void)
+{}
+
+// ThruPOA Implementation of the IDL interface methods
+
+// TAO_IDL - Generated from
+// be/be_visitor_operation/thru_poa_proxy_impl_ss.cpp:52
+
+void
+POA_Test::_TAO_Hello_ThruPOA_Proxy_Impl::get_string (
+ CORBA::Object_ptr obj,
+ CORBA::Object_out forward,
+ TAO::Argument ** args,
+ int
+ ACE_ENV_ARG_DECL
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ))
+{
+ TAO_Object_Adapter::Servant_Upcall servant_upcall (
+ obj->_stubobj ()->servant_orb_var ()->orb_core ()
+ );
+
+ servant_upcall.prepare_for_upcall (
+ obj->_stubobj ()->object_key (),
+ "get_string",
+ forward
+ ACE_ENV_ARG_PARAMETER
+ );
+ ACE_CHECK;
+
+ servant_upcall.pre_invoke_collocated_request (
+ ACE_ENV_SINGLE_ARG_PARAMETER
+ );
+ ACE_CHECK;
+
+ ((TAO::Arg_Traits<CORBA::Char *>::ret_val *) args[0])->arg () =
+ ACE_reinterpret_cast (
+ POA_Test::Hello_ptr,
+ servant_upcall.servant ()->_downcast (
+ "IDL:Test/Hello:1.0"
+ )
+ )->get_string (
+ ACE_ENV_SINGLE_ARG_PARAMETER
+ );
+ ACE_CHECK;
+}
+
+// TAO_IDL - Generated from
+// be/be_visitor_operation/thru_poa_proxy_impl_ss.cpp:52
+
+void
+POA_Test::_TAO_Hello_ThruPOA_Proxy_Impl::shutdown (
+ CORBA::Object_ptr obj,
+ CORBA::Object_out forward,
+ TAO::Argument **,
+ int
+ ACE_ENV_ARG_DECL
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ))
+{
+ TAO_Object_Adapter::Servant_Upcall servant_upcall (
+ obj->_stubobj ()->servant_orb_var ()->orb_core ()
+ );
+
+ servant_upcall.prepare_for_upcall (
+ obj->_stubobj ()->object_key (),
+ "shutdown",
+ forward
+ ACE_ENV_ARG_PARAMETER
+ );
+ ACE_CHECK;
+
+ servant_upcall.pre_invoke_collocated_request (
+ ACE_ENV_SINGLE_ARG_PARAMETER
+ );
+ ACE_CHECK;
+
+ ACE_reinterpret_cast (
+ POA_Test::Hello_ptr,
+ servant_upcall.servant ()->_downcast (
+ "IDL:Test/Hello:1.0"
+ )
+ )->shutdown (
+ ACE_ENV_SINGLE_ARG_PARAMETER
+ );
+ ACE_CHECK;
+}
+
+//
+// End ThruPOA Proxy Implementation
+///////////////////////////////////////////////////////////////////////
+
+// TAO_IDL - Generated from
+// be/be_visitor_interface/interface_ss.cpp:98
+
+POA_Test::Hello::Hello (void)
+{
+ this->optable_ = &tao_Test_Hello_optable;
+}
+
+POA_Test::Hello::Hello (const Hello& rhs)
+ : TAO_Abstract_ServantBase (rhs),
+ TAO_ServantBase (rhs)
+{
+}
+
+POA_Test::Hello::~Hello (void)
+{
+}
+
+// TAO_IDL - Generated from
+// be/be_visitor_operation/operation_ss.cpp:98
+
+void POA_Test::Hello::get_string_skel (
+ TAO_ServerRequest &_tao_server_request,
+ void *_tao_servant,
+ void *_tao_servant_upcall
+ ACE_ENV_ARG_DECL
+ )
+{
+ POA_Test::Hello *_tao_impl =
+ ACE_static_cast (
+ POA_Test::Hello *,
+ _tao_servant
+ );
+ CORBA::String_var _tao_retval;
+
+#if (TAO_HAS_INTERCEPTORS == 1)
+ TAO_Object_Adapter::Servant_Upcall *_tao_upcall =
+ ACE_static_cast (TAO_Object_Adapter::Servant_Upcall *, _tao_servant_upcall);
+
+ TAO_ServerRequestInterceptor_Adapter _tao_vfr (
+ _tao_server_request.orb_core ()->server_request_interceptors (),
+ _tao_server_request.interceptor_count ()
+ );
+
+ TAO_ServerRequestInfo_Test_Hello_get_string _tao_ri (
+ _tao_server_request,
+ _tao_upcall,
+ _tao_impl
+ ACE_ENV_ARG_PARAMETER
+ );
+
+ ACE_TRY
+ {
+ {
+ TAO_PICurrent_Guard _tao_pi_guard (_tao_ri.server_request (),
+ 1 /* Copy TSC to RSC */);
+
+ _tao_vfr.receive_request (&_tao_ri ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ if (!_tao_vfr.location_forwarded ())
+ {
+
+#endif /* TAO_HAS_INTERCEPTORS */
+ _tao_retval =
+ _tao_impl->get_string (
+
+ ACE_ENV_SINGLE_ARG_PARAMETER
+ );
+ TAO_INTERCEPTOR_CHECK;
+
+#if (TAO_HAS_INTERCEPTORS == 1)
+
+ }
+ }
+
+ if (!_tao_vfr.location_forwarded ())
+ {
+ char * _tao_retval_info = _tao_retval._retn ();
+ _tao_ri.result (_tao_retval_info);
+ _tao_retval = _tao_retval_info;
+ _tao_ri.reply_status (PortableInterceptor::SUCCESSFUL);
+ _tao_vfr.send_reply (&_tao_ri ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ }
+ }
+ ACE_CATCHANY
+ {
+ _tao_ri.exception (&ACE_ANY_EXCEPTION);
+ _tao_vfr.send_exception (
+ &_tao_ri
+ ACE_ENV_ARG_PARAMETER
+ );
+ ACE_TRY_CHECK;
+
+ PortableInterceptor::ReplyStatus _tao_status =
+ _tao_ri.reply_status (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ if (_tao_status == PortableInterceptor::SYSTEM_EXCEPTION
+ || _tao_status == PortableInterceptor::USER_EXCEPTION)
+ {
+ ACE_RE_THROW;
+ }
+ }
+
+# if defined (ACE_HAS_EXCEPTIONS) \
+ && defined (ACE_HAS_BROKEN_UNEXPECTED_EXCEPTIONS)
+ ACE_CATCHALL
+ {
+ CORBA::UNKNOWN ex;
+
+ _tao_ri.exception (&ex);
+ _tao_vfr.send_exception (
+ &_tao_ri
+ ACE_ENV_ARG_PARAMETER
+ );
+ ACE_TRY_CHECK;
+
+ PortableInterceptor::ReplyStatus _tao_status =
+ _tao_ri.reply_status (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ if (_tao_status == PortableInterceptor::SYSTEM_EXCEPTION)
+ ACE_TRY_THROW (ex);
+ }
+# endif /* ACE_HAS_EXCEPTIONS && ACE_HAS_BROKEN_UNEXPECTED_EXCEPTIONS */
+
+ ACE_ENDTRY;
+ ACE_CHECK;
+#endif /* TAO_HAS_INTERCEPTORS */
+
+ _tao_server_request.init_reply ();
+
+ TAO_OutputCDR &_tao_out = _tao_server_request.outgoing ();
+
+ if (!(
+ (_tao_out << _tao_retval.in ())
+ ))
+ {
+
+ TAO_OutputCDR::throw_skel_exception (errno ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+ }
+
+
+ // In case _tao_servant_upcall is not used in this function
+ ACE_UNUSED_ARG (_tao_servant_upcall);
+}
+
+// TAO_IDL - Generated from
+// be/be_visitor_operation/operation_ss.cpp:98
+
+void POA_Test::Hello::shutdown_skel (
+ TAO_ServerRequest &_tao_server_request,
+ void *_tao_servant,
+ void *_tao_servant_upcall
+ ACE_ENV_ARG_DECL
+ )
+{
+ POA_Test::Hello *_tao_impl =
+ ACE_static_cast (
+ POA_Test::Hello *,
+ _tao_servant
+ );
+ _tao_server_request.argument_flag (0);
+
+
+#if (TAO_HAS_INTERCEPTORS == 1)
+ TAO_Object_Adapter::Servant_Upcall *_tao_upcall =
+ ACE_static_cast (TAO_Object_Adapter::Servant_Upcall *, _tao_servant_upcall);
+
+ TAO_ServerRequestInterceptor_Adapter _tao_vfr (
+ _tao_server_request.orb_core ()->server_request_interceptors (),
+ _tao_server_request.interceptor_count ()
+ );
+
+ TAO_ServerRequestInfo_Test_Hello_shutdown _tao_ri (
+ _tao_server_request,
+ _tao_upcall,
+ _tao_impl
+ ACE_ENV_ARG_PARAMETER
+ );
+
+ ACE_TRY
+ {
+ {
+ TAO_PICurrent_Guard _tao_pi_guard (_tao_ri.server_request (),
+ 1 /* Copy TSC to RSC */);
+
+ _tao_vfr.receive_request (&_tao_ri ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ if (!_tao_vfr.location_forwarded ())
+ {
+
+#endif /* TAO_HAS_INTERCEPTORS */
+
+ _tao_impl->shutdown (
+
+ ACE_ENV_SINGLE_ARG_PARAMETER
+ );
+ TAO_INTERCEPTOR_CHECK;
+
+#if (TAO_HAS_INTERCEPTORS == 1)
+
+ }
+ }
+
+ if (!_tao_vfr.location_forwarded ())
+ {
+ _tao_ri.reply_status (PortableInterceptor::SUCCESSFUL);
+ _tao_vfr.send_reply (&_tao_ri ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ }
+ }
+ ACE_CATCHANY
+ {
+ _tao_ri.exception (&ACE_ANY_EXCEPTION);
+ _tao_vfr.send_exception (
+ &_tao_ri
+ ACE_ENV_ARG_PARAMETER
+ );
+ ACE_TRY_CHECK;
+
+ PortableInterceptor::ReplyStatus _tao_status =
+ _tao_ri.reply_status (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ if (_tao_status == PortableInterceptor::SYSTEM_EXCEPTION
+ || _tao_status == PortableInterceptor::USER_EXCEPTION)
+ {
+ ACE_RE_THROW;
+ }
+ }
+
+# if defined (ACE_HAS_EXCEPTIONS) \
+ && defined (ACE_HAS_BROKEN_UNEXPECTED_EXCEPTIONS)
+ ACE_CATCHALL
+ {
+ CORBA::UNKNOWN ex;
+
+ _tao_ri.exception (&ex);
+ _tao_vfr.send_exception (
+ &_tao_ri
+ ACE_ENV_ARG_PARAMETER
+ );
+ ACE_TRY_CHECK;
+
+ PortableInterceptor::ReplyStatus _tao_status =
+ _tao_ri.reply_status (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ if (_tao_status == PortableInterceptor::SYSTEM_EXCEPTION)
+ ACE_TRY_THROW (ex);
+ }
+# endif /* ACE_HAS_EXCEPTIONS && ACE_HAS_BROKEN_UNEXPECTED_EXCEPTIONS */
+
+ ACE_ENDTRY;
+ ACE_CHECK;
+#endif /* TAO_HAS_INTERCEPTORS */
+
+ if (_tao_server_request.response_expected ()
+ && !_tao_server_request.sync_with_server ())
+ {
+ _tao_server_request.init_reply ();
+ }
+
+ // In case _tao_servant_upcall is not used in this function
+ ACE_UNUSED_ARG (_tao_servant_upcall);
+}
+
+// TAO_IDL - Generated from
+// be/be_visitor_interface/interface_ss.cpp:165
+
+void POA_Test::Hello::_is_a_skel (
+ TAO_ServerRequest &_tao_server_request,
+ void * _tao_servant,
+ void * /* Servant_Upcall */
+ ACE_ENV_ARG_DECL
+ )
+{
+ TAO_InputCDR &_tao_in = _tao_server_request.incoming ();
+ POA_Test::Hello *_tao_impl = (POA_Test::Hello *) _tao_servant;
+ CORBA::Boolean _tao_retval = 0;
+ CORBA::String_var value;
+
+ if (!(_tao_in >> value.out ()))
+ ACE_THROW (CORBA::MARSHAL ());
+
+ _tao_retval = _tao_impl->_is_a (value.in () ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ _tao_server_request.init_reply ();
+ TAO_OutputCDR &_tao_out = _tao_server_request.outgoing ();
+
+ if (!(_tao_out << CORBA::Any::from_boolean (_tao_retval)))
+ ACE_THROW (CORBA::MARSHAL ());
+}
+
+void POA_Test::Hello::_non_existent_skel (
+ TAO_ServerRequest &_tao_server_request,
+ void * _tao_servant,
+ void * /* Servant_Upcall */
+ ACE_ENV_ARG_DECL
+ )
+{
+ POA_Test::Hello *_tao_impl = (POA_Test::Hello *) _tao_servant;
+ CORBA::Boolean _tao_retval =
+ _tao_impl->_non_existent (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK;
+
+ _tao_server_request.init_reply ();
+ TAO_OutputCDR &_tao_out = _tao_server_request.outgoing ();
+
+ if (!(_tao_out << CORBA::Any::from_boolean (_tao_retval)))
+ ACE_THROW (CORBA::MARSHAL ());
+}
+
+void POA_Test::Hello::_interface_skel (
+ TAO_ServerRequest &_tao_server_request,
+ void * _tao_servant,
+ void * /* Servant_Upcall */
+ ACE_ENV_ARG_DECL
+ )
+{
+ POA_Test::Hello *_tao_impl = (POA_Test::Hello *) _tao_servant;
+ CORBA::InterfaceDef_ptr _tao_retval = 0;
+ CORBA::Boolean _tao_result = 0;
+
+ TAO_IFR_Client_Adapter *_tao_adapter =
+ ACE_Dynamic_Service<TAO_IFR_Client_Adapter>::instance (
+ TAO_ORB_Core::ifr_client_adapter_name ()
+ );
+
+ if (_tao_adapter == 0)
+ {
+ ACE_THROW (CORBA::INTF_REPOS ());
+ }
+
+ ACE_TRY
+ {
+ _tao_retval =
+ _tao_impl->_get_interface (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ _tao_server_request.init_reply ();
+
+ TAO_OutputCDR &_tao_out = _tao_server_request.outgoing ();
+
+ _tao_result =
+ _tao_adapter->interfacedef_cdr_insert (
+ _tao_out,
+ _tao_retval
+ );
+ }
+ ACE_CATCHALL
+ {
+ _tao_adapter->dispose (_tao_retval);
+ }
+ ACE_ENDTRY;
+
+ if (_tao_result == 0)
+ {
+ ACE_THROW (CORBA::MARSHAL ());
+ }
+}
+
+void POA_Test::Hello::_component_skel (
+ TAO_ServerRequest &_tao_server_request,
+ void * _tao_object_reference,
+ void * /* Servant_Upcall */
+ ACE_ENV_ARG_DECL
+ )
+{
+ POA_Test::Hello *_tao_impl = (POA_Test::Hello *) _tao_object_reference;
+ CORBA::Object_var _tao_retval =
+ _tao_impl->_get_component (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK;
+
+ _tao_server_request.init_reply ();
+ TAO_OutputCDR &_tao_out = _tao_server_request.outgoing ();
+
+ if (!(_tao_out << _tao_retval._retn ()))
+ ACE_THROW (CORBA::MARSHAL ());
+}
+
+CORBA::Boolean POA_Test::Hello::_is_a (
+ const char* value
+ ACE_ENV_ARG_DECL_NOT_USED
+ )
+{
+ if (
+ !ACE_OS::strcmp (
+ (char *)value,
+ "IDL:Test/Hello:1.0"
+ ) ||
+ !ACE_OS::strcmp (
+ (char *)value,
+ "IDL:org.omg/CORBA/Object:1.0"
+ )
+ )
+ {
+ return 1;
+ }
+ else
+ {
+ return 0;
+ }
+}
+
+void* POA_Test::Hello::_downcast (
+ const char* logical_type_id
+ )
+{
+ if (ACE_OS::strcmp (logical_type_id,
+ "IDL:Test/Hello:1.0") == 0)
+ {
+ return ACE_static_cast (POA_Test::Hello_ptr, this);
+ }
+
+ if (ACE_OS::strcmp (logical_type_id,
+ "IDL:omg.org/CORBA/Object:1.0") == 0)
+ {
+ return ACE_static_cast(PortableServer::Servant, this);
+ }
+
+ return 0;
+}
+
+const char* POA_Test::Hello::_interface_repository_id (void) const
+{
+ return "IDL:Test/Hello:1.0";
+}
+
+// TAO_IDL - Generated from
+// be/be_visitor_interface/interface_ss.cpp:533
+
+void POA_Test::Hello::_dispatch (
+ TAO_ServerRequest &req,
+ void *servant_upcall
+ ACE_ENV_ARG_DECL
+ )
+{
+ this->synchronous_upcall_dispatch (req,
+ servant_upcall,
+ this
+ ACE_ENV_ARG_PARAMETER);
+}
+
+// TAO_IDL - Generated from
+// be/be_visitor_interface/interface_ss.cpp:479
+
+Test::Hello *
+POA_Test::Hello::_this (ACE_ENV_SINGLE_ARG_DECL)
+{
+ TAO_Stub *stub = this->_create_stub (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+
+ TAO_Stub_Auto_Ptr safe_stub (stub);
+ CORBA::Object_ptr tmp = CORBA::Object::_nil ();
+
+ if (stub->servant_orb_var ()->orb_core ()->optimize_collocation_objects ())
+ {
+ ACE_NEW_RETURN (
+ tmp,
+ CORBA::Object (
+ stub,
+ 1,
+ this
+ ),
+ 0
+ );
+ }
+ else
+ {
+ ACE_NEW_RETURN (
+ tmp,
+ CORBA::Object (
+ stub,
+ 0,
+ this
+ ),
+ 0
+ );
+ }
+
+ CORBA::Object_var obj = tmp;
+ (void) safe_stub.release ();
+ return ::Test::Hello::_unchecked_narrow (obj.in ());
+}
+
+#endif /* ifndef */
diff --git a/TAO/tests/Bench/wire/TestS.h b/TAO/tests/Bench/wire/TestS.h
new file mode 100644
index 00000000000..2f4349f9188
--- /dev/null
+++ b/TAO/tests/Bench/wire/TestS.h
@@ -0,0 +1,291 @@
+// -*- C++ -*-
+//
+// $Id$
+
+// **** Code generated by the The ACE ORB (TAO) IDL Compiler ****
+// TAO and the TAO IDL Compiler have been developed by:
+// Center for Distributed Object Computing
+// Washington University
+// St. Louis, MO
+// USA
+// http://www.cs.wustl.edu/~schmidt/doc-center.html
+// and
+// Distributed Object Computing Laboratory
+// University of California at Irvine
+// Irvine, CA
+// USA
+// http://doc.ece.uci.edu/
+// and
+// Institute for Software Integrated Systems
+// Vanderbilt University
+// Nashville, TN
+// USA
+// http://www.isis.vanderbilt.edu/
+//
+// Information about TAO is available at:
+// http://www.cs.wustl.edu/~schmidt/TAO.html
+
+// TAO_IDL - Generated from
+// be/be_codegen.cpp:390
+
+#ifndef _TAO_IDL_TESTS_H_
+#define _TAO_IDL_TESTS_H_
+
+
+#include "TestC.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "tao/Collocation_Proxy_Broker.h"
+#include "tao/PortableServer/PortableServer.h"
+#include "tao/PortableServer/Servant_Base.h"
+#include "tao/PortableServer/Collocated_Object.h"
+#include "tao/PortableServer/ThruPOA_Object_Proxy_Impl.h"
+#include "tao/PortableServer/Direct_Object_Proxy_Impl.h"
+
+#if defined(_MSC_VER)
+#if (_MSC_VER >= 1200)
+#pragma warning(push)
+#endif /* _MSC_VER >= 1200 */
+#pragma warning(disable:4250)
+#endif /* _MSC_VER */
+
+#if defined (__BORLANDC__)
+#pragma option push -w-rvl -w-rch -w-ccc -w-inl
+#endif /* __BORLANDC__ */
+
+// TAO_IDL - Generated from
+// be/be_visitor_module/module_sh.cpp:49
+
+namespace POA_Test
+{
+
+
+ // TAO_IDL - Generated from
+ // be/be_visitor_interface/interface_sh.cpp:87
+
+ class Hello;
+ typedef Hello *Hello_ptr;
+
+ class _TAO_Hello_ThruPOA_Proxy_Impl;
+ class _TAO_Hello_Strategized_Proxy_Broker;
+
+ class Hello
+ : public virtual PortableServer::ServantBase
+ {
+ protected:
+ Hello (void);
+
+ public:
+ // Useful for template programming.
+ typedef ::Test::Hello _stub_type;
+ typedef ::Test::Hello_ptr _stub_ptr_type;
+ typedef ::Test::Hello_var _stub_var_type;
+
+ Hello (const Hello& rhs);
+ virtual ~Hello (void);
+
+ virtual CORBA::Boolean _is_a (
+ const char* logical_type_id
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS
+ );
+
+ virtual void* _downcast (
+ const char* logical_type_id
+ );
+
+ static void _is_a_skel (
+ TAO_ServerRequest &req,
+ void *servant,
+ void *servant_upcall
+ ACE_ENV_ARG_DECL
+ );
+
+ static void _non_existent_skel (
+ TAO_ServerRequest &req,
+ void *servant,
+ void *servant_upcall
+ ACE_ENV_ARG_DECL
+ );
+
+ static void _interface_skel (
+ TAO_ServerRequest &req,
+ void *servant,
+ void *servant_upcall
+ ACE_ENV_ARG_DECL
+ );
+
+ static void _component_skel (
+ TAO_ServerRequest &req,
+ void *obj,
+ void *servant_upcall
+ ACE_ENV_ARG_DECL
+ );
+
+ virtual void _dispatch (
+ TAO_ServerRequest &req,
+ void *_servant_upcall
+ ACE_ENV_ARG_DECL
+ );
+
+ ::Test::Hello *_this (
+ ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS
+ );
+
+ virtual const char* _interface_repository_id (void) const;
+
+ // TAO_IDL - Generated from
+ // be/be_visitor_operation/operation_sh.cpp:45
+
+ virtual char * get_string (
+ ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ )) = 0;
+
+ static void get_string_skel (
+ TAO_ServerRequest &_tao_req,
+ void *_tao_servant,
+ void *_tao_servant_upcall
+ ACE_ENV_ARG_DECL
+ );
+
+ // TAO_IDL - Generated from
+ // be/be_visitor_operation/operation_sh.cpp:45
+
+ virtual void shutdown (
+ ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ )) = 0;
+
+ static void shutdown_skel (
+ TAO_ServerRequest &_tao_req,
+ void *_tao_servant,
+ void *_tao_servant_upcall
+ ACE_ENV_ARG_DECL
+ );
+ };
+
+ ///////////////////////////////////////////////////////////////////////
+ // Strategized Proxy Broker Declaration
+ //
+
+ // TAO_IDL - Generated from
+ // be/be_visitor_interface/strategized_proxy_broker_sh.cpp:37
+
+ class _TAO_Hello_Strategized_Proxy_Broker
+ : public virtual TAO::Collocation_Proxy_Broker
+ {
+ public:
+ _TAO_Hello_Strategized_Proxy_Broker (void);
+
+ virtual ~_TAO_Hello_Strategized_Proxy_Broker (void);
+
+ TAO::Collocation_Strategy
+ get_strategy (
+ CORBA::Object_ptr obj
+ ACE_ENV_ARG_DECL
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ void
+ dispatch (
+ CORBA::Object_ptr obj,
+ CORBA::Object_out forward_obj,
+ TAO::Argument ** args,
+ int num_args,
+ const char * op,
+ size_t op_len,
+ TAO::Collocation_Strategy strategy
+ ACE_ENV_ARG_DECL
+ )
+ ACE_THROW_SPEC ((CORBA::Exception));
+
+ static
+ _TAO_Hello_Strategized_Proxy_Broker *
+ the_TAO_Hello_Strategized_Proxy_Broker (void);
+};
+
+//
+// End Strategized Proxy Broker Declaration
+///////////////////////////////////////////////////////////////////////
+
+
+///////////////////////////////////////////////////////////////////////
+// ThruPOA Proxy Impl. Declaration
+//
+
+// TAO_IDL - Generated from
+// be/be_visitor_interface/thru_poa_proxy_impl_sh.cpp:37
+
+class _TAO_Hello_ThruPOA_Proxy_Impl
+ : public virtual TAO_ThruPOA_Object_Proxy_Impl
+{
+public:
+ _TAO_Hello_ThruPOA_Proxy_Impl (void);
+
+ virtual ~_TAO_Hello_ThruPOA_Proxy_Impl (void) {}
+
+ // TAO_IDL - Generated from
+ // be/be_visitor_operation/proxy_impl_xh.cpp:24
+
+ static void
+ get_string (
+ CORBA::Object_ptr obj,
+ CORBA::Object_out obj_forward,
+ TAO::Argument ** args,
+ int num_args
+ ACE_ENV_ARG_DECL
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ));
+
+ // TAO_IDL - Generated from
+ // be/be_visitor_operation/proxy_impl_xh.cpp:24
+
+ static void
+ shutdown (
+ CORBA::Object_ptr obj,
+ CORBA::Object_out obj_forward,
+ TAO::Argument ** args,
+ int num_args
+ ACE_ENV_ARG_DECL
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ));
+};
+
+//
+// ThruPOA Proxy Impl. Declaration
+///////////////////////////////////////////////////////////////////////
+
+// TAO_IDL - Generated from
+// be/be_visitor_module/module_sh.cpp:80
+
+} // module Test
+
+// TAO_IDL - Generated from
+// be/be_codegen.cpp:998
+
+#include "TestS_T.h"
+
+#if defined (__ACE_INLINE__)
+#include "TestS.i"
+#endif /* defined INLINE */
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+#pragma warning(pop)
+#endif /* _MSC_VER */
+
+#if defined (__BORLANDC__)
+#pragma option pop
+#endif /* __BORLANDC__ */
+
+#endif /* ifndef */
diff --git a/TAO/tests/Bench/wire/TestS.i b/TAO/tests/Bench/wire/TestS.i
new file mode 100644
index 00000000000..1d2df31bd57
--- /dev/null
+++ b/TAO/tests/Bench/wire/TestS.i
@@ -0,0 +1,26 @@
+// -*- C++ -*-
+//
+// $Id$
+
+// **** Code generated by the The ACE ORB (TAO) IDL Compiler ****
+// TAO and the TAO IDL Compiler have been developed by:
+// Center for Distributed Object Computing
+// Washington University
+// St. Louis, MO
+// USA
+// http://www.cs.wustl.edu/~schmidt/doc-center.html
+// and
+// Distributed Object Computing Laboratory
+// University of California at Irvine
+// Irvine, CA
+// USA
+// http://doc.ece.uci.edu/
+// and
+// Institute for Software Integrated Systems
+// Vanderbilt University
+// Nashville, TN
+// USA
+// http://www.isis.vanderbilt.edu/
+//
+// Information about TAO is available at:
+// http://www.cs.wustl.edu/~schmidt/TAO.html
diff --git a/TAO/tests/Bench/wire/client.cpp b/TAO/tests/Bench/wire/client.cpp
new file mode 100644
index 00000000000..f85722246b5
--- /dev/null
+++ b/TAO/tests/Bench/wire/client.cpp
@@ -0,0 +1,86 @@
+// $Id$
+
+#include "TestC.h"
+#include "ace/Get_Opt.h"
+
+ACE_RCSID(Hello, client, "$Id$")
+
+const char *ior = "file://test.ior";
+
+int
+parse_args (int argc, char *argv[])
+{
+ ACE_Get_Opt get_opts (argc, argv, "k:");
+ int c;
+
+ while ((c = get_opts ()) != -1)
+ switch (c)
+ {
+ case 'k':
+ ior = get_opts.opt_arg ();
+ break;
+
+ case '?':
+ default:
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "usage: %s "
+ "-k <ior> "
+ "\n",
+ argv [0]),
+ -1);
+ }
+ // Indicates sucessful parsing of the command line
+ return 0;
+}
+
+int
+main (int argc, char *argv[])
+{
+ ACE_TRY_NEW_ENV
+ {
+ CORBA::ORB_var orb =
+ CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ if (parse_args (argc, argv) != 0)
+ return 1;
+
+ CORBA::Object_var tmp =
+ orb->string_to_object(ior ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ Test::Hello_var hello =
+ Test::Hello::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ if (CORBA::is_nil (hello.in ()))
+ {
+ ACE_ERROR_RETURN ((LM_DEBUG,
+ "Nil Test::Hello reference <%s>\n",
+ ior),
+ 1);
+ }
+
+ CORBA::String_var the_string =
+ hello->get_string (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ ACE_DEBUG ((LM_DEBUG, "(%P|%t) - string returned <%s>\n",
+ the_string.in ()));
+
+ hello->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ }
+ ACE_CATCHANY
+ {
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
+ "Exception caught:");
+ return 1;
+ }
+ ACE_ENDTRY;
+
+ return 0;
+}
diff --git a/TAO/tests/Bench/wire/server.cpp b/TAO/tests/Bench/wire/server.cpp
new file mode 100644
index 00000000000..0b56e777eb6
--- /dev/null
+++ b/TAO/tests/Bench/wire/server.cpp
@@ -0,0 +1,114 @@
+// $Id$
+
+#include "Hello.h"
+#include "ace/Get_Opt.h"
+
+ACE_RCSID (Hello,
+ server,
+ "$Id$")
+
+const char *ior_output_file = "test.ior";
+
+int
+parse_args (int argc, char *argv[])
+{
+ ACE_Get_Opt get_opts (argc, argv, "o:");
+ int c;
+
+ while ((c = get_opts ()) != -1)
+ switch (c)
+ {
+ case 'o':
+ ior_output_file = get_opts.opt_arg ();
+ break;
+
+ case '?':
+ default:
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "usage: %s "
+ "-o <iorfile>"
+ "\n",
+ argv [0]),
+ -1);
+ }
+ // Indicates sucessful parsing of the command line
+ return 0;
+}
+
+int
+main (int argc, char *argv[])
+{
+ ACE_TRY_NEW_ENV
+ {
+ CORBA::ORB_var orb =
+ CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ CORBA::Object_var poa_object =
+ orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ PortableServer::POA_var root_poa =
+ PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ if (CORBA::is_nil (root_poa.in ()))
+ ACE_ERROR_RETURN ((LM_ERROR,
+ " (%P|%t) Panic: nil RootPOA\n"),
+ 1);
+
+ PortableServer::POAManager_var poa_manager =
+ root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ if (parse_args (argc, argv) != 0)
+ return 1;
+
+ Hello *hello_impl;
+ ACE_NEW_RETURN (hello_impl,
+ Hello (orb.in ()),
+ 1);
+ PortableServer::ServantBase_var owner_transfer(hello_impl);
+
+ Test::Hello_var hello =
+ hello_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ CORBA::String_var ior =
+ orb->object_to_string (hello.in () ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ // Output the IOR to the <ior_output_file>
+ FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ if (output_file == 0)
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Cannot open output file for writing IOR: %s",
+ ior_output_file),
+ 1);
+ ACE_OS::fprintf (output_file, "%s", ior.in ());
+ ACE_OS::fclose (output_file);
+
+ poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
+
+ root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ }
+ ACE_CATCHANY
+ {
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
+ "Exception caught:");
+ return 1;
+ }
+ ACE_ENDTRY;
+
+ return 0;
+}
diff --git a/TAO/tests/Bench/wire/test.idl b/TAO/tests/Bench/wire/test.idl
deleted file mode 100644
index e04945aad39..00000000000
--- a/TAO/tests/Bench/wire/test.idl
+++ /dev/null
@@ -1,10 +0,0 @@
-
-// $Id$
-
-interface foo
-{
- string all_str (in string inarg,
- inout string inoutarg,
- out string outarg);
-};
-
diff --git a/TAO/tests/Bench/wire/testC.cpp b/TAO/tests/Bench/wire/testC.cpp
new file mode 100644
index 00000000000..75cf14a3935
--- /dev/null
+++ b/TAO/tests/Bench/wire/testC.cpp
@@ -0,0 +1,526 @@
+// -*- C++ -*-
+//
+// $Id$
+
+// **** Code generated by the The ACE ORB (TAO) IDL Compiler ****
+// TAO and the TAO IDL Compiler have been developed by:
+// Center for Distributed Object Computing
+// Washington University
+// St. Louis, MO
+// USA
+// http://www.cs.wustl.edu/~schmidt/doc-center.html
+// and
+// Distributed Object Computing Laboratory
+// University of California at Irvine
+// Irvine, CA
+// USA
+// http://doc.ece.uci.edu/
+// and
+// Institute for Software Integrated Systems
+// Vanderbilt University
+// Nashville, TN
+// USA
+// http://www.isis.vanderbilt.edu/
+//
+// Information about TAO is available at:
+// http://www.cs.wustl.edu/~schmidt/TAO.html
+
+// TAO_IDL - Generated from
+// be/be_codegen.cpp:301
+
+
+#include "testC.h"
+#include "tao/Stub.h"
+#include "tao/Invocation_Adapter.h"
+#include "tao/Invocation.h"
+#include "tao/PortableInterceptor.h"
+
+#if TAO_HAS_INTERCEPTORS == 1
+#include "tao/RequestInfo_Util.h"
+#include "tao/ClientRequestInfo_i.h"
+#include "tao/ClientInterceptorAdapter.h"
+#endif /* TAO_HAS_INTERCEPTORS == 1 */
+
+#include "tao/Any_Impl_T.h"
+#include "tao/Any_Basic_Impl_T.h"
+#include "tao/Any_Special_Basic_Impl_T.h"
+#include "tao/Any_Dual_Impl_T.h"
+#include "tao/Any_Special_Impl_T.h"
+#include "tao/Any_Array_Impl_T.h"
+
+#if defined (__BORLANDC__)
+#pragma option -w-rvl -w-rch -w-ccc -w-aus -w-sig
+#endif /* __BORLANDC__ */
+
+#if !defined (__ACE_INLINE__)
+#include "testC.i"
+#endif /* !defined INLINE */
+
+// TAO_IDL - Generated from
+// be/be_visitor_interface/interface_cs.cpp:60
+
+// Traits specializations for foo.
+
+foo_ptr
+TAO::Objref_Traits<foo>::tao_duplicate (
+ foo_ptr p
+ )
+{
+ return foo::_duplicate (p);
+}
+
+void
+TAO::Objref_Traits<foo>::tao_release (
+ foo_ptr p
+ )
+{
+ CORBA::release (p);
+}
+
+foo_ptr
+TAO::Objref_Traits<foo>::tao_nil (void)
+{
+ return foo::_nil ();
+}
+
+CORBA::Boolean
+TAO::Objref_Traits<foo>::tao_marshal (
+ foo_ptr p,
+ TAO_OutputCDR & cdr
+ )
+{
+ return p->marshal (cdr);
+}
+
+int foo::_tao_class_id = 0;
+
+// Function pointer for collocation factory initialization.
+TAO::Collocation_Proxy_Broker *
+(*_TAO_foo_Proxy_Broker_Factory_function_pointer) (
+ CORBA::Object_ptr obj
+ ) = 0;
+
+// TAO_IDL - Generated from
+// be/be_visitor_operation/operation_cs.cpp:80
+
+char * foo::all_str (
+ const char * inarg,
+ char *& inoutarg,
+ CORBA::String_out outarg
+ ACE_ENV_ARG_DECL
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ))
+{
+ if (!this->is_evaluated ())
+ {
+ ACE_NESTED_CLASS (CORBA, Object)::tao_object_initialize (this);
+ }
+
+ if (this->the_TAO_foo_Proxy_Broker_ == 0)
+ {
+ foo_setup_collocation (
+ this->ACE_NESTED_CLASS (CORBA, Object)::_is_collocated ()
+ );
+ }
+
+ TAO::Arg_Traits<CORBA::Char *>::stub_ret_val _tao_retval;
+ TAO::Arg_Traits<CORBA::Char *>::in_arg_val _tao_inarg (inarg);
+ TAO::Arg_Traits<CORBA::Char *>::inout_arg_val _tao_inoutarg (inoutarg);
+ TAO::Arg_Traits<CORBA::Char *>::out_arg_val _tao_outarg (outarg);
+
+ TAO::Argument *_tao_signature [] =
+ {
+ &_tao_retval,
+ &_tao_inarg,
+ &_tao_inoutarg,
+ &_tao_outarg
+ };
+
+ TAO::Invocation_Adapter _tao_call (
+ this,
+ _tao_signature,
+ 4,
+ "all_str",
+ 7,
+ this->the_TAO_foo_Proxy_Broker_
+ );
+
+ _tao_call.invoke (0, 0 ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (_tao_retval.excp ());
+
+ return _tao_retval.retn ();
+}
+
+foo::foo (int collocated)
+ : the_TAO_foo_Proxy_Broker_ (0)
+{
+ this->foo_setup_collocation (collocated);
+}
+
+void
+foo::foo_setup_collocation (int collocated)
+{
+ if (collocated)
+ this->the_TAO_foo_Proxy_Broker_ =
+ ::_TAO_foo_Proxy_Broker_Factory_function_pointer (this);
+}
+
+foo::~foo (void)
+{}
+
+void
+foo::_tao_any_destructor (void *_tao_void_pointer)
+{
+ foo *tmp = ACE_static_cast (foo *, _tao_void_pointer);
+ CORBA::release (tmp);
+}
+
+foo_ptr
+foo::_narrow (
+ CORBA::Object_ptr obj
+ ACE_ENV_ARG_DECL
+ )
+{
+ if (CORBA::is_nil (obj))
+ {
+ return foo::_nil ();
+ }
+
+ if (! obj->_is_local ())
+ {
+ CORBA::Boolean is_a =
+ obj->_is_a (
+ "IDL:foo:1.0"
+ ACE_ENV_ARG_PARAMETER
+ );
+ ACE_CHECK_RETURN (foo::_nil ());
+
+ if (is_a == 0)
+ {
+ return foo::_nil ();
+ }
+ }
+
+ return foo::_unchecked_narrow (obj ACE_ENV_ARG_PARAMETER);
+}
+
+foo_ptr
+foo::_unchecked_narrow (
+ CORBA::Object_ptr obj
+ ACE_ENV_ARG_DECL_NOT_USED
+ )
+{
+ if (CORBA::is_nil (obj))
+ {
+ return foo::_nil ();
+ }
+
+ foo_ptr default_proxy = foo::_nil ();
+
+ // Code for lazily evaluated IOR's
+ if (!obj->is_evaluated ())
+ {
+ ACE_NEW_RETURN (
+ default_proxy,
+ ::foo (
+ obj->steal_ior (),
+ obj->orb_core ()
+ ),
+ foo::_nil ()
+ );
+
+ return default_proxy;
+ }
+
+ if (! obj->_is_local ())
+ {
+ TAO_Stub* stub = obj->_stubobj ();
+
+ if (stub != 0)
+ {
+ stub->_incr_refcnt ();
+ }
+
+ if (
+ !CORBA::is_nil (stub->servant_orb_var ().ptr ()) &&
+ stub->servant_orb_var ()->orb_core ()->optimize_collocation_objects () &&
+ obj->_is_collocated () &&
+ _TAO_foo_Proxy_Broker_Factory_function_pointer != 0
+ )
+ {
+ ACE_NEW_RETURN (
+ default_proxy,
+ ::foo (
+ stub,
+ 1,
+ obj->_servant ()
+ ),
+ foo::_nil ()
+ );
+ }
+
+ if (CORBA::is_nil (default_proxy))
+ {
+ ACE_NEW_RETURN (
+ default_proxy,
+ ::foo (
+ stub,
+ 0,
+ obj->_servant ()
+ ),
+ foo::_nil ()
+ );
+ }
+
+ return default_proxy;
+ }
+ else
+ {
+ foo_ptr p =
+ dynamic_cast <foo_ptr> (obj);
+
+ p->_add_ref ();
+
+ return p;
+ }
+
+}
+
+foo_ptr
+foo::_duplicate (foo_ptr obj)
+{
+ if (! CORBA::is_nil (obj))
+ {
+ obj->_add_ref ();
+ }
+
+ return obj;
+}
+
+CORBA::Boolean
+foo::_is_a (
+ const char *value
+ ACE_ENV_ARG_DECL
+ )
+{
+ if (
+ !ACE_OS::strcmp (
+ (char *)value,
+ "IDL:foo:1.0"
+ ) ||
+ !ACE_OS::strcmp (
+ (char *)value,
+ "IDL:omg.org/CORBA/Object:1.0"
+ )
+ )
+ {
+ return 1; // success using local knowledge
+ }
+ else
+ {
+ return this->ACE_NESTED_CLASS (CORBA, Object)::_is_a (
+ value
+ ACE_ENV_ARG_PARAMETER
+ );
+ }
+}
+
+void *foo::_tao_QueryInterface (ptrdiff_t type)
+{
+ void *retv = 0;
+
+ if (type == ACE_reinterpret_cast (
+ ptrdiff_t,
+ &foo::_tao_class_id)
+ )
+ {
+ retv = ACE_reinterpret_cast (void*, this);
+ }
+ else if (type == ACE_reinterpret_cast (
+ ptrdiff_t,
+ &CORBA::Object::_tao_class_id)
+ )
+ {
+ retv =
+ ACE_reinterpret_cast (
+ void *,
+ ACE_static_cast (CORBA::Object_ptr, this)
+ );
+ }
+
+ if (retv != 0)
+ {
+ this->_add_ref ();
+ }
+
+ return retv;
+}
+
+const char* foo::_interface_repository_id (void) const
+{
+ return "IDL:foo:1.0";
+}
+
+CORBA::Boolean
+foo::marshal (TAO_OutputCDR &cdr)
+{
+ return (cdr << this);
+}
+
+// TAO_IDL - Generated from
+// be/be_visitor_typecode/typecode_defn.cpp:284
+
+static const CORBA::Long _oc_foo[] =
+{
+ TAO_ENCAP_BYTE_ORDER, // byte order
+ 12,
+ ACE_NTOHL (0x49444c3a),
+ ACE_NTOHL (0x666f6f3a),
+ ACE_NTOHL (0x312e3000), // repository ID = IDL:foo:1.0
+ 4,
+ ACE_NTOHL (0x666f6f00), // name = foo
+ };
+
+static CORBA::TypeCode _tc_TAO_tc_foo (
+ CORBA::tk_objref,
+ sizeof (_oc_foo),
+ (char *) &_oc_foo,
+ 0,
+ sizeof (foo)
+ );
+
+::CORBA::TypeCode_ptr _tc_foo =
+ &_tc_TAO_tc_foo;
+
+// TAO_IDL - Generated from
+// be/be_visitor_interface/any_op_cs.cpp:50
+
+// Copying insertion.
+void
+operator<<= (
+ CORBA::Any &_tao_any,
+ foo_ptr _tao_elem
+ )
+{
+ foo_ptr _tao_objptr =
+ foo::_duplicate (_tao_elem);
+ _tao_any <<= &_tao_objptr;
+}
+
+// Non-copying insertion.
+void
+operator<<= (
+ CORBA::Any &_tao_any,
+ foo_ptr *_tao_elem
+ )
+{
+ TAO::Any_Impl_T<foo>::insert (
+ _tao_any,
+ foo::_tao_any_destructor,
+ _tc_foo,
+ *_tao_elem
+ );
+}
+
+CORBA::Boolean
+operator>>= (
+ const CORBA::Any &_tao_any,
+ foo_ptr &_tao_elem
+ )
+{
+ return
+ TAO::Any_Impl_T<foo>::extract (
+ _tao_any,
+ foo::_tao_any_destructor,
+ _tc_foo,
+ _tao_elem
+ );
+}
+
+// TAO_IDL - Generated from
+// be/be_visitor_interface/cdr_op_cs.cpp:63
+
+CORBA::Boolean operator<< (
+ TAO_OutputCDR &strm,
+ const foo_ptr _tao_objref
+ )
+{
+ CORBA::Object_ptr _tao_corba_obj = _tao_objref;
+ return (strm << _tao_corba_obj);
+}
+
+CORBA::Boolean operator>> (
+ TAO_InputCDR &strm,
+ foo_ptr &_tao_objref
+ )
+{
+ ACE_TRY_NEW_ENV
+ {
+ CORBA::Object_var obj;
+
+ if ((strm >> obj.inout ()) == 0)
+ {
+ return 0;
+ }
+
+ // Narrow to the right type.
+ _tao_objref =
+ foo::_unchecked_narrow (
+ obj.in ()
+ ACE_ENV_ARG_PARAMETER
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ ACE_CATCHANY
+ {
+ // do nothing
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+
+// TAO_IDL - Generated from
+// be/be_visitor_root/root.cpp:1650
+
+#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
+
+ template class
+ TAO_Objref_Var_T<
+ foo,
+ TAO::Objref_Traits<foo>
+ >;
+
+ template class
+ TAO_Objref_Out_T<
+ foo,
+ TAO::Objref_Traits<foo>
+ >;
+
+ template class
+ TAO::Any_Impl_T<
+ foo
+ >;
+
+#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
+
+# pragma instantiate \
+ TAO_Objref_Var_T< \
+ foo, \
+ TAO::Objref_Traits<foo> \
+ >
+
+# pragma instantiate \
+ TAO_Objref_Out_T< \
+ foo, \
+ TAO::Objref_Traits<foo> \
+ >
+
+# pragma instantiate \
+ TAO::Any_Impl_T< \
+ foo \
+ >
+
+#endif /* !ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */