summaryrefslogtreecommitdiff
path: root/TAO/Benchmark/Marshal_Test/VisiBroker
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/Benchmark/Marshal_Test/VisiBroker')
-rw-r--r--TAO/Benchmark/Marshal_Test/VisiBroker/Makefile60
-rw-r--r--TAO/Benchmark/Marshal_Test/VisiBroker/client.cpp16
-rw-r--r--TAO/Benchmark/Marshal_Test/VisiBroker/marshal.idl91
-rwxr-xr-xTAO/Benchmark/Marshal_Test/VisiBroker/run_client23
-rwxr-xr-xTAO/Benchmark/Marshal_Test/VisiBroker/run_server1
-rw-r--r--TAO/Benchmark/Marshal_Test/VisiBroker/server.cpp16
-rw-r--r--TAO/Benchmark/Marshal_Test/VisiBroker/visi_marshal_client.cpp1348
-rw-r--r--TAO/Benchmark/Marshal_Test/VisiBroker/visi_marshal_client.h142
-rw-r--r--TAO/Benchmark/Marshal_Test/VisiBroker/visi_marshal_client.i23
-rw-r--r--TAO/Benchmark/Marshal_Test/VisiBroker/visi_marshal_impl.cpp333
-rw-r--r--TAO/Benchmark/Marshal_Test/VisiBroker/visi_marshal_impl.h183
-rw-r--r--TAO/Benchmark/Marshal_Test/VisiBroker/visi_marshal_impl.i30
-rw-r--r--TAO/Benchmark/Marshal_Test/VisiBroker/visi_marshal_server.cpp90
-rw-r--r--TAO/Benchmark/Marshal_Test/VisiBroker/visi_marshal_server.h60
-rw-r--r--TAO/Benchmark/Marshal_Test/VisiBroker/visi_marshal_server.i28
15 files changed, 0 insertions, 2444 deletions
diff --git a/TAO/Benchmark/Marshal_Test/VisiBroker/Makefile b/TAO/Benchmark/Marshal_Test/VisiBroker/Makefile
deleted file mode 100644
index 83e60fa86cf..00000000000
--- a/TAO/Benchmark/Marshal_Test/VisiBroker/Makefile
+++ /dev/null
@@ -1,60 +0,0 @@
-#----------------------------------------------------------------------------
-# $Id$
-#
-# Top-level Makefile for the VisiBroker Marshal Benchmark
-#----------------------------------------------------------------------------
-
-#----------------------------------------------------------------------------
-# Local macros
-#----------------------------------------------------------------------------
-
-LDLIBS = -lACE -lbenchmark -lorb
-
-PROG_SRCS = marshalC.cpp marshalS.cpp visi_marshal_client.cpp visi_marshal_server.cpp \
- visi_marshal_impl.cpp client.cpp server.cpp
-
-LSRC = $(PROG_SRCS)
-
-MARSHAL_CLIENT_OBJS = marshalC.o visi_marshal_client.o client.o
-
-MARSHAL_SERVER_OBJS = marshalC.o marshalS.o visi_marshal_impl.o visi_marshal_server.o server.o
-
-BIN = client server
-
-ifndef TAO_ROOT
- TAO_ROOT = $(ACE_ROOT)/TAO
-endif
-
-#----------------------------------------------------------------------------
-# Include macros and targets
-#----------------------------------------------------------------------------
-
-include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU
-include $(TAO_ROOT)/rules.tao.GNU
-include $(ACE_ROOT)/include/makeinclude/macros.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.common.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.lib.GNU
-#include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.local.GNU
-# include VisiBroker specific file
-include /project/mambo/gokhale/CONFIG/orbeline_defaults.mk
-
-#----------------------------------------------------------------------------
-# Local modifications to variables imported by includes above.
-#----------------------------------------------------------------------------
-
-CPPFLAGS += -I$(TAO_ROOT) -I$(TAO_ROOT)/Benchmark -D_PMC_INCLUDE_DSI
-
-server: $(addprefix $(VDIR),$(MARSHAL_SERVER_OBJS))
- $(LINK.cc) $(LDFLAGS) -o $@ $^ $(VLDLIBS) $(POSTLINK)
-
-client: $(addprefix $(VDIR),$(MARSHAL_CLIENT_OBJS))
- $(LINK.cc) $(LDFLAGS) -o $@ $^ $(VLDLIBS) $(POSTLINK)
-
-marshalC.h marshalS.h marshalC.cpp marshalS.cpp: marshal.idl
- $(IDL) $(IDLFLAGS) $<
-
-clean:
- $(RM) core *.o *~ client server *C.cpp *S.cpp *S.h *C.h
- $(MAKE) realclean
diff --git a/TAO/Benchmark/Marshal_Test/VisiBroker/client.cpp b/TAO/Benchmark/Marshal_Test/VisiBroker/client.cpp
deleted file mode 100644
index fca289e19e4..00000000000
--- a/TAO/Benchmark/Marshal_Test/VisiBroker/client.cpp
+++ /dev/null
@@ -1,16 +0,0 @@
-// $Id$
-
-#include "benchmark/driver.h"
-#include "visi_marshal_client.h"
-
-ACE_RCSID(VisiBroker, client, "$Id$")
-
-int main (int argc, char *argv [])
-{
- // instantiate a DRIVER with the Visi_Client_Proxy as the template
- CORBA_Benchmark_Driver<Visi_Marshal_Client_Proxy> driver (new
- Visi_Marshal_Client_Proxy ());
-
- // let the driver do everything for us so that we remain very simple
- return driver.run (argc, argv);
-}
diff --git a/TAO/Benchmark/Marshal_Test/VisiBroker/marshal.idl b/TAO/Benchmark/Marshal_Test/VisiBroker/marshal.idl
deleted file mode 100644
index 077a98e58fd..00000000000
--- a/TAO/Benchmark/Marshal_Test/VisiBroker/marshal.idl
+++ /dev/null
@@ -1,91 +0,0 @@
-// $Id$
-
-// Interface for the marshal benchmark
-
-interface Marshal
-{
- struct Marshal_Struct
- {
- short s;
- long l;
- char c;
- octet o;
- double d;
- };
-
- enum discrim {e_0th, e_1st, e_2nd, e_3rd, e_4th, e_5th, e_6th};
-
- union Marshal_Union
- switch (discrim)
- {
- case e_0th:
- short s;
- case e_1st:
- long l;
- case e_2nd:
- char c;
- case e_3rd:
- octet o;
- case e_4th:
- double d;
- case e_5th:
- default: // this will test typecode indirection
- Marshal_Struct ms;
- };
-
- /*
- typedef sequence<short> ShortSeq;
- typedef sequence<long> LongSeq;
- typedef sequence<octet> OctetSeq;
- typedef sequence<char> CharSeq;
- typedef sequence<double> DoubleSeq;
- typedef sequence<Marshal_Struct> StructSeq;
- typedef sequence<Marshal_Union> UnionSeq;
- */
- // for testing sequences of Any
- typedef sequence<any> AnySeq;
-
- // testing recursive behavior
- // complex.
- struct Marshal_Recursive
- {
- // we use this to test the limited recursion allowed by IDL. This is an
- // ideal test for indirected typecodes.
-
- // simulate a behavior of a list node
- any value;
- sequence <Marshal_Recursive> next;
- };
-
- void test_short (in short s1, out short s2); // test a short
- void test_long (in long l1, out long l2); // test a long
- void test_octet (in octet o1, out octet o2); // test an octet
- void test_char (in char c1, out char c2); // test a char
- void test_double (in double d1, out double d2); // test a double
- void test_struct (in Marshal_Struct ms1, out Marshal_Struct ms2); // test a
- // struct
- void test_union (in Marshal_Union u1, out Marshal_Union u2); // test a
- // union.
- void test_any (in any a1, out any a2); // test an Any
- /*
- void test_sequence (in ShortSeq ss1, in LongSeq ls1, in OctetSeq os1, in
- CharSeq cs1, in DoubleSeq ds1, in StructSeq Ss1, in
- UnionSeq us1, in AnySeq as1,
- out ShortSeq ss2, out LongSeq ls2, out OctetSeq os2, out
- CharSeq cs2, out DoubleSeq ds2, out StructSeq Ss2, out
- UnionSeq us2, out AnySeq as2);
- */
- void test_sequence (in AnySeq as1, out AnySeq as2); // this will result in a
- // 3 level indirection -
- // sequence, any, and its
- // value type
- void test_recursive (in Marshal_Recursive mr1, out Marshal_Recursive mr2); //
- // very complicated
-};
-
-
-
-
-
-
-
diff --git a/TAO/Benchmark/Marshal_Test/VisiBroker/run_client b/TAO/Benchmark/Marshal_Test/VisiBroker/run_client
deleted file mode 100755
index 2a35700495f..00000000000
--- a/TAO/Benchmark/Marshal_Test/VisiBroker/run_client
+++ /dev/null
@@ -1,23 +0,0 @@
-echo "********* Static Invocation Interface **********"
-client -i 1 -h mambo -R s -P S -o marshal -T s
-client -i 1 -h mambo -R s -P S -o marshal -T l
-client -i 1 -h mambo -R s -P S -o marshal -T o
-client -i 1 -h mambo -R s -P S -o marshal -T c
-client -i 1 -h mambo -R s -P S -o marshal -T d
-client -i 1 -h mambo -R s -P S -o marshal -T S
-client -i 1 -h mambo -R s -P S -o marshal -T U
-client -i 1 -h mambo -R s -P S -o marshal -T A
-client -i 1 -h mambo -R s -P S -o marshal -T Q
-#client -i 1 -h mambo -R s -P S -o marshal -T R
-#
-echo "********* Dynamic Invocation Interface **********"
-client -i 1 -h mambo -R s -P D -o marshal -T s
-client -i 1 -h mambo -R s -P D -o marshal -T l
-client -i 1 -h mambo -R s -P D -o marshal -T o
-client -i 1 -h mambo -R s -P D -o marshal -T c
-client -i 1 -h mambo -R s -P D -o marshal -T d
-client -i 1 -h mambo -R s -P D -o marshal -T S
-client -i 1 -h mambo -R s -P D -o marshal -T U
-client -i 1 -h mambo -R s -P D -o marshal -T A
-client -i 1 -h mambo -R s -P D -o marshal -T Q
-
diff --git a/TAO/Benchmark/Marshal_Test/VisiBroker/run_server b/TAO/Benchmark/Marshal_Test/VisiBroker/run_server
deleted file mode 100755
index c5ff4cdc2f0..00000000000
--- a/TAO/Benchmark/Marshal_Test/VisiBroker/run_server
+++ /dev/null
@@ -1 +0,0 @@
-server -R r -P S -I V -o marshal \ No newline at end of file
diff --git a/TAO/Benchmark/Marshal_Test/VisiBroker/server.cpp b/TAO/Benchmark/Marshal_Test/VisiBroker/server.cpp
deleted file mode 100644
index edb0dd286ff..00000000000
--- a/TAO/Benchmark/Marshal_Test/VisiBroker/server.cpp
+++ /dev/null
@@ -1,16 +0,0 @@
-// $Id$
-
-#include "benchmark/driver.h"
-#include "visi_marshal_server.h"
-
-ACE_RCSID(VisiBroker, server, "$Id$")
-
-int main (int argc, char *argv [])
-{
- // instantiate a DRIVER with the Visi_Client_Proxy as the template
- CORBA_Benchmark_Driver<Visi_Marshal_Server_Proxy> driver (new
- Visi_Marshal_Server_Proxy ());
-
- // let the driver do everything for us so that we remain very simple
- return driver.run (argc, argv);
-}
diff --git a/TAO/Benchmark/Marshal_Test/VisiBroker/visi_marshal_client.cpp b/TAO/Benchmark/Marshal_Test/VisiBroker/visi_marshal_client.cpp
deleted file mode 100644
index a7719ad647a..00000000000
--- a/TAO/Benchmark/Marshal_Test/VisiBroker/visi_marshal_client.cpp
+++ /dev/null
@@ -1,1348 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// CORBA Visibroker marshal benchmark
-//
-// = FILENAME
-// visi_marshal_proxy.cpp
-//
-// = AUTHOR
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "visi_marshal_client.h"
-
-#if !defined (__ACE_INLINE__)
-#include "visi_marshal_client.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(VisiBroker, visi_marshal_client, "$Id$")
-
-int
-Visi_Marshal_Client_Proxy::run (CORBA_Marshal_Proxy::OPTIONS &options,
- CORBA_Marshal_Proxy::RESULTS &results)
-{
- char **argv;
- int argc;
- CORBA::Object_ptr target;
-
- // get the argument list to be passed on to the ORB_init method
- argv = options.orb_init_args (argc);
-
- // get the orb. Pass any ORB_init arguments
- this->orb_ = CORBA::ORB_init (argc, (char *const *)argv);
- if (this->orb_ == 0)
- {
- ACE_DEBUG ((LM_DEBUG, "ORB_init failed\n"));
- return -1;
- }
-
- // get the obj ref by binding it to the specified host using the specified obj_name
- target = Marshal::_bind (options.object_name (), options.hostname ());
- if (CORBA::is_nil (target))
- {
- ACE_DEBUG ((LM_DEBUG, "bind call failed\n"));
- return -1;
- }
-
- this->ref_ = Marshal::_narrow (target);
- if (CORBA::is_nil (this->ref_))
- {
- ACE_DEBUG ((LM_DEBUG, "narrow to Marshal failed\n"));
- return -1;
- }
-
- // tell the "results" object what file it must store the results into
- results.filename (options.filename ());
-
- // use SII or DII accordingly
- switch (options.policy ())
- {
- case CORBA_Marshal_Options::STATIC : // use SII
- return this->use_sii (options, results);
- break;
- case CORBA_Marshal_Options::DYNAMIC : // use DII
- return this->use_dii (options, results);
- break;
- default:
- ACE_DEBUG ((LM_DEBUG, "bad policy\n"));
- return -1;
- }
- // hopefully we are never here, else something is seriously wrong
- return -1;
-}
-
-int
-Visi_Marshal_Client_Proxy::use_sii (CORBA_Marshal_Proxy::OPTIONS &options,
- CORBA_Marshal_Proxy::RESULTS &results)
-{
- int i;
- int status = 0;
- // This method tests the static invocation interface
-
- for (i=0; i < options.iterations () && !status; i++)
- {
- switch (options.data_type ())
- {
- // shorts
- case CORBA_Marshal_Options::SHORT:
- status = sii_test_short (options, results);
- break;
- // longs
- case CORBA_Marshal_Options::LONG:
- status = sii_test_long (options, results);
- break;
- // octets
- case CORBA_Marshal_Options::OCTET:
- status = sii_test_octet (options, results);
- break;
- // chars
- case CORBA_Marshal_Options::CHAR:
- status = sii_test_char (options, results);
- break;
- // doubles
- case CORBA_Marshal_Options::DOUBLE:
- status = sii_test_double (options, results);
- break;
- // Structs
- case CORBA_Marshal_Options::STRUCT:
- status = sii_test_struct (options, results);
- break;
- // unions
- case CORBA_Marshal_Options::UNION:
- status = sii_test_union (options, results);
- break;
- // anys
- case CORBA_Marshal_Options::ANY:
- status = sii_test_any (options, results);
- break;
- // sequences
- case CORBA_Marshal_Options::SEQUENCE:
- status = sii_test_sequence (options, results);
- break;
- // longs
- case CORBA_Marshal_Options::RECURSIVE:
- // status = sii_test_recursive (options, results);
- // doesn't work
- break;
- default:
- status = -1;
- } // end of switch
- } // for loop
-
- if (!status)
- return 0;
- else
- return -1;
-}
-
-int
-Visi_Marshal_Client_Proxy::use_dii (CORBA_Marshal_Proxy::OPTIONS &options,
- CORBA_Marshal_Proxy::RESULTS &results)
-{
- int i;
- int status = 0;
- // This method tests the dynamic invocation interface
-
- for (i=0; i < options.iterations () && !status; i++)
- {
- switch (options.data_type ())
- {
- // shorts
- case CORBA_Marshal_Options::SHORT:
- status = dii_test_short (options, results);
- break;
- // longs
- case CORBA_Marshal_Options::LONG:
- status = dii_test_long (options, results);
- break;
- // octets
- case CORBA_Marshal_Options::OCTET:
- status = dii_test_octet (options, results);
- break;
- // chars
- case CORBA_Marshal_Options::CHAR:
- status = dii_test_char (options, results);
- break;
- // doubles
- case CORBA_Marshal_Options::DOUBLE:
- status = dii_test_double (options, results);
- break;
- // Structs
- case CORBA_Marshal_Options::STRUCT:
- status = dii_test_struct (options, results);
- break;
- // unions
- case CORBA_Marshal_Options::UNION:
- status = dii_test_union (options, results);
- break;
- // anys
- case CORBA_Marshal_Options::ANY:
- status = dii_test_any (options, results);
- break;
- // sequences
- case CORBA_Marshal_Options::SEQUENCE:
- status = dii_test_sequence (options, results);
- break;
- // longs
- case CORBA_Marshal_Options::RECURSIVE:
- // status = dii_test_recursive (options, results);
- // doesn't work
- break;
- default:
- status = -1;
- } // end of switch
- } // for loop
-
- if (!status)
- return 0;
- else
- return -1;
-}
-
-
-// all helper functions : SII
-int
-Visi_Marshal_Client_Proxy::sii_test_short (CORBA_Marshal_Proxy::OPTIONS &options,
- CORBA_Marshal_Proxy::RESULTS &results)
-{
- CORBA::Short s1, s2;
- s1 = 3;
- ref_->test_short (s1, s2);
- if (s1 == s2)
- {
- ACE_DEBUG ((LM_DEBUG, "SII test_short success: s1 = %d, s2 = %d\n", s1, s2));
- return 0;
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG, "SII test_short failed: s1 = %d, s2 = %d\n", s1, s2));
- return -1;
- }
-}
-
-int
-Visi_Marshal_Client_Proxy::sii_test_long (CORBA_Marshal_Proxy::OPTIONS &options,
- CORBA_Marshal_Proxy::RESULTS &results)
-{
- CORBA::Long l1, l2;
- l1 = 256;
- ref_->test_long (l1, l2);
- if (l1 == l2)
- {
- ACE_DEBUG ((LM_DEBUG, "SII test_long success: l1 = %d, l2 = %d\n", l1, l2));
- return 0;
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG, "SII test_long failed: l1 = %d, l2 = %d\n", l1, l2));
- return -1;
- }
-}
-
-int
-Visi_Marshal_Client_Proxy::sii_test_octet (CORBA_Marshal_Proxy::OPTIONS &options,
- CORBA_Marshal_Proxy::RESULTS &results)
- // octets
-{
- CORBA::Octet o1, o2;
- o1 = (CORBA::Octet) 127;
- ref_->test_octet (o1, o2);
- if (o1 == o2)
- {
- ACE_DEBUG ((LM_DEBUG, "SII test_octet success: o1 = %c, o2 = %c\n", o1, o2));
- return 0;
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG, "SII test_octet failed: o1 = %c, o2 = %c\n", o1, o2));
- return -1;
- }
-}
-
-int
-Visi_Marshal_Client_Proxy::sii_test_char (CORBA_Marshal_Proxy::OPTIONS &options,
- CORBA_Marshal_Proxy::RESULTS &results)
- // chars
-{
- CORBA::Char c1, c2;
- c1 = 'B';
- ref_->test_char (c1, c2);
- if (c1 == c2)
- {
- ACE_DEBUG ((LM_DEBUG, "SII test_char success: c1 = %c, c2 = %c\n", c1, c2));
- return 0;
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG, "SII test_char failed: c1 = %c, c2 = %c\n", c1, c2));
- return -1;
- }
-}
-
-int
-Visi_Marshal_Client_Proxy::sii_test_double (CORBA_Marshal_Proxy::OPTIONS &options,
- CORBA_Marshal_Proxy::RESULTS &results)
- // doubles
-{
- CORBA::Double d1, d2;
- d1 = 3.1415;
- ref_->test_double (d1, d2);
- if (d1 == d2)
- {
- ACE_DEBUG ((LM_DEBUG, "SII test_double success: d1 = %f, d2 = %f\n", d1, d2));
- return 0;
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG, "SII test_double failed: d1 = %f, d2 = %f\n", d1, d2));
- return -1;
- }
-}
-
-int
-Visi_Marshal_Client_Proxy::sii_test_struct (CORBA_Marshal_Proxy::OPTIONS &options,
- CORBA_Marshal_Proxy::RESULTS &results)
- // structs
-{
- Marshal::Marshal_Struct ms1, ms2;
-
- ms1.s = 3;
- ms1.l = 256;
- ms1.c = 'B';
- ms1.o = (CORBA::Octet) 127;
- ms1.d = 3.1415;
-
- ref_->test_struct (ms1, ms2);
- if (ms1.s == ms2.s && ms1.l == ms2.l && ms1.c == ms2.c && ms1.o == ms2.o &&
- ms1.d == ms2.d)
- {
- ACE_DEBUG ((LM_DEBUG, "SII test_struct success\n"));
- return 0;
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG, "SII test_struct failed\n"));
- return -1;
- }
-}
-
-int
-Visi_Marshal_Client_Proxy::sii_test_union (CORBA_Marshal_Proxy::OPTIONS &options,
- CORBA_Marshal_Proxy::RESULTS &results)
- // unions
-{
- Marshal::Marshal_Union u1, u2;
- Marshal::Marshal_Struct ms1, ms2;
-
-
- // first test an enumerated case
- u1._d (Marshal::e_1st);
- u1.l (4567);
-
- ref_->test_union (u1, u2);
- if ( (u1._d () == u2._d()) && (u1.l () == u2.l ()))
- {
- ACE_DEBUG ((LM_DEBUG, "SII test_union for long (case e_1st) success\n"));
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG, "SII test_union for long (case e_1st) failed\n"));
- return -1;
- }
-
- // now test the default case
- u1._d (Marshal::e_6th); // this case doesn't exist which will lead to using
- // the default case
-
- u1.ms ().s = 3;
- u1.ms ().l = 256;
- u1.ms ().c = 'B';
- u1.ms ().o = (CORBA::Octet) 127;
- u1.ms ().d = 3.1415;
-
- ref_->test_union (u1, u2);
-
- if (u1.ms ().s == u2.ms ().s && u1.ms ().l == u2.ms ().l && u1.ms ().c == u2.ms ().c && u1.ms ().o == u2.ms ().o &&
- u1.ms ().d == u2.ms ().d)
- {
- ACE_DEBUG ((LM_DEBUG, "SII test_union for default (case e_6th) success\n"));
- return 0;
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG, "SII test_union for default (case e_6th) failed\n"));
- return -1;
- }
-}
-
-int
-Visi_Marshal_Client_Proxy::sii_test_any (CORBA_Marshal_Proxy::OPTIONS &options,
- CORBA_Marshal_Proxy::RESULTS &results)
-{
- // we send a struct thru the any
- CORBA::Any a1, *a2;
- Marshal::Marshal_Struct ms1, *ms2;
-
- ms1.s = 3;
- ms1.l = 256;
- ms1.c = 'B';
- ms1.o = (CORBA::Octet) 127;
- ms1.d = 3.1415;
-
- // populate the any with a MarshalStruct
- a1 <<= ms1;
-
- a2 = new CORBA::Any;
-
- // now test it
- ref_->test_any (a1, a2);
-
- // check if the two typecodes are equal
- if (a2->type ()->equal (Marshal::_tc_Marshal_Struct))
- {
- // now see if the values are same
- ms2 = (Marshal::Marshal_Struct *)a2->value ();
- if (ms1.s == ms2->s && ms1.l == ms2->l && ms1.c == ms2->c && ms1.o == ms2->o &&
- ms1.d == ms2->d)
- {
- ACE_DEBUG ((LM_DEBUG, "SII test_any success\n"));
- return 0;
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG, "SII test_any value match failed\n"));
- return -1;
- }
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG, "SII test_any failed due to typecode mismatch\n"));
- }
- return 0;
-}
-
-int
-Visi_Marshal_Client_Proxy::sii_test_sequence (CORBA_Marshal_Proxy::OPTIONS &options,
- CORBA_Marshal_Proxy::RESULTS &results)
-{
- // make a sequence of Anys and fill each one with a different data type
- Marshal::AnySeq as1 (7), *as2;
- Marshal::Marshal_Struct ms;
- Marshal::Marshal_Union u;
-
- ms.s = 3;
- ms.l = 256;
- ms.c = 'B';
- ms.o = (CORBA::Octet) 127;
- ms.d = 3.1415;
-
- u._d (Marshal::e_5th); // somehow, the default case e_6th doesn't seem to
- // work here
- u.ms ().s = 3;
- u.ms ().l = 256;
- u.ms ().c = 'B';
- u.ms ().o = (CORBA::Octet) 127;
- u.ms ().d = 3.1415;
-
- // it looks like we must tell the sequence how many elements it is going to
- // carry. By just fixing the max value does not work.
-
- as1.length (7);
-
- as1[0] <<= (CORBA::Short)3;
- as1[1] <<= (CORBA::Long) 256;
- as1[2] <<= CORBA::Any::from_octet ((CORBA::Octet)127);
- as1[3] <<= CORBA::Any::from_char ('B');
- as1[4] <<= (CORBA::Double)3.1415; // double
- as1[5] <<= ms; // struct
- as1[6] <<= u; // union
-
- as2 = new Marshal::AnySeq;
-
- ref_->test_sequence (as1, as2);
-
-#if 0
- // the following is extremely weird. I do not understand why it is not the
- // same as _tc_Marshal_Union, but its _kind field does have _tk_union in it.
- if ((*as2)[6].type ()->equal (Marshal::_tc_Marshal_Union))
- {
- cerr << "6th elem has union typecode" << endl;
- }
- else
- {
- cerr << "6th elem doesnot have union typecode" << endl;
- cerr << "its typecode kind = " << (*as2)[6].type ()->kind () << endl;
- }
-#endif
-
- ACE_DEBUG ((LM_DEBUG, "SII test_sequence\n"));
- if (as1.length () == as2->length ())
- {
- // now make sure that the elements are same
- for (int i=0; i < as1.length (); i++)
- {
-#if 0
- if (as1[i].type ()->equal ((*as2)[i].type ()))
- {
-#endif
- // now see if the values are same
- switch (i)
- {
- case 0:
- if (*(CORBA::Short *)as1[i].value () == *(CORBA::Short
- *)(*as2)[i].value ())
- {
- ACE_DEBUG ((LM_DEBUG, "\tSII test_sequence, shorts matched\n"));
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG, "\tSII test_sequence failed on shorts match\n"));
- }
- break;
- case 1:
- if (*(CORBA::Long *)as1[i].value () == *(CORBA::Long
- *)(*as2)[i].value ())
- {
- ACE_DEBUG ((LM_DEBUG, "\tSII test_sequence, longs matched\n"));
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG, "\tSII test_sequence failed on longs match\n"));
- }
- break;
- case 2:
- if (*(CORBA::Octet *)as1[i].value () == *(CORBA::Octet
- *)(*as2)[i].value ())
- {
- ACE_DEBUG ((LM_DEBUG, "\tSII test_sequence, octets matched\n"));
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG, "\tSII test_sequence failed on octets match\n"));
- }
- break;
- case 3:
- if (*(CORBA::Char *)as1[i].value () == *(CORBA::Char
- *)(*as2)[i].value ())
- {
- ACE_DEBUG ((LM_DEBUG, "\tSII test_sequence, chars matched\n"));
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG, "\tSII test_sequence failed on chars match\n"));
- }
- break;
- case 4:
- if (*(CORBA::Double *)as1[i].value () == *(CORBA::Double
- *)(*as2)[i].value ())
- {
- ACE_DEBUG ((LM_DEBUG, "\tSII test_sequence, doubles matched\n"));
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG, "\tSII test_sequence failed on doubles match\n"));
- }
- break;
- case 5:
- {
- Marshal::Marshal_Struct *ms1, *ms2;
-
- ms1 = (Marshal::Marshal_Struct *)as1[i].value ();
- ms2 = (Marshal::Marshal_Struct *)(*as2)[i].value ();
-
- if (ms1->s == ms2->s && ms1->l == ms2->l && ms1->c == ms2->c && ms1->o == ms2->o &&
- ms1->d == ms2->d)
- {
- ACE_DEBUG ((LM_DEBUG, "\tSII test_sequence, structs matched\n"));
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG, "\tSII test_sequence failed on structs match\n"));
- }
- }
- break;
- case 6:
- {
- Marshal::Marshal_Union *u1, *u2;
-
- u1 = (Marshal::Marshal_Union *)as1[i].value ();
- u2 = (Marshal::Marshal_Union *)(*as2)[i].value ();
-
- if (u1->_d () == u2->_d () && u1->ms ().s == u2->ms ().s &&
- u1->ms ().l == u2->ms ().l &&
- u1->ms ().c == u2->ms ().c && u1->ms ().o == u2->ms ().o &&
- u1->ms ().d == u2->ms ().d)
- {
- ACE_DEBUG ((LM_DEBUG, "\tSII test_sequence, unions matched\n"));
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG, "\tSII test_sequence failed on unions match\n"));
- }
- }
- break;
- }
-#if 0
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG,
- "SII test_sequence: typecode mismatch for element %d\n", i));
- break;
- }
-#endif
- }
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG, "SII test_sequence failed: as2->length = %d\n",
- as2->length ()));
- }
- return 0;
-}
-
-int
-Visi_Marshal_Client_Proxy::sii_test_recursive (CORBA_Marshal_Proxy::OPTIONS &options,
- CORBA_Marshal_Proxy::RESULTS &results)
-{
- // we will try a simple one here
- Marshal::Marshal_Recursive mr1, *elem1, *mr2, *elem2;
-
- mr1.value <<= (CORBA::Long)1;
- mr1.next.length (1); // sequence of length 1
-
- // fill the element
- elem1 = &mr1.next[0];
- elem1->value <<= CORBA::Any::from_char ('D');
- elem1->next.length (0); // end of seq
-
- mr2 = new Marshal::Marshal_Recursive;
-
- try {
- ref_->test_recursive (mr1, mr2);
- }
- catch (CORBA::SystemException &se){
- cerr << "error invoking request: " << se << endl;
- }
-
- elem2 = &mr2->next[0];
-
- if ((*(CORBA::Long *)mr1.value.value () == *(CORBA::Long*)mr2->value.value ())
- && (mr1.next.length () == mr2->next.length ()) // same length sequence
- && (*(CORBA::Char *)elem1->value.value () == *(CORBA::Char *)elem2->value.value ())
- && (elem1->next.length () == elem2->next.length ()))
- {
- ACE_DEBUG ((LM_DEBUG, "SII test_recursive success\n"));
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG, "SII test_recursive failure\n"));
- }
-
- return 0;
-}
-
-// -------------------------------------------------------
-// all helper functions : DII
-// -------------------------------------------------------
-
-int
-Visi_Marshal_Client_Proxy::dii_test_short (CORBA_Marshal_Proxy::OPTIONS &options,
- CORBA_Marshal_Proxy::RESULTS &results)
-{
- // DII variables
- CORBA::Request_ptr request = CORBA::Request::_nil(); // DII request
- CORBA::NVList_ptr arglist = CORBA::NVList::_nil(); // argument list
- CORBA::Context_ptr ctx = CORBA::Context::_nil(); // context
- CORBA::NVList_ptr result_list = CORBA::NVList::_nil(); // result list
- CORBA::NamedValue_ptr result = CORBA::NamedValue::_nil();// actual result
- CORBA::Short s1, s2;
-
- s1 = 3;
- s2 = 0;
-
- orb_->create_list(0, arglist); // 2 arguments to be added
- *(arglist->add (CORBA::ARG_IN)->value ()) <<= s1;
- // this usage is also correct. All we care is to supply a storage area for
- // the OUT parameter
- // arglist->add (CORBA::ARG_OUT)->value ()->replace (CORBA::_tc_short, &s2);
- *(arglist->add (CORBA::ARG_OUT)->value ()) <<= s2;
- orb_->create_list(1, result_list); // 1 result
- result = result_list->item (0);
-
- // create a request
- ref_->_create_request(ctx,
- "test_short",
- arglist,
- result,
- request,
- 0);
-
- request->invoke (); // 2 way
- *(arglist->item(1)->value()) >>= s2;
-
- if (s1 == s2)
- {
- ACE_DEBUG ((LM_DEBUG, "DII test_short success: s1 = %d, s2 = %d\n", s1, s2));
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG, "DII test_short failed: s1 = %d, s2 = %d\n", s1, s2));
- }
- CORBA::release (request);
- CORBA::release (arglist);
- CORBA::release (result);
- CORBA::release (result_list);
- return 0;
-}
-
-int
-Visi_Marshal_Client_Proxy::dii_test_long (CORBA_Marshal_Proxy::OPTIONS &options,
- CORBA_Marshal_Proxy::RESULTS &results)
-{
- // DII variables
- CORBA::Request_ptr request = CORBA::Request::_nil(); // DII request
- CORBA::NVList_ptr arglist = CORBA::NVList::_nil(); // argument list
- CORBA::Context_ptr ctx = CORBA::Context::_nil(); // context
- CORBA::NVList_ptr result_list = CORBA::NVList::_nil(); // result list
- CORBA::NamedValue_ptr result = CORBA::NamedValue::_nil();// actual result
- CORBA::Long l1, l2;
-
- l1 = 256;
-
- orb_->create_list(0, arglist); // 2 arguments to be added
- *(arglist->add(CORBA::ARG_IN)->value()) <<= l1;
- arglist->add(CORBA::ARG_OUT)->value()->replace (CORBA::_tc_long, &l2);
- orb_->create_list(1, result_list); // 1 result
- result = result_list->item(0);
-
- // create a request
- ref_->_create_request(ctx,
- "test_long",
- arglist,
- result,
- request,
- 0);
-
- request->invoke (); // 2 way
- *(arglist->item(1)->value()) >>= l2;
-
- if (l1 == l2)
- {
- ACE_DEBUG ((LM_DEBUG, "DII: test_long success: l1 = %d, l2 = %d\n", l1, l2));
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG, "DII: test_long failed: l1 = %d, l2 = %d\n", l1, l2));
- }
- CORBA::release (request);
- CORBA::release (arglist);
- CORBA::release (result);
- CORBA::release (result_list);
- return 0;
-}
-
-int
-Visi_Marshal_Client_Proxy::dii_test_octet (CORBA_Marshal_Proxy::OPTIONS &options,
- CORBA_Marshal_Proxy::RESULTS &results)
- // octets
-{
- // DII variables
- CORBA::Request_ptr request = CORBA::Request::_nil(); // DII request
- CORBA::NVList_ptr arglist = CORBA::NVList::_nil(); // argument list
- CORBA::Context_ptr ctx = CORBA::Context::_nil(); // context
- CORBA::NVList_ptr result_list = CORBA::NVList::_nil(); // result list
- CORBA::NamedValue_ptr result = CORBA::NamedValue::_nil();// actual result
- CORBA::Octet o1, o2;
-
- o1 = (CORBA::Octet) 127;
-
- orb_->create_list(0, arglist); // 2 arguments to be added
- *(arglist->add(CORBA::ARG_IN)->value()) <<= CORBA::Any::from_octet (o1);
- arglist->add(CORBA::ARG_OUT)->value()->replace (CORBA::_tc_octet, &o2);
- orb_->create_list(1, result_list); // 1 result
- result = result_list->item(0);
-
- // create a request
- ref_->_create_request(ctx,
- "test_octet",
- arglist,
- result,
- request,
- 0);
-
- request->invoke (); // 2 way
- *(arglist->item(1)->value()) >>= CORBA::Any::to_octet (o2);
-
- if (o1 == o2)
- {
- ACE_DEBUG ((LM_DEBUG, "DII test_octet success: o1 = %c, o2 = %c\n", o1, o2));
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG, "DII test_octet failed: o1 = %c, o2 = %c\n", o1, o2));
- }
- CORBA::release (request);
- CORBA::release (arglist);
- CORBA::release (result);
- CORBA::release (result_list);
- return 0;
-}
-
-int
-Visi_Marshal_Client_Proxy::dii_test_char (CORBA_Marshal_Proxy::OPTIONS &options,
- CORBA_Marshal_Proxy::RESULTS &results)
- // chars
-{
- // DII variables
- CORBA::Request_ptr request = CORBA::Request::_nil(); // DII request
- CORBA::NVList_ptr arglist = CORBA::NVList::_nil(); // argument list
- CORBA::Context_ptr ctx = CORBA::Context::_nil(); // context
- CORBA::NVList_ptr result_list = CORBA::NVList::_nil(); // result list
- CORBA::NamedValue_ptr result = CORBA::NamedValue::_nil();// actual result
- CORBA::Char c1, c2;
-
- c1 = 'B';
-
- orb_->create_list(0, arglist); // 2 arguments to be added
- *(arglist->add(CORBA::ARG_IN)->value()) <<= CORBA::Any::from_char (c1);
- arglist->add(CORBA::ARG_OUT)->value()->replace (CORBA::_tc_char, &c2);
- orb_->create_list(1, result_list); // 1 result
- result = result_list->item(0);
-
- // create a request
- ref_->_create_request(ctx,
- "test_char",
- arglist,
- result,
- request,
- 0);
-
- request->invoke (); // 2 way
- *(arglist->item(1)->value()) >>= CORBA::Any::to_char (c2);
-
- if (c1 == c2)
- {
- ACE_DEBUG ((LM_DEBUG, "DII test_char success: c1 = %c, c2 = %c\n", c1, c2));
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG, "DII test_char failed: c1 = %c, c2 = %c\n", c1, c2));
- }
- CORBA::release (request);
- CORBA::release (arglist);
- CORBA::release (result);
- CORBA::release (result_list);
- return 0;
-}
-
-int
-Visi_Marshal_Client_Proxy::dii_test_double (CORBA_Marshal_Proxy::OPTIONS &options,
- CORBA_Marshal_Proxy::RESULTS &results)
- // doubles
-{
- // DII variables
- CORBA::Request_ptr request = CORBA::Request::_nil(); // DII request
- CORBA::NVList_ptr arglist = CORBA::NVList::_nil(); // argument list
- CORBA::Context_ptr ctx = CORBA::Context::_nil(); // context
- CORBA::NVList_ptr result_list = CORBA::NVList::_nil(); // result list
- CORBA::NamedValue_ptr result = CORBA::NamedValue::_nil();// actual result
- CORBA::Double d1, d2;
-
- d1 = 3.1415;
-
- orb_->create_list(0, arglist); // 2 arguments to be added
- *(arglist->add(CORBA::ARG_IN)->value()) <<= d1;
- arglist->add(CORBA::ARG_OUT)->value()->replace (CORBA::_tc_double, &d2);
- orb_->create_list(1, result_list); // 1 result
- result = result_list->item(0);
-
- // create a request
- ref_->_create_request(ctx,
- "test_double",
- arglist,
- result,
- request,
- 0);
-
- request->invoke (); // 2 way
- *(arglist->item(1)->value()) >>= d2;
-
- if (d1 == d2)
- {
- ACE_DEBUG ((LM_DEBUG, "DII test_double success: d1 = %f, d2 = %f\n", d1, d2));
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG, "DII test_double failed: d1 = %f, d2 = %f\n", d1, d2));
- }
- CORBA::release (request);
- CORBA::release (arglist);
- CORBA::release (result);
- CORBA::release (result_list);
- return 0;
-}
-
-int
-Visi_Marshal_Client_Proxy::dii_test_struct (CORBA_Marshal_Proxy::OPTIONS &options,
- CORBA_Marshal_Proxy::RESULTS &results)
- // structs
-{
- // DII variables
- CORBA::Request_ptr request = CORBA::Request::_nil(); // DII request
- CORBA::NVList_ptr arglist = CORBA::NVList::_nil(); // argument list
- CORBA::Context_ptr ctx = CORBA::Context::_nil(); // context
- CORBA::NVList_ptr result_list = CORBA::NVList::_nil(); // result list
- CORBA::NamedValue_ptr result = CORBA::NamedValue::_nil();// actual result
- Marshal::Marshal_Struct ms1, ms2;
-
- ms1.s = 3;
- ms1.l = 256;
- ms1.c = 'B';
- ms1.o = (CORBA::Octet) 127;
- ms1.d = 3.1415;
-
- orb_->create_list(0, arglist); // 2 arguments to be added
- *(arglist->add(CORBA::ARG_IN)->value()) <<= ms1;
- arglist->add(CORBA::ARG_OUT)->value()->replace (Marshal::_tc_Marshal_Struct, &ms2);
- orb_->create_list(1, result_list); // 1 result
- result = result_list->item(0);
-
- // create a request
- ref_->_create_request(ctx,
- "test_struct",
- arglist,
- result,
- request,
- 0);
-
- request->invoke (); // 2 way
- *(arglist->item(1)->value()) >>= ms2;
-
- if (ms1.s == ms2.s && ms1.l == ms2.l && ms1.c == ms2.c && ms1.o == ms2.o &&
- ms1.d == ms2.d)
- {
- ACE_DEBUG ((LM_DEBUG, "DII test_struct success\n"));
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG, "DII test_struct failed\n"));
- }
- CORBA::release (request);
- CORBA::release (arglist);
- CORBA::release (result);
- CORBA::release (result_list);
- return 0;
-}
-
-int
-Visi_Marshal_Client_Proxy::dii_test_union (CORBA_Marshal_Proxy::OPTIONS &options,
- CORBA_Marshal_Proxy::RESULTS &results)
- // unions
-{
- // DII variables
- CORBA::Request_ptr request = CORBA::Request::_nil(); // DII request
- CORBA::NVList_ptr arglist = CORBA::NVList::_nil(); // argument list
- CORBA::Context_ptr ctx = CORBA::Context::_nil(); // context
- CORBA::NVList_ptr result_list = CORBA::NVList::_nil(); // result list
- CORBA::NamedValue_ptr result = CORBA::NamedValue::_nil();// actual result
- Marshal::Marshal_Union u1, u2;
- Marshal::Marshal_Struct ms1, ms2;
-
-
- // first test an enumerated case
- u1._d (Marshal::e_1st);
- u1.l (4567);
-
- orb_->create_list(0, arglist); // 2 arguments to be added
- *(arglist->add(CORBA::ARG_IN)->value()) <<= u1;
- arglist->add(CORBA::ARG_OUT)->value()->replace (Marshal::_tc_Marshal_Union, &u2);
- orb_->create_list(1, result_list); // 1 result
- result = result_list->item(0);
-
- // create a request
- ref_->_create_request(ctx,
- "test_union",
- arglist,
- result,
- request,
- 0);
-
- request->invoke (); // 2 way
- *(arglist->item(1)->value()) >>= u2;
-
- if ( (u1._d () == u2._d()) && (u1.l () == u2.l ()))
- {
- ACE_DEBUG ((LM_DEBUG, "DII test_union for long (case e_1st) success\n"));
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG, "DII test_union for long (case e_1st) failed\n"));
- }
- CORBA::release (request);
- CORBA::release (arglist);
- CORBA::release (result);
- CORBA::release (result_list);
-
- // now test the default case
- u1._d (Marshal::e_5th); // e_6th doesn't work
-
- u1.ms ().s = 3;
- u1.ms ().l = 256;
- u1.ms ().c = 'B';
- u1.ms ().o = (CORBA::Octet) 127;
- u1.ms ().d = 3.1415;
-
-
- orb_->create_list(0, arglist); // 2 arguments to be added
- *(arglist->add(CORBA::ARG_IN)->value()) <<= u1;
- arglist->add(CORBA::ARG_OUT)->value()->replace (Marshal::_tc_Marshal_Union, &u2);
- orb_->create_list(1, result_list); // 1 result
- result = result_list->item(0);
-
- // create a request
- ref_->_create_request(ctx,
- "test_union",
- arglist,
- result,
- request,
- 0);
-
- request->invoke (); // 2 way
- *(arglist->item(1)->value()) >>= u2;
-
- if (u1.ms ().s == u2.ms ().s && u1.ms ().l == u2.ms ().l && u1.ms ().c == u2.ms ().c && u1.ms ().o == u2.ms ().o &&
- u1.ms ().d == u2.ms ().d)
- {
- ACE_DEBUG ((LM_DEBUG, "DII test_union for default (case e_6th) success\n"));
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG, "DII test_union for default (case e_6th) failed\n"));
- }
- CORBA::release (request);
- CORBA::release (arglist);
- CORBA::release (result);
- CORBA::release (result_list);
- return 0;
-}
-
-int
-Visi_Marshal_Client_Proxy::dii_test_any (CORBA_Marshal_Proxy::OPTIONS &options,
- CORBA_Marshal_Proxy::RESULTS &results)
-{
- // DII variables
- CORBA::Request_ptr request = CORBA::Request::_nil(); // DII request
- CORBA::NVList_ptr arglist = CORBA::NVList::_nil(); // argument list
- CORBA::Context_ptr ctx = CORBA::Context::_nil(); // context
- CORBA::NVList_ptr result_list = CORBA::NVList::_nil(); // result list
- CORBA::NamedValue_ptr result = CORBA::NamedValue::_nil();// actual result
- // we send a struct thru the any
- CORBA::Any a1, *a2;
- Marshal::Marshal_Struct ms1, *ms2;
-
- ms1.s = 3;
- ms1.l = 256;
- ms1.c = 'B';
- ms1.o = (CORBA::Octet) 127;
- ms1.d = 3.1415;
-
- // populate the any with a MarshalStruct
- a1 <<= ms1;
-
- a2 = new CORBA::Any;
-
- // now test it
- orb_->create_list(0, arglist); // 2 arguments to be added
- *(arglist->add(CORBA::ARG_IN)->value()) <<= a1;
- arglist->add(CORBA::ARG_OUT)->value()->replace (CORBA::_tc_any, a2);
- orb_->create_list(1, result_list); // 1 result
- result = result_list->item(0);
-
- // create a request
- ref_->_create_request(ctx,
- "test_any",
- arglist,
- result,
- request,
- 0);
-
- request->invoke (); // 2 way
- *(arglist->item(1)->value()) >>= (*a2);
-
- // check if the two typecodes are equal
- if (a2->type ()->equal (Marshal::_tc_Marshal_Struct))
- {
- // now see if the values are same
- ms2 = (Marshal::Marshal_Struct *)a2->value ();
- if (ms1.s == ms2->s && ms1.l == ms2->l && ms1.c == ms2->c && ms1.o == ms2->o &&
- ms1.d == ms2->d)
- {
- ACE_DEBUG ((LM_DEBUG, "DII test_any success\n"));
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG, "DII test_any value match failed\n"));
- }
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG, "DII test_any failed due to typecode mismatch\n"));
- }
- CORBA::release (request);
- CORBA::release (arglist);
- CORBA::release (result);
- CORBA::release (result_list);
- return 0;
-}
-
-int
-Visi_Marshal_Client_Proxy::dii_test_sequence (CORBA_Marshal_Proxy::OPTIONS &options,
- CORBA_Marshal_Proxy::RESULTS &results)
-{
- // DII variables
- CORBA::Request_ptr request = CORBA::Request::_nil(); // DII request
- CORBA::NVList_ptr arglist = CORBA::NVList::_nil(); // argument list
- CORBA::Context_ptr ctx = CORBA::Context::_nil(); // context
- CORBA::NVList_ptr result_list = CORBA::NVList::_nil(); // result list
- CORBA::NamedValue_ptr result = CORBA::NamedValue::_nil();// actual result
- // make a sequence of Anys and fill each one with a different data type
- Marshal::AnySeq as1 (7), *as2;
- Marshal::Marshal_Struct ms;
- Marshal::Marshal_Union u;
-
- ms.s = 3;
- ms.l = 256;
- ms.c = 'B';
- ms.o = (CORBA::Octet) 127;
- ms.d = 3.1415;
-
- u._d (Marshal::e_5th); // somehow, the default case e_6th doesn't seem to
- // work here
- u.ms ().s = 3;
- u.ms ().l = 256;
- u.ms ().c = 'B';
- u.ms ().o = (CORBA::Octet) 127;
- u.ms ().d = 3.1415;
-
- // it looks like we must tell the sequence how many elements it is going to
- // carry. By just fixing the max value does not work.
-
- as1.length (7);
-
- as1[0] <<= (CORBA::Short)3;
- as1[1] <<= (CORBA::Long) 256;
- as1[2] <<= CORBA::Any::from_octet ((CORBA::Octet)127);
- as1[3] <<= CORBA::Any::from_char ('B');
- as1[4] <<= (CORBA::Double)3.1415; // double
- as1[5] <<= ms; // struct
- as1[6] <<= u; // union
-
- as2 = new Marshal::AnySeq;
-
- orb_->create_list(0, arglist); // 2 arguments to be added
- *(arglist->add(CORBA::ARG_IN)->value()) <<= as1;
- arglist->add(CORBA::ARG_OUT)->value()->replace (Marshal::_tc_AnySeq, as2);
- orb_->create_list(1, result_list); // 1 result
- result = result_list->item(0);
-
- // create a request
- ref_->_create_request(ctx,
- "test_sequence",
- arglist,
- result,
- request,
- 0);
-
- request->invoke (); // 2 way
- *(arglist->item(1)->value()) >>= (*as2);
-
-#if 0
- // the following is extremely weird. I do not understand why it is not the
- // same as _tc_Marshal_Union, but its _kind field does have _tk_union in it.
- if ((*as2)[6].type ()->equal (Marshal::_tc_Marshal_Union))
- {
- cerr << "6th elem has union typecode" << endl;
- }
- else
- {
- cerr << "6th elem doesnot have union typecode" << endl;
- cerr << "its typecode kind = " << (*as2)[6].type ()->kind () << endl;
- }
-#endif
-
- ACE_DEBUG ((LM_DEBUG, "DII test_sequence\n"));
- if (as1.length () == as2->length ())
- {
- // now make sure that the elements are same
- for (int i=0; i < as1.length (); i++)
- {
-#if 0
- if (as1[i].type ()->equal ((*as2)[i].type ()))
- {
-#endif
- // now see if the values are same
- switch (i)
- {
- case 0:
- if (*(CORBA::Short *)as1[i].value () == *(CORBA::Short
- *)(*as2)[i].value ())
- {
- ACE_DEBUG ((LM_DEBUG, "\tDII test_sequence, shorts matched\n"));
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG, "\tDII test_sequence failed on shorts match\n"));
- }
- break;
- case 1:
- if (*(CORBA::Long *)as1[i].value () == *(CORBA::Long
- *)(*as2)[i].value ())
- {
- ACE_DEBUG ((LM_DEBUG, "\tDII test_sequence, longs matched\n"));
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG, "\tDII test_sequence failed on longs match\n"));
- }
- break;
- case 2:
- if (*(CORBA::Octet *)as1[i].value () == *(CORBA::Octet
- *)(*as2)[i].value ())
- {
- ACE_DEBUG ((LM_DEBUG, "\tDII test_sequence, octets matched\n"));
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG, "\tDII test_sequence failed on octets match\n"));
- }
- break;
- case 3:
- if (*(CORBA::Char *)as1[i].value () == *(CORBA::Char
- *)(*as2)[i].value ())
- {
- ACE_DEBUG ((LM_DEBUG, "\tDII test_sequence, chars matched\n"));
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG, "\tDII test_sequence failed on chars match\n"));
- }
- break;
- case 4:
- if (*(CORBA::Double *)as1[i].value () == *(CORBA::Double
- *)(*as2)[i].value ())
- {
- ACE_DEBUG ((LM_DEBUG, "\tDII test_sequence, doubles matched\n"));
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG, "\tDII test_sequence failed on doubles match\n"));
- }
- break;
- case 5:
- {
- Marshal::Marshal_Struct *ms1, *ms2;
-
- ms1 = (Marshal::Marshal_Struct *)as1[i].value ();
- ms2 = (Marshal::Marshal_Struct *)(*as2)[i].value ();
-
- if (ms1->s == ms2->s && ms1->l == ms2->l && ms1->c == ms2->c && ms1->o == ms2->o &&
- ms1->d == ms2->d)
- {
- ACE_DEBUG ((LM_DEBUG, "\tDII test_sequence, structs matched\n"));
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG, "\tDII test_sequence failed on structs match\n"));
- }
- }
- break;
- case 6:
- {
- Marshal::Marshal_Union *u1, *u2;
-
- u1 = (Marshal::Marshal_Union *)as1[i].value ();
- u2 = (Marshal::Marshal_Union *)(*as2)[i].value ();
-
- if (u1->_d () == u2->_d () && u1->ms ().s == u2->ms ().s &&
- u1->ms ().l == u2->ms ().l &&
- u1->ms ().c == u2->ms ().c && u1->ms ().o == u2->ms ().o &&
- u1->ms ().d == u2->ms ().d)
- {
- ACE_DEBUG ((LM_DEBUG, "\tDII test_sequence, unions matched\n"));
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG, "\tDII test_sequence failed on unions match\n"));
- }
- }
- break;
- }
-#if 0
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG,
- "DII test_sequence: typecode mismatch for element %d\n", i));
- break;
- }
-#endif
- }
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG, "DII test_sequence failed: as2->length = %d\n",
- as2->length ()));
- }
- CORBA::release (request);
- CORBA::release (arglist);
- CORBA::release (result);
- CORBA::release (result_list);
- return 0;
-}
-
-int
-Visi_Marshal_Client_Proxy::dii_test_recursive (CORBA_Marshal_Proxy::OPTIONS &options,
- CORBA_Marshal_Proxy::RESULTS &results)
-{
- // we will try a simple one here
- Marshal::Marshal_Recursive mr1, *elem1, *mr2, *elem2;
-
- mr1.value <<= (CORBA::Long)1;
- mr1.next.length (1); // sequence of length 1
-
- // fill the element
- elem1 = &mr1.next[0];
- elem1->value <<= CORBA::Any::from_char ('D');
- elem1->next.length (0); // end of seq
-
- mr2 = new Marshal::Marshal_Recursive;
-
- try {
- ref_->test_recursive (mr1, mr2);
- }
- catch (CORBA::SystemException &se){
- cerr << "error invoking request: " << se << endl;
- }
-
- elem2 = &mr2->next[0];
-
- if ((*(CORBA::Long *)mr1.value.value () == *(CORBA::Long*)mr2->value.value ())
- && (mr1.next.length () == mr2->next.length ()) // same length sequence
- && (*(CORBA::Char *)elem1->value.value () == *(CORBA::Char *)elem2->value.value ())
- && (elem1->next.length () == elem2->next.length ()))
- {
- ACE_DEBUG ((LM_DEBUG, "DII test_recursive success\n"));
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG, "DII test_recursive failure\n"));
- }
-
- return 0;
-}
-
diff --git a/TAO/Benchmark/Marshal_Test/VisiBroker/visi_marshal_client.h b/TAO/Benchmark/Marshal_Test/VisiBroker/visi_marshal_client.h
deleted file mode 100644
index 30e14db39a6..00000000000
--- a/TAO/Benchmark/Marshal_Test/VisiBroker/visi_marshal_client.h
+++ /dev/null
@@ -1,142 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// CORBA Marshal Visibroker Benchmark
-//
-// = FILENAME
-// visi_marshal_client.h
-//
-// = AUTHOR
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#ifndef _VISI_MARSHAL_CLIENT_H_
-#define _VISI_MARSHAL_CLIENT_H_
-
-// benchmark library includes
-#include "benchmark/marshal_options.h"
-#include "benchmark/marshal_results.h"
-#include "benchmark/marshal_proxy.h"
-
-// include VisiBroker specific include files
-#include "marshalC.h" // generated by IDL compiler
-#include "pmcext.h" // VisiBroker extensions
-
-#if 0
-// Define an event handler specific to this class
-class marshal_event_handler: public PMC_EXT::ClientEventHandler
-{
- // =TITLE
- // marshal_event_handler
- // =DESCRIPTION
- // event handler. Specifically, we use this to set socket buffer and no delay
- // flags
-public:
- void bind_succeeded(CORBA::Object_ptr obj,
- const PMC_EXT::ConnectionInfo &);
- // on success from a bind call, set the desired quantities
-};
-#endif
-
-class Visi_Marshal_Client_Proxy : public CORBA_Marshal_Proxy
-{
- // =TITLE
- // Visi_Marshal_Client_Proxy
- // =DESCRIPTION
- // VisiBroker client size specialization of the CORBA Marshal proxy class
-public:
- Visi_Marshal_Client_Proxy (void);
- // constructor
-
- ~Visi_Marshal_Client_Proxy (void);
- // destructor
-
- virtual int run (CORBA_Marshal_Proxy::OPTIONS &options,
- CORBA_Marshal_Proxy::RESULTS &results);
- // do the actual work
-
- virtual int use_sii (CORBA_Marshal_Proxy::OPTIONS &options,
- CORBA_Marshal_Proxy::RESULTS &results);
- // use the static invocation interface
-
- virtual int use_dii (CORBA_Marshal_Proxy::OPTIONS &options,
- CORBA_Marshal_Proxy::RESULTS &results);
- // use the dynamic invocation interface
-private:
- // =helper functions
- int sii_test_short (CORBA_Marshal_Proxy::OPTIONS &options,
- CORBA_Marshal_Proxy::RESULTS &results);
-
- int sii_test_long (CORBA_Marshal_Proxy::OPTIONS &options,
- CORBA_Marshal_Proxy::RESULTS &results);
-
- int sii_test_octet (CORBA_Marshal_Proxy::OPTIONS &options,
- CORBA_Marshal_Proxy::RESULTS &results);
-
- int sii_test_char (CORBA_Marshal_Proxy::OPTIONS &options,
- CORBA_Marshal_Proxy::RESULTS &results);
-
- int sii_test_double (CORBA_Marshal_Proxy::OPTIONS &options,
- CORBA_Marshal_Proxy::RESULTS &results);
-
- int sii_test_struct (CORBA_Marshal_Proxy::OPTIONS &options,
- CORBA_Marshal_Proxy::RESULTS &results);
-
- int sii_test_union (CORBA_Marshal_Proxy::OPTIONS &options,
- CORBA_Marshal_Proxy::RESULTS &results);
-
- int sii_test_any (CORBA_Marshal_Proxy::OPTIONS &options,
- CORBA_Marshal_Proxy::RESULTS &results);
-
- int sii_test_sequence (CORBA_Marshal_Proxy::OPTIONS &options,
- CORBA_Marshal_Proxy::RESULTS &results);
-
- int sii_test_recursive (CORBA_Marshal_Proxy::OPTIONS &options,
- CORBA_Marshal_Proxy::RESULTS &results);
-
- // all the DII helpers
- int dii_test_short (CORBA_Marshal_Proxy::OPTIONS &options,
- CORBA_Marshal_Proxy::RESULTS &results);
-
- int dii_test_long (CORBA_Marshal_Proxy::OPTIONS &options,
- CORBA_Marshal_Proxy::RESULTS &results);
-
- int dii_test_octet (CORBA_Marshal_Proxy::OPTIONS &options,
- CORBA_Marshal_Proxy::RESULTS &results);
-
- int dii_test_char (CORBA_Marshal_Proxy::OPTIONS &options,
- CORBA_Marshal_Proxy::RESULTS &results);
-
- int dii_test_double (CORBA_Marshal_Proxy::OPTIONS &options,
- CORBA_Marshal_Proxy::RESULTS &results);
-
- int dii_test_struct (CORBA_Marshal_Proxy::OPTIONS &options,
- CORBA_Marshal_Proxy::RESULTS &results);
-
- int dii_test_union (CORBA_Marshal_Proxy::OPTIONS &options,
- CORBA_Marshal_Proxy::RESULTS &results);
-
- int dii_test_any (CORBA_Marshal_Proxy::OPTIONS &options,
- CORBA_Marshal_Proxy::RESULTS &results);
-
- int dii_test_sequence (CORBA_Marshal_Proxy::OPTIONS &options,
- CORBA_Marshal_Proxy::RESULTS &results);
-
- int dii_test_recursive (CORBA_Marshal_Proxy::OPTIONS &options,
- CORBA_Marshal_Proxy::RESULTS &results);
-
- CORBA::ORB_ptr orb_;
- // handle to the underlying orb
-
- Marshal_ptr ref_;
- // the object reference
-};
-
-#if defined (__ACE_INLINE__)
-#include "visi_marshal_client.i"
-#endif /* __ACE_INLINE__ */
-
-#endif
diff --git a/TAO/Benchmark/Marshal_Test/VisiBroker/visi_marshal_client.i b/TAO/Benchmark/Marshal_Test/VisiBroker/visi_marshal_client.i
deleted file mode 100644
index 30c73abb503..00000000000
--- a/TAO/Benchmark/Marshal_Test/VisiBroker/visi_marshal_client.i
+++ /dev/null
@@ -1,23 +0,0 @@
-// $Id$
-
-
-ACE_INLINE
-Visi_Marshal_Client_Proxy::Visi_Marshal_Client_Proxy (void)
- : orb_ (CORBA_ORB::_nil ()),
- ref_ (0)
-{
-}
-
-ACE_INLINE
-Visi_Marshal_Client_Proxy::~Visi_Marshal_Client_Proxy (void)
-{
- // releasing order is important
-
- // release the reference
- CORBA::release (ref_);
-
- // release the ORB
- CORBA::release (orb_);
-}
-
-
diff --git a/TAO/Benchmark/Marshal_Test/VisiBroker/visi_marshal_impl.cpp b/TAO/Benchmark/Marshal_Test/VisiBroker/visi_marshal_impl.cpp
deleted file mode 100644
index d9425e9c4b3..00000000000
--- a/TAO/Benchmark/Marshal_Test/VisiBroker/visi_marshal_impl.cpp
+++ /dev/null
@@ -1,333 +0,0 @@
-// $Id$
-
-#include "visi_marshal_impl.h"
-
-#if !defined (__ACE_INLINE__)
-#include "visi_marshal_impl.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(VisiBroker, visi_marshal_impl, "$Id$")
-
-// All the methods of the SSI class
-void
-Marshal_SSI_Impl::test_short (CORBA::Short s1,
- CORBA::Short &s2)
-{
- s2 = s1;
-}
-
-void
-Marshal_SSI_Impl::test_long (CORBA::Long l1,
- CORBA::Long &l2)
-{
- l2 = l1;
-}
-
-void
-Marshal_SSI_Impl::test_octet (CORBA::Octet o1,
- CORBA::Octet &o2)
-{
- o2 = o1;
-}
-
-void
-Marshal_SSI_Impl::test_char (CORBA::Char c1,
- CORBA::Char &c2)
-{
- c2 = c1;
-}
-
-void
-Marshal_SSI_Impl::test_double (CORBA::Double d1,
- CORBA::Double &d2)
-{
- d2 = d1;
-}
-
-void
-Marshal_SSI_Impl::test_struct (const Marshal::Marshal_Struct& ms1,
- Marshal::Marshal_Struct& ms2)
-{
- ms2.s = ms1.s;
- ms2.l = ms1.l;
- ms2.c = ms1.c;
- ms2.o = ms1.o;
- ms2.d = ms1.d;
-}
-
-void
-Marshal_SSI_Impl::test_union (const Marshal::Marshal_Union& u1,
- Marshal::Marshal_Union& u2)
-{
- u2._d (u1._d ()); // set the discriminant value
-
- switch (u1._d ())
- {
- case Marshal::e_0th:
- u2.s (u1.s ()); // set short
- break;
- case Marshal::e_1st:
- u2.l (u1.l ()); // set long
- break;
- case Marshal::e_2nd:
- u2.c (u1.c ()); // set char
- break;
- case Marshal::e_3rd:
- u2.o (u1.o ()); // set octet
- break;
- case Marshal::e_4th:
- u2.d (u1.d ()); // set double
- break;
- case Marshal::e_5th:
- default:
- u2.ms (u1. ms ()); // set structs
- break;
- }
-}
-
-void
-Marshal_SSI_Impl::test_any (const CORBA::Any &a1,
- CORBA::Any *&a2)
-{
- a2 = new CORBA::Any (a1.type (), (void *)a1.value ()); // will do a deep copy
-}
-
-void
-Marshal_SSI_Impl::test_sequence (const Marshal::AnySeq& as1,
- Marshal::AnySeq *& as2)
-{
- as2 = new Marshal::AnySeq (as1);
-}
-
-void
-Marshal_SSI_Impl::test_recursive (const Marshal::Marshal_Recursive &mr1,
- Marshal::Marshal_Recursive *&mr2)
-{
-}
-
-//----------------------------------------------------------------------------
-//the methods of the DSI implementation class
-
-void
-Marshal_DSI_Impl::invoke (CORBA::ServerRequest_ptr req)
-{
- // parse the incoming request and find out for what operation it is. We use a
- // simple linear search here
- if (!ACE_OS::strcmp (req->op_name (), "test_short"))
- {
- test_short_skel (req);
- }
- else if (!ACE_OS::strcmp (req->op_name (), "test_long"))
- {
- }
- else if (!ACE_OS::strcmp (req->op_name (), "test_octet"))
- {
- }
- else if (!ACE_OS::strcmp (req->op_name (), "test_char"))
- {
- }
- else if (!ACE_OS::strcmp (req->op_name (), "test_double"))
- {
- }
- else if (!ACE_OS::strcmp (req->op_name (), "test_struct"))
- {
- }
- else if (!ACE_OS::strcmp (req->op_name (), "test_union"))
- {
- }
- else if (!ACE_OS::strcmp (req->op_name (), "test_any"))
- {
- }
- else if (!ACE_OS::strcmp (req->op_name (), "test_sequence"))
- {
- }
-}
-
-void
-Marshal_DSI_Impl::test_short (CORBA::Short s1,
- CORBA::Short &s2)
-{
- s2 = 5*s1;
-}
-
-void
-Marshal_DSI_Impl::test_long (CORBA::Long l1,
- CORBA::Long &l2)
-{
- l2 = l1;
-}
-
-void
-Marshal_DSI_Impl::test_octet (CORBA::Octet o1,
- CORBA::Octet &o2)
-{
- o2 = o1;
-}
-
-void
-Marshal_DSI_Impl::test_char (CORBA::Char c1,
- CORBA::Char &c2)
-{
- c2 = c1;
-}
-
-void
-Marshal_DSI_Impl::test_double (CORBA::Double d1,
- CORBA::Double &d2)
-{
- d2 = d1;
-}
-
-void
-Marshal_DSI_Impl::test_struct (const Marshal::Marshal_Struct& ms1,
- Marshal::Marshal_Struct& ms2)
-{
- ms2.s = ms1.s;
- ms2.l = ms1.l;
- ms2.c = ms1.c;
- ms2.o = ms1.o;
- ms2.d = ms1.d;
-}
-
-void
-Marshal_DSI_Impl::test_union (const Marshal::Marshal_Union& u1,
- Marshal::Marshal_Union& u2)
-{
- u2._d (u1._d ()); // set the discriminant value
-
- switch (u1._d ())
- {
- case Marshal::e_0th:
- u2.s (u1.s ()); // set short
- break;
- case Marshal::e_1st:
- u2.l (u1.l ()); // set long
- break;
- case Marshal::e_2nd:
- u2.c (u1.c ()); // set char
- break;
- case Marshal::e_3rd:
- u2.o (u1.o ()); // set octet
- break;
- case Marshal::e_4th:
- u2.d (u1.d ()); // set double
- break;
- case Marshal::e_5th:
- default:
- u2.ms (u1. ms ()); // set structs
- break;
- }
-}
-
-void
-Marshal_DSI_Impl::test_any (const CORBA::Any &a1,
- CORBA::Any *&a2)
-{
- a2 = new CORBA::Any (a1.type (), (void *)a1.value ()); // will do a deep copy
-}
-
-void
-Marshal_DSI_Impl::test_sequence (const Marshal::AnySeq& as1,
- Marshal::AnySeq *& as2)
-{
- as2 = new Marshal::AnySeq (as1);
-}
-
-void
-Marshal_DSI_Impl::test_recursive (const Marshal::Marshal_Recursive &mr1,
- Marshal::Marshal_Recursive *&mr2)
-{
-}
-
-// all the helper functions for the DSI class
-void
-Marshal_DSI_Impl::test_short_skel (CORBA::ServerRequest_ptr req)
-{
- CORBA::NVList_var short_nv_;
- CORBA::Any *any_s1, *any_s2;
- CORBA::Short s1=0,
- *s2=0;
-
- orb_->create_list (0, short_nv_);
-
- ACE_DEBUG ((LM_DEBUG, "short_nv_ created with %d nodes\n", short_nv_->count ()));
-
- any_s1 = new CORBA::Any (CORBA::_tc_short, &s1, 0);
- s2 = new CORBA::Short;
- any_s2 = new CORBA::Any (CORBA::_tc_short, s2, 1);
-
- short_nv_->add_value ("s1", *any_s1, CORBA::ARG_IN);
- // if I do the next line, I get CORBA::Marshal exception from
- // req->params. I don't know why
- short_nv_->add_value ("s2", *any_s2, CORBA::ARG_OUT);
- // However, the following line works. I think I know what is the
- // problem. Since the 2nd argument is a ARG_OUT, we cannot add_value. We must
- // just tell it what type to expect and leave it to the ORB to allocate the
- // memory
- //short_nv_->add_item ("s2", CORBA::ARG_OUT);
- // My explanation is confirmed if I use the following in which case I get a
- // marshaling exception. Thus, for OUT args, only add_item works.
- // *(short_nv_->add (CORBA::ARG_OUT)->value ()) <<= s2;
-
- ACE_DEBUG ((LM_DEBUG, "short_nv_ created with %d nodes\n", short_nv_->count ()));
-
- try {
- req->params (short_nv_);
- }
- catch (CORBA::SystemException &se)
- {
- cerr << "System Exception doing params: " << se << endl;
- }
- cout << "after params" << endl;
- *(short_nv_->item (0)->value ()) >>= s1;
- ACE_DEBUG ((LM_DEBUG, "s1 = %d\n", s1));
- test_short (s1, *s2);
- // *(short_nv_->item (1)->value ()) <<= s2;
- ACE_DEBUG ((LM_DEBUG, "s1 = %d, s2 = %d\n", s1, *s2));
- ACE_DEBUG ((LM_DEBUG, "short_nv_ after the call has %d nodes\n", short_nv_->count ()));
-}
-
-void
-Marshal_DSI_Impl::test_long_skel (CORBA::ServerRequest_ptr req)
-{
-}
-
-void
-Marshal_DSI_Impl::test_octet_skel (CORBA::ServerRequest_ptr req)
-{
-}
-
-void
-Marshal_DSI_Impl::test_char_skel (CORBA::ServerRequest_ptr req)
-{
-}
-
-void
-Marshal_DSI_Impl::test_double_skel (CORBA::ServerRequest_ptr req)
-{
-}
-
-void
-Marshal_DSI_Impl::test_struct_skel (CORBA::ServerRequest_ptr req)
-{
-}
-
-void
-Marshal_DSI_Impl::test_union_skel (CORBA::ServerRequest_ptr req)
-{
-}
-
-void
-Marshal_DSI_Impl::test_any_skel (CORBA::ServerRequest_ptr req)
-{
-}
-
-void
-Marshal_DSI_Impl::test_sequence_skel (CORBA::ServerRequest_ptr req)
-{
-}
-
-void
-Marshal_DSI_Impl::test_recursive_skel (CORBA::ServerRequest_ptr req)
-{
-}
diff --git a/TAO/Benchmark/Marshal_Test/VisiBroker/visi_marshal_impl.h b/TAO/Benchmark/Marshal_Test/VisiBroker/visi_marshal_impl.h
deleted file mode 100644
index 6599c5ae276..00000000000
--- a/TAO/Benchmark/Marshal_Test/VisiBroker/visi_marshal_impl.h
+++ /dev/null
@@ -1,183 +0,0 @@
-// $Id$
-
-#ifndef VISI_MARSHAL_IMPL_H
-#define VISI_MARSHAL_IMPL_H
-
-// to include DSI related files
-
-#include "ace/OS.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "marshalS.h"
-
-
-class Marshal_SSI_Impl
- : public virtual _sk_Marshal
-{
- // =TITLE
- // Marshal_SSI_Impl
- // =DESCRIPTION
- // Implementation of the interface using the static skeleton interface
-public:
- Marshal_SSI_Impl (const char *object_name = (const char *)NULL);
- // constructor
-
- ~Marshal_SSI_Impl (void);
- // destructor
-
- virtual void test_short (CORBA::Short s1,
- CORBA::Short& s2);
- // test short
-
- virtual void test_long (CORBA::Long l1,
- CORBA::Long& l2);
- // test long
-
- virtual void test_octet (CORBA::Octet o1,
- CORBA::Octet& o2);
- // test octet
-
- virtual void test_char (CORBA::Char c1,
- CORBA::Char& c2);
- // test char
-
- virtual void test_double (CORBA::Double d1,
- CORBA::Double& d2);
- // test double
-
- virtual void test_struct (const Marshal::Marshal_Struct& ms1,
- Marshal::Marshal_Struct& ms2);
- // test struct
-
- virtual void test_union (const Marshal::Marshal_Union& u1,
- Marshal::Marshal_Union& u2);
- // test union
-
- virtual void test_any (const CORBA::Any& a1,
- CORBA::Any *& a2);
- // test any
-
- /*
- virtual void test_sequence (const Marshal::ShortSeq& s1,
- const Marshal::LongSeq& l1,
- const Marshal::OctetSeq& o1,
- const Marshal::CharSeq& c1,
- const Marshal::DoubleSeq& d1,
- const Marshal::StructSeq& S1,
- const Marshal::UnionSeq& U1,
- const Marshal::AnySeq& a1,
- Marshal::ShortSeq *& s2,
- Marshal::LongSeq *& l2,
- Marshal::OctetSeq *& o2,
- Marshal::CharSeq *& c2,
- Marshal::DoubleSeq *& d2,
- Marshal::StructSeq *& S2,
- Marshal::UnionSeq *& U2,
- Marshal::AnySeq *& a2);
- */
- virtual void test_sequence (const Marshal::AnySeq& a1,
- Marshal::AnySeq *& a2);
- // test sequence
-
- virtual void test_recursive (const Marshal::Marshal_Recursive& mr1,
- Marshal::Marshal_Recursive *& mr2);
- // test struct
-
-};
-
-class Marshal_DSI_Impl : public CORBA::DynamicImplementation
-{
- // =TITLE
- // Marshal_DSI_Impl
- // =DESCRIPTION
- // Implementation of the interface using the dynamic skeleton interface
-public:
- Marshal_DSI_Impl (CORBA::ORB_ptr orb, const char *object_name = (const char *)NULL);
- // constructor
-
- ~Marshal_DSI_Impl (void);
- // destructor
-
- virtual void invoke (CORBA::ServerRequest_ptr req);
- // This method is a must
-
-private:
- void test_short (CORBA::Short s1,
- CORBA::Short& s2);
- // test short
-
- void test_long (CORBA::Long l1,
- CORBA::Long& l2);
- // test long
-
- void test_octet (CORBA::Octet o1,
- CORBA::Octet& o2);
- // test octet
-
- void test_char (CORBA::Char c1,
- CORBA::Char& c2);
- // test char
-
- void test_double (CORBA::Double d1,
- CORBA::Double& d2);
- // test double
-
- void test_struct (const Marshal::Marshal_Struct& ms1,
- Marshal::Marshal_Struct& ms2);
- // test struct
-
- void test_union (const Marshal::Marshal_Union& u1,
- Marshal::Marshal_Union& u2);
- // test union
-
- void test_any (const CORBA::Any& a1,
- CORBA::Any *& a2);
- // test any
-
- void test_sequence (const Marshal::AnySeq& a1,
- Marshal::AnySeq *& a2);
- // test sequence
-
- void test_recursive (const Marshal::Marshal_Recursive& mr1,
- Marshal::Marshal_Recursive *& mr2);
- // test struct
-
-private:
- //= helper functions - they behave as if they were skeletons
- void test_short_skel (CORBA::ServerRequest_ptr req);
- void test_long_skel (CORBA::ServerRequest_ptr req);
- void test_octet_skel (CORBA::ServerRequest_ptr req);
- void test_char_skel (CORBA::ServerRequest_ptr req);
- void test_double_skel (CORBA::ServerRequest_ptr req);
- void test_struct_skel (CORBA::ServerRequest_ptr req);
- void test_union_skel (CORBA::ServerRequest_ptr req);
- void test_any_skel (CORBA::ServerRequest_ptr req);
- void test_sequence_skel (CORBA::ServerRequest_ptr req);
- void test_recursive_skel (CORBA::ServerRequest_ptr req);
-
- // we need the orb to create argument lists (NVList) for us
- CORBA::ORB_ptr orb_; // not owned by us
-
-#if 0
- CORBA::NVList_ptr short_nv_;
- CORBA::NVList_ptr long_nv_;
- CORBA::NVList_ptr octet_nv_;
- CORBA::NVList_ptr char_nv_;
- CORBA::NVList_ptr double_nv_;
- CORBA::NVList_ptr struct_nv_;
- CORBA::NVList_ptr union_nv_;
- CORBA::NVList_ptr any_nv_;
- CORBA::NVList_ptr seq_nv_;
- CORBA::NVList_ptr recursive_nv_;
- CORBA::Any_ptr result_; // void result
-#endif
-};
-
-#if defined (__ACE_INLINE__)
-#include "visi_marshal_impl.i"
-#endif /* __ACE_INLINE__ */
-
-#endif // defined (VISI_MARSHAL_IMPL_H)
diff --git a/TAO/Benchmark/Marshal_Test/VisiBroker/visi_marshal_impl.i b/TAO/Benchmark/Marshal_Test/VisiBroker/visi_marshal_impl.i
deleted file mode 100644
index 7e9405f734b..00000000000
--- a/TAO/Benchmark/Marshal_Test/VisiBroker/visi_marshal_impl.i
+++ /dev/null
@@ -1,30 +0,0 @@
-// $Id$
-
-// constructor
-ACE_INLINE
-Marshal_SSI_Impl::Marshal_SSI_Impl (const char *obj_name)
- : _sk_Marshal (obj_name)
-{
-}
-
-// destructor
-ACE_INLINE
-Marshal_SSI_Impl::~Marshal_SSI_Impl (void)
-{
-}
-
-// constructor
-ACE_INLINE
-Marshal_DSI_Impl::Marshal_DSI_Impl (CORBA::ORB_ptr orb, const char *obj_name)
- : orb_ (orb),
- CORBA::DynamicImplementation ("Marshal", obj_name) // interface name is necessary
-{
-}
-
-// destructor
-ACE_INLINE
-Marshal_DSI_Impl::~Marshal_DSI_Impl (void)
-{
- orb_ = CORBA::ORB::_nil ();
-}
-
diff --git a/TAO/Benchmark/Marshal_Test/VisiBroker/visi_marshal_server.cpp b/TAO/Benchmark/Marshal_Test/VisiBroker/visi_marshal_server.cpp
deleted file mode 100644
index def599b3a02..00000000000
--- a/TAO/Benchmark/Marshal_Test/VisiBroker/visi_marshal_server.cpp
+++ /dev/null
@@ -1,90 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// CORBA Visibroker marshal benchmark
-//
-// = FILENAME
-// visi_marshal_server.cpp
-//
-// = AUTHOR
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "visi_marshal_server.h"
-
-#if !defined (__ACE_INLINE__)
-#include "visi_marshal_server.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(VisiBroker, visi_marshal_server, "$Id$")
-
-int
-Visi_Marshal_Server_Proxy::run (CORBA_Marshal_Proxy::OPTIONS &options,
- CORBA_Marshal_Proxy::RESULTS &results)
-{
- char **argv;
- int argc;
-
- // get the argument list to be passed on to the ORB_init method
- argv = options.orb_init_args (argc);
-
- // get the orb. Pass any ORB_init arguments
- this->orb_ = CORBA::ORB_init (argc, (char *const *)argv);
- if (this->orb_ == 0)
- {
- ACE_DEBUG ((LM_DEBUG, "ORB_init failed\n"));
- return -1;
- }
-
- // get the argument list to be passed on to the BOA_init method
- argv = options.orb_init_args (argc);
-
- // get the orb. Pass any ORB_init arguments
- this->boa_ = this->orb_->BOA_init (argc, (char *const *)argv);
- if (this->boa_ == 0)
- {
- ACE_DEBUG ((LM_DEBUG, "ORB_init failed\n"));
- return -1;
- }
-
- // tell the "results" object what file it must store the results into
- results.filename (options.filename ());
-
- // use SII or DII accordingly
- switch (options.policy ())
- {
- case CORBA_Marshal_Options::STATIC : // use SSI
- this->ssi_ = new Marshal_SSI_Impl (options.object_name ());
- // register with the BOA
- this->boa_->obj_is_ready (this->ssi_);
- break;
- case CORBA_Marshal_Options::DYNAMIC : // use DSI
- this->dsi_ = new Marshal_DSI_Impl (this->orb_, ACE_OS::strdup (options.object_name ()));
- // register with the BOA
- try {
- this->boa_->obj_is_ready (this->dsi_);
- }
- catch (CORBA::SystemException &se)
- {
- cerr << "system exception in obj_is_ready" << se << endl;
- }
- break;
- default:
- ACE_DEBUG ((LM_DEBUG, "bad policy\n"));
- return -1;
- }
-
- try {
- // call impl_is_ready
- this->boa_->impl_is_ready ();
- }
- catch (CORBA::SystemException &se)
- {
- cerr << "system exception: " << se << endl;
- }
- return 0;
-}
-
diff --git a/TAO/Benchmark/Marshal_Test/VisiBroker/visi_marshal_server.h b/TAO/Benchmark/Marshal_Test/VisiBroker/visi_marshal_server.h
deleted file mode 100644
index d18feb277ea..00000000000
--- a/TAO/Benchmark/Marshal_Test/VisiBroker/visi_marshal_server.h
+++ /dev/null
@@ -1,60 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// CORBA Marshal Visibroker Benchmark
-//
-// = FILENAME
-// visi_marshal_server.h
-//
-// = AUTHOR
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#ifndef _VISI_MARSHAL_SERVER_H_
-#define _VISI_MARSHAL_SERVER_H_
-
-// benchmark library includes
-#include "benchmark/marshal_options.h"
-#include "benchmark/marshal_results.h"
-#include "benchmark/marshal_proxy.h"
-
-// implementation classes
-#include "visi_marshal_impl.h"
-
-// include VisiBroker specific include files
-#include "marshalS.h" // generated by IDL compiler
-#include "pmcext.h" // VisiBroker extensions
-
-class Visi_Marshal_Server_Proxy : public CORBA_Marshal_Proxy
-{
-public:
- Visi_Marshal_Server_Proxy (void);
- // constructor
-
- ~Visi_Marshal_Server_Proxy (void);
- // destructor
-
- virtual int run (CORBA_Marshal_Proxy::OPTIONS &options,
- CORBA_Marshal_Proxy::RESULTS &results);
- // do the actual work
-private:
- CORBA::ORB_ptr orb_;
- // underlying orb;
-
- CORBA::BOA_ptr boa_;
- // underlying boa;
-
- Marshal_SSI_Impl *ssi_;
- Marshal_DSI_Impl *dsi_;
- // the implementation (SSI or DSI)
-};
-
-
-#if defined (__ACE_INLINE__)
-#include "visi_marshal_server.i"
-#endif /* __ACE_INLINE__ */
-
-#endif
diff --git a/TAO/Benchmark/Marshal_Test/VisiBroker/visi_marshal_server.i b/TAO/Benchmark/Marshal_Test/VisiBroker/visi_marshal_server.i
deleted file mode 100644
index d43226e0f57..00000000000
--- a/TAO/Benchmark/Marshal_Test/VisiBroker/visi_marshal_server.i
+++ /dev/null
@@ -1,28 +0,0 @@
-// $Id$
-
-// constructor
-ACE_INLINE
-Visi_Marshal_Server_Proxy::Visi_Marshal_Server_Proxy (void)
- : orb_ (0),
- boa_ (0),
- ssi_ (0),
- dsi_ (0)
-{
-}
-
-// destructor
-ACE_INLINE
-Visi_Marshal_Server_Proxy::~Visi_Marshal_Server_Proxy (void)
-{
- // releasing order is important
-
- // release the impl
- delete ssi_;
- delete dsi_;
-
- // release the BOA
- CORBA::release (boa_);
-
- // release the ORB
- CORBA::release (orb_);
-}