diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2007-02-21 08:28:35 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2007-02-21 08:28:35 +0000 |
commit | b42fa641dd02d0539afb361395ff21ff12b34c6c (patch) | |
tree | 22fdc0fa75a7628d0f7500dfee5d38749a50b5a2 | |
parent | a5abdf3f00c98781286e26864c465103b2b12409 (diff) | |
download | ATCD-b42fa641dd02d0539afb361395ff21ff12b34c6c.tar.gz |
Wed Feb 21 08:28:12 UTC 2007 Johnny Willemsen <jwillemsen@remedy.nl>
-rw-r--r-- | TAO/ChangeLog | 9 | ||||
-rw-r--r-- | TAO/tests/Any/Recursive/Test.idl | 35 | ||||
-rw-r--r-- | TAO/tests/Any/Recursive/client.cpp | 9 | ||||
-rw-r--r-- | TAO/tests/Hello/server.cpp | 11 |
4 files changed, 53 insertions, 11 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index 84f516c1598..1d09c8a53cf 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,12 @@ +Wed Feb 21 08:28:12 UTC 2007 Johnny Willemsen <jwillemsen@remedy.nl> + + * tests/Any/Recursive/client.cpp: + * tests/Any/Recursive/Test.idl: + Added another test case + + * tests/Hello/server.cpp: + Layout change + Wed Feb 21 08:24:12 UTC 2007 Johnny Willemsen <jwillemsen@remedy.nl> * docs/tutorials/Quoter/Simple/Server/index.html: diff --git a/TAO/tests/Any/Recursive/Test.idl b/TAO/tests/Any/Recursive/Test.idl index 6e7b741b178..8c104735d17 100644 --- a/TAO/tests/Any/Recursive/Test.idl +++ b/TAO/tests/Any/Recursive/Test.idl @@ -3,6 +3,7 @@ // #include "tao/OctetSeq.pidl" +#include "tao/StringSeq.pidl" /// Put the interfaces in a module, to avoid global namespace pollution module Test @@ -133,19 +134,45 @@ module Test OctetSeq octet_seq_val; }; + enum ValueSort3 { + DOUBLE_TYPE, + SYMBOL_TYPE, + SYMBOL_SEQ_TYPE + }; + + typedef sequence<string> StringSeq; + + struct Symbol3; + typedef sequence<Symbol3> SymbolSeq3; + + struct Symbol3 { + StringSeq scope; + string name; + SymbolSeq3 args; + }; + + union NonRecursiveUnionWithStringStruct3 switch (ValueSort3) { + case DOUBLE_TYPE: + double double_val; + case SYMBOL_TYPE: + Symbol3 symbol_val; + case SYMBOL_SEQ_TYPE: + SymbolSeq3 symbol_seq_val; + }; + // -------------------------- enum ValueSort2 { - SYMBOL_TYPE + SYMBOL_TYPE2 }; - struct Symbol { + struct Symbol2 { string name; }; union NonRecursiveUnionWithStringStruct switch (ValueSort2) { - case SYMBOL_TYPE: - Symbol symbol_val; + case SYMBOL_TYPE2: + Symbol2 symbol_val; }; /// Simple test interface. diff --git a/TAO/tests/Any/Recursive/client.cpp b/TAO/tests/Any/Recursive/client.cpp index 9e571162331..5a16241ac3a 100644 --- a/TAO/tests/Any/Recursive/client.cpp +++ b/TAO/tests/Any/Recursive/client.cpp @@ -267,6 +267,15 @@ recursive_union_test (CORBA::ORB_ptr /* orb */, the_any <<= val2; ::perform_invocation<Test::NonRecursiveUnionWithStringStruct> (hello, the_any); + + // new variant + Test::NonRecursiveUnionWithStringStruct3 val3; + Test::Symbol3 sym; + val3.double_val (5.0); + the_any <<= val3; + + ::perform_invocation<Test::NonRecursiveUnionWithStringStruct3> (hello, + the_any); } diff --git a/TAO/tests/Hello/server.cpp b/TAO/tests/Hello/server.cpp index 8b9c64e5d68..b09955c1ea2 100644 --- a/TAO/tests/Hello/server.cpp +++ b/TAO/tests/Hello/server.cpp @@ -55,23 +55,20 @@ main (int argc, char *argv[]) " (%P|%t) Panic: nil RootPOA\n"), 1); - PortableServer::POAManager_var poa_manager = - root_poa->the_POAManager (); + PortableServer::POAManager_var poa_manager = root_poa->the_POAManager (); if (parse_args (argc, argv) != 0) return 1; - Hello *hello_impl; + Hello *hello_impl = 0; ACE_NEW_RETURN (hello_impl, Hello (orb.in ()), 1); PortableServer::ServantBase_var owner_transfer(hello_impl); - Test::Hello_var hello = - hello_impl->_this (); + Test::Hello_var hello = hello_impl->_this (); - CORBA::String_var ior = - orb->object_to_string (hello.in ()); + CORBA::String_var ior = orb->object_to_string (hello.in ()); // Output the IOR to the <ior_output_file> FILE *output_file= ACE_OS::fopen (ior_output_file, "w"); |