summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbala <balanatarajan@users.noreply.github.com>2003-08-28 21:46:54 +0000
committerbala <balanatarajan@users.noreply.github.com>2003-08-28 21:46:54 +0000
commitd923d80cc369ebaba512dedc8337c3c467a6e025 (patch)
treebea6c7595998b7fb28e359f6ea70460f8d7388c0
parentc695ac8efb2ed1684b8058272aea6d5251167970 (diff)
downloadATCD-d923d80cc369ebaba512dedc8337c3c467a6e025.tar.gz
*** empty log message ***
-rw-r--r--TAO/tests/Bench/Collocated/Client_Task.cpp62
-rw-r--r--TAO/tests/Bench/Collocated/Client_Task.h37
-rw-r--r--TAO/tests/Bench/Collocated/Collocated_Test.cpp103
-rw-r--r--TAO/tests/Bench/Collocated/Hello.cpp60
-rw-r--r--TAO/tests/Bench/Collocated/Hello.h50
-rw-r--r--TAO/tests/Bench/Collocated/Server_Task.cpp102
-rw-r--r--TAO/tests/Bench/Collocated/Server_Task.h42
-rw-r--r--TAO/tests/Bench/Collocated/TestC.cpp511
-rw-r--r--TAO/tests/Bench/Collocated/TestC.h267
-rw-r--r--TAO/tests/Bench/Collocated/TestC.i85
-rw-r--r--TAO/tests/Bench/Collocated/TestS.cpp1168
-rw-r--r--TAO/tests/Bench/Collocated/TestS.h291
-rw-r--r--TAO/tests/Bench/Collocated/TestS.i26
-rw-r--r--TAO/tests/Bench/Collocated/TestS_T.cpp41
-rw-r--r--TAO/tests/Bench/Collocated/TestS_T.h142
-rw-r--r--TAO/tests/Bench/Collocated/TestS_T.i157
16 files changed, 3144 insertions, 0 deletions
diff --git a/TAO/tests/Bench/Collocated/Client_Task.cpp b/TAO/tests/Bench/Collocated/Client_Task.cpp
new file mode 100644
index 00000000000..3a6ddc4473a
--- /dev/null
+++ b/TAO/tests/Bench/Collocated/Client_Task.cpp
@@ -0,0 +1,62 @@
+//
+// $Id$
+//
+
+#include "Client_Task.h"
+#include "TestC.h"
+
+ACE_RCSID(Muxing, Client_Task, "$Id$")
+
+Client_Task::Client_Task (const char *ior,
+ CORBA::ORB_ptr corb,
+ ACE_Thread_Manager *thr_mgr)
+ : ACE_Task_Base (thr_mgr)
+ , input_ (ior)
+ , corb_ (CORBA::ORB::_duplicate (corb))
+
+{
+}
+
+int
+Client_Task::svc (void)
+{
+ ACE_TRY_NEW_ENV
+ {
+ CORBA::Object_var tmp =
+ this->corb_->string_to_object (input_
+ 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",
+ input_),
+ 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;
+ }
+ ACE_CATCHANY
+ {
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
+ "Exception caught:");
+ return 1;
+ }
+ ACE_ENDTRY;
+
+ return 0;
+
+}
diff --git a/TAO/tests/Bench/Collocated/Client_Task.h b/TAO/tests/Bench/Collocated/Client_Task.h
new file mode 100644
index 00000000000..98ea06eca46
--- /dev/null
+++ b/TAO/tests/Bench/Collocated/Client_Task.h
@@ -0,0 +1,37 @@
+//
+// $Id$
+//
+
+#ifndef COLLOCATED_TEST_CLIENT_TASK_H
+#define COLLOCATED_TEST_CLIENT_TASK_H
+#include /**/ "ace/pre.h"
+#include "ace/Task.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+#include "tao/ORB.h"
+
+
+/// Implement a Task to run the client as a thread
+class Client_Task : public ACE_Task_Base
+{
+public:
+
+ /// Constructor
+ Client_Task (const char *input,
+ CORBA::ORB_ptr corb,
+ ACE_Thread_Manager *thr_mgr);
+
+ /// Thread entry point
+ int svc (void);
+
+private:
+ const char *input_;
+
+ CORBA::ORB_var corb_;
+
+};
+
+#include /**/ "ace/post.h"
+#endif /* COLLOCATED_TEST_CLIENT_TASK_H */
diff --git a/TAO/tests/Bench/Collocated/Collocated_Test.cpp b/TAO/tests/Bench/Collocated/Collocated_Test.cpp
new file mode 100644
index 00000000000..ee49be06421
--- /dev/null
+++ b/TAO/tests/Bench/Collocated/Collocated_Test.cpp
@@ -0,0 +1,103 @@
+//$Id$
+#include "Server_Task.h"
+#include "Client_Task.h"
+#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
+#include "ace/SString.h"
+
+const char *output = "test.ior";
+const char *input = "file://test.ior";
+static int named_orbs = 0;
+ACE_CString server_orb;
+ACE_CString client_orb;
+int
+parse_args (int argc, char *argv[])
+{
+ ACE_Get_Opt get_opts (argc, argv, "k:o:n");
+ int c;
+
+ while ((c = get_opts ()) != -1)
+ switch (c)
+ {
+ case 'o':
+ output = get_opts.opt_arg ();
+ break;
+ case 'k':
+ input = get_opts.opt_arg ();
+ break;
+ case 'n':
+ named_orbs = 1;
+ server_orb.set ("server_orb");
+ client_orb.set ("client_orb");
+ break;
+ case '?':
+ default:
+ // This is a hack but that is okay!
+ return 0;
+ }
+ // Indicates sucessful parsing of the command line
+ return 0;
+}
+
+int
+main (int argc, char *argv[])
+{
+ if (parse_args (argc,
+ argv) == -1)
+ return -1;
+
+ ACE_DECLARE_NEW_CORBA_ENV;
+ ACE_TRY
+ {
+ ACE_Argv_Type_Converter satc (argc, argv);
+ CORBA::ORB_var sorb =
+ CORBA::ORB_init (satc.get_argc (),
+ satc.get_TCHAR_argv (),
+ server_orb.c_str ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ ACE_Manual_Event me;
+ Server_Task server_task (output,
+ sorb.in (),
+ me,
+ ACE_Thread_Manager::instance ());
+
+ if (server_task.activate (THR_NEW_LWP | THR_JOINABLE,
+ 1,
+ 1) == -1)
+ {
+ ACE_ERROR ((LM_ERROR, "Error activating server task\n"));
+ }
+
+ // Wait for the server thread to do some processing
+ me.wait ();
+
+ ACE_Argv_Type_Converter catc (argc, argv);
+ CORBA::ORB_var corb =
+ CORBA::ORB_init (catc.get_argc (),
+ catc.get_TCHAR_argv (),
+ client_orb.c_str ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ Client_Task client_task (input,
+ corb.in (),
+ ACE_Thread_Manager::instance ());
+
+ if (client_task.activate (THR_NEW_LWP | THR_JOINABLE,
+ 1,
+ 1) == -1)
+ {
+ ACE_ERROR ((LM_ERROR, "Error activating client task\n"));
+ }
+
+ ACE_Thread_Manager::instance ()->wait ();
+ }
+ ACE_CATCHANY
+ {
+ // Ignore exceptions..
+ }
+ ACE_ENDTRY;
+ return 0;
+}
diff --git a/TAO/tests/Bench/Collocated/Hello.cpp b/TAO/tests/Bench/Collocated/Hello.cpp
new file mode 100644
index 00000000000..ccdc96bb5d3
--- /dev/null
+++ b/TAO/tests/Bench/Collocated/Hello.cpp
@@ -0,0 +1,60 @@
+//
+// $Id$
+//
+#include "Hello.h"
+#include "tao/ORB_Core.h"
+#include "tao/ORB_Table.h"
+
+ACE_RCSID(Hello, Hello, "$Id$")
+
+ Hello::Hello (CORBA::ORB_ptr orb,
+ ACE_thread_t thrid)
+ : orb_ (CORBA::ORB::_duplicate (orb))
+ , thr_id_ (thrid)
+{
+}
+
+char *
+Hello::get_string (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ ACE_DEBUG ((LM_DEBUG,
+ "(%P|%t) Upcall in process ..\n"));
+
+ if (ACE_Thread::self () == this->thr_id_)
+ {
+ if (this->orb_->orb_core ()->optimize_collocation_objects () &&
+ this->orb_->orb_core ()->use_global_collocation ())
+ {
+ ACE_ERROR ((LM_ERROR,
+ "(%P|%t) ERROR: A remote call has been made "
+ " exiting ..\n"));
+ ACE_OS::abort ();
+ }
+ else if (this->orb_->orb_core ()->optimize_collocation_objects () &&
+ this->orb_->orb_core ()->use_global_collocation () == 0)
+ {
+ TAO_ORB_Table *orb_table =
+ TAO_ORB_Table::instance ();
+
+ if (orb_table->find ("server_orb") == 0)
+ {
+ // We are running on a single ORB and this is an error.
+ ACE_ERROR ((LM_ERROR,
+ "(%P|%t) ERROR: A remote call has been made "
+ " with a single ORB "
+ " exiting ..\n"));
+ ACE_OS::abort ();
+ }
+ }
+ }
+
+ 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/Collocated/Hello.h b/TAO/tests/Bench/Collocated/Hello.h
new file mode 100644
index 00000000000..76725c11cf1
--- /dev/null
+++ b/TAO/tests/Bench/Collocated/Hello.h
@@ -0,0 +1,50 @@
+//
+// $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 */
+
+#include "ace/OS.h"
+
+/// Implement the Test::Hello interface
+class Hello
+ : public virtual POA_Test::Hello
+ , public virtual PortableServer::RefCountServantBase
+{
+public:
+ /// Constructor
+ Hello (CORBA::ORB_ptr orb,
+ ACE_thread_t thr_id);
+
+ // = 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_;
+
+ ACE_thread_t thr_id_;
+};
+
+#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/Collocated/Server_Task.cpp b/TAO/tests/Bench/Collocated/Server_Task.cpp
new file mode 100644
index 00000000000..f3b3e869982
--- /dev/null
+++ b/TAO/tests/Bench/Collocated/Server_Task.cpp
@@ -0,0 +1,102 @@
+//
+// $Id$
+//
+#include "Server_Task.h"
+#include "TestS.h"
+#include "Hello.h"
+
+ACE_RCSID(Collocated_Test,
+ Server_Task,
+ "$Id$")
+
+Server_Task::Server_Task (const char *output,
+ CORBA::ORB_ptr sorb,
+ ACE_Manual_Event &me,
+ ACE_Thread_Manager *thr_mgr)
+ : ACE_Task_Base (thr_mgr)
+ , output_ (output)
+ , me_ (me)
+ , sorb_ (CORBA::ORB::_duplicate (sorb))
+{
+}
+
+int
+Server_Task::svc (void)
+{
+ ACE_TRY_NEW_ENV
+ {
+ CORBA::Object_var poa_object =
+ this->sorb_->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;
+
+ Hello *hello_impl;
+ ACE_NEW_RETURN (hello_impl,
+ Hello (this->sorb_.in (),
+ ACE_Thread::self ()),
+ 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 =
+ this->sorb_->object_to_string (hello.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ // Output the IOR to the <this->output_>
+ FILE *output_file= ACE_OS::fopen (this->output_,
+ "w");
+ if (output_file == 0)
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Cannot open output file for writing IOR: %s",
+ this->output_),
+ 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;
+
+ // Signal the main thread before we call orb->run ();
+ this->me_.signal ();
+
+ this->sorb_->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;
+
+ this->sorb_->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/Collocated/Server_Task.h b/TAO/tests/Bench/Collocated/Server_Task.h
new file mode 100644
index 00000000000..ecfe0a20179
--- /dev/null
+++ b/TAO/tests/Bench/Collocated/Server_Task.h
@@ -0,0 +1,42 @@
+//
+// $Id$
+//
+
+#ifndef COLLOCATED_SERVER_TASK_H
+#define COLLOCATED_SERVER_TASK_H
+#include /**/ "ace/pre.h"
+
+#include "ace/Task.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "tao/ORB.h"
+
+/// Implement a Task to run the server in a single thread
+class Server_Task : public ACE_Task_Base
+{
+public:
+ /// Constructor
+ Server_Task (const char *output,
+ CORBA::ORB_ptr sorb,
+ ACE_Manual_Event &me,
+ ACE_Thread_Manager *thr_mgr);
+
+ /// Thread entry point
+ int svc (void);
+
+private:
+ /// Output file for IOR
+ const char *output_;
+
+ /// Manual event to wake up the main thread to create a client
+ /// thread.
+ ACE_Manual_Event &me_;
+
+ CORBA::ORB_var sorb_;
+};
+
+#include /**/ "ace/post.h"
+#endif /* COLLOCATED_SERVER_TASK_H */
diff --git a/TAO/tests/Bench/Collocated/TestC.cpp b/TAO/tests/Bench/Collocated/TestC.cpp
new file mode 100644
index 00000000000..deab5fca5d0
--- /dev/null
+++ b/TAO/tests/Bench/Collocated/TestC.cpp
@@ -0,0 +1,511 @@
+// -*- 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
+ return
+ ACE_reinterpret_cast (
+ Hello_ptr,
+ obj->_tao_QueryInterface (
+ ACE_reinterpret_cast (
+ ptrdiff_t,
+ &Hello::_tao_class_id
+ )
+ )
+ );
+}
+
+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/Collocated/TestC.h b/TAO/tests/Bench/Collocated/TestC.h
new file mode 100644
index 00000000000..6706f5ed361
--- /dev/null
+++ b/TAO/tests/Bench/Collocated/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:57
+
+// 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/Collocated/TestC.i b/TAO/tests/Bench/Collocated/TestC.i
new file mode 100644
index 00000000000..c9bce331a27
--- /dev/null
+++ b/TAO/tests/Bench/Collocated/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/Collocated/TestS.cpp b/TAO/tests/Bench/Collocated/TestS.cpp
new file mode 100644
index 00000000000..9ea3f97d758
--- /dev/null
+++ b/TAO/tests/Bench/Collocated/TestS.cpp
@@ -0,0 +1,1168 @@
+// -*- 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/Collocated/TestS.h b/TAO/tests/Bench/Collocated/TestS.h
new file mode 100644
index 00000000000..2f4349f9188
--- /dev/null
+++ b/TAO/tests/Bench/Collocated/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/Collocated/TestS.i b/TAO/tests/Bench/Collocated/TestS.i
new file mode 100644
index 00000000000..1d2df31bd57
--- /dev/null
+++ b/TAO/tests/Bench/Collocated/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/Collocated/TestS_T.cpp b/TAO/tests/Bench/Collocated/TestS_T.cpp
new file mode 100644
index 00000000000..c5b7be758fd
--- /dev/null
+++ b/TAO/tests/Bench/Collocated/TestS_T.cpp
@@ -0,0 +1,41 @@
+// -*- 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:731
+
+#ifndef _TAO_IDL_TESTS_T_CPP_
+#define _TAO_IDL_TESTS_T_CPP_
+
+#include "TestS_T.h"
+
+#if !defined (__ACE_INLINE__)
+#include "TestS_T.i"
+#endif /* !defined INLINE */
+
+
+#endif /* ifndef */
diff --git a/TAO/tests/Bench/Collocated/TestS_T.h b/TAO/tests/Bench/Collocated/TestS_T.h
new file mode 100644
index 00000000000..fd6395dc7c4
--- /dev/null
+++ b/TAO/tests/Bench/Collocated/TestS_T.h
@@ -0,0 +1,142 @@
+// -*- 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:553
+
+#ifndef _TAO_IDL_TESTS_T_H_
+#define _TAO_IDL_TESTS_T_H_
+
+
+
+#if defined(_MSC_VER)
+#if (_MSC_VER >= 1200)
+#pragma warning(push)
+#endif /* _MSC_VER >= 1200 */
+#pragma warning(disable:4250)
+#endif /* _MSC_VER */
+
+
+// TAO_IDL - Generated from
+// be/be_visitor_root/root_sth.cpp:116
+
+#if defined (ACE_HAS_USING_KEYWORD)
+namespace POA_Test
+{
+
+ // TAO_IDL - Generated from
+ // be/be_visitor_interface/tie_sh.cpp:87
+
+ // TIE class: Refer to CORBA v2.2, Section 20.34.4
+ template <class T>
+ class Hello_tie : public Hello
+ {
+ public:
+ Hello_tie (T &t);
+ // the T& ctor
+ Hello_tie (T &t, PortableServer::POA_ptr poa);
+ // ctor taking a POA
+ Hello_tie (T *tp, CORBA::Boolean release = 1);
+ // ctor taking pointer and an ownership flag
+ Hello_tie (
+ T *tp,
+ PortableServer::POA_ptr poa,
+ CORBA::Boolean release = 1
+ );
+ // ctor with T*, ownership flag and a POA
+ ~Hello_tie (void);
+ // dtor
+
+ // TIE specific functions
+ T *_tied_object (void);
+ // return the underlying object
+ void _tied_object (T &obj);
+ // set the underlying object
+ void _tied_object (T *obj, CORBA::Boolean release = 1);
+ // set the underlying object and the ownership flag
+ CORBA::Boolean _is_owner (void);
+ // do we own it
+ void _is_owner (CORBA::Boolean b);
+ // set the ownership
+
+ // overridden ServantBase operations
+ PortableServer::POA_ptr _default_POA (
+ ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS
+ );
+
+ // TAO_IDL - Generated from
+ // be/be_visitor_operation/tie_sh.cpp:60
+
+ char * get_string (
+ ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ));
+
+ // TAO_IDL - Generated from
+ // be/be_visitor_operation/tie_sh.cpp:60
+
+ void shutdown (
+ ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ));
+
+ private:
+ T *ptr_;
+ PortableServer::POA_var poa_;
+ CORBA::Boolean rel_;
+
+ // copy and assignment are not allowed
+ Hello_tie (const Hello_tie &);
+ void operator= (const Hello_tie &);
+ };
+} // module Test
+#endif /* ACE_HAS_USING_KEYWORD */
+
+// TAO_IDL - Generated from
+// be/be_codegen.cpp:1095
+
+#if defined (__ACE_INLINE__)
+#include "TestS_T.i"
+#endif /* defined INLINE */
+
+#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
+#include "TestS_T.cpp"
+#endif /* defined REQUIRED SOURCE */
+
+#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
+#pragma implementation ("TestS_T.cpp")
+#endif /* defined REQUIRED PRAGMA */
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+#pragma warning(pop)
+#endif /* _MSC_VER */
+
+#endif /* ifndef */
diff --git a/TAO/tests/Bench/Collocated/TestS_T.i b/TAO/tests/Bench/Collocated/TestS_T.i
new file mode 100644
index 00000000000..f0da91d2887
--- /dev/null
+++ b/TAO/tests/Bench/Collocated/TestS_T.i
@@ -0,0 +1,157 @@
+// -*- 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/tie_si.cpp:96
+
+#if defined (ACE_HAS_USING_KEYWORD)
+
+template <class T> ACE_INLINE
+POA_Test::Hello_tie<T>::Hello_tie (T &t)
+ : ptr_ (&t),
+ poa_ (PortableServer::POA::_nil ()),
+ rel_ (0)
+{}
+
+template <class T> ACE_INLINE
+POA_Test::Hello_tie<T>::Hello_tie (T &t, PortableServer::POA_ptr poa)
+ : ptr_ (&t),
+ poa_ (PortableServer::POA::_duplicate (poa)),
+ rel_ (0)
+{}
+
+template <class T> ACE_INLINE
+POA_Test::Hello_tie<T>::Hello_tie (T *tp, CORBA::Boolean release)
+ : ptr_ (tp),
+ poa_ (PortableServer::POA::_nil ()),
+ rel_ (release)
+{}
+
+template <class T> ACE_INLINE
+POA_Test::Hello_tie<T>::Hello_tie (T *tp, PortableServer::POA_ptr poa, CORBA::Boolean release)
+ : ptr_ (tp),
+ poa_ (PortableServer::POA::_duplicate (poa)),
+ rel_ (release)
+{}
+
+template <class T> ACE_INLINE
+POA_Test::Hello_tie<T>::~Hello_tie (void)
+{
+ if (this->rel_)
+ {
+ delete this->ptr_;
+ }
+}
+
+template <class T> ACE_INLINE T *
+POA_Test::Hello_tie<T>::_tied_object (void)
+{
+ return this->ptr_;
+}
+
+template <class T> ACE_INLINE void
+POA_Test::Hello_tie<T>::_tied_object (T &obj)
+{
+ if (this->rel_)
+ {
+ delete this->ptr_;
+ }
+
+ this->ptr_ = &obj;
+ this->rel_ = 0;
+}
+
+template <class T> ACE_INLINE void
+POA_Test::Hello_tie<T>::_tied_object (T *obj, CORBA::Boolean release)
+{
+ if (this->rel_)
+ {
+ delete this->ptr_;
+ }
+
+ this->ptr_ = obj;
+ this->rel_ = release;
+}
+
+template <class T> ACE_INLINE CORBA::Boolean
+POA_Test::Hello_tie<T>::_is_owner (void)
+{
+ return this->rel_;
+}
+
+template <class T> ACE_INLINE void
+POA_Test::Hello_tie<T>::_is_owner (CORBA::Boolean b)
+{
+ this->rel_ = b;
+}
+
+template <class T> ACE_INLINE PortableServer::POA_ptr
+POA_Test::Hello_tie<T>::_default_POA (ACE_ENV_SINGLE_ARG_DECL)
+{
+ if (!CORBA::is_nil (this->poa_.in ()))
+ {
+ return PortableServer::POA::_duplicate (this->poa_.in ());
+ }
+
+ return this->Hello::_default_POA (ACE_ENV_SINGLE_ARG_PARAMETER);
+}
+
+// TAO_IDL - Generated from
+// be/be_visitor_operation/tie_si.cpp:68
+
+template <class T> ACE_INLINE
+char * POA_Test::Hello_tie<T>::get_string (
+ ACE_ENV_SINGLE_ARG_DECL
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ))
+{
+ return this->ptr_->get_string (
+ ACE_ENV_SINGLE_ARG_PARAMETER
+ );
+}
+
+// TAO_IDL - Generated from
+// be/be_visitor_operation/tie_si.cpp:68
+
+template <class T> ACE_INLINE
+void POA_Test::Hello_tie<T>::shutdown (
+ ACE_ENV_SINGLE_ARG_DECL
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ))
+{
+ this->ptr_->shutdown (
+ ACE_ENV_SINGLE_ARG_PARAMETER
+ );
+}
+
+#endif /* ACE_HAS_USING_KEYWORD */
+