From 13d664e99b25b19192a71a0c5a1885e02121d923 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Tue, 6 Dec 2011 07:51:45 +0000 Subject: Added test from Jeff --- TAO/tests/IDL_Test/valuetype.idl | 43 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/TAO/tests/IDL_Test/valuetype.idl b/TAO/tests/IDL_Test/valuetype.idl index de7d0f56ea3..3213f6f4b03 100644 --- a/TAO/tests/IDL_Test/valuetype.idl +++ b/TAO/tests/IDL_Test/valuetype.idl @@ -1,5 +1,5 @@ +//============================================================================= -//============================================================================= /** * @file valuetype.idl * @@ -13,6 +13,7 @@ * * @author Gary Duzan Jeff Parsons */ + //============================================================================= @@ -23,6 +24,7 @@ // A valuetype factory can have exceptions, so the declaration must pull in // an #include of SystemException.h. + valuetype MyValueType { public string my_string_value; @@ -72,4 +74,43 @@ module X typedef sequence BSeq; }; +// The original problem with the construct below was probably the +// union member, but other features from the original example IDL +// have been left in just in case. +module ModSelection +{ + module SelectionDefns + { + abstract valuetype Criterion + { + void setCriterionRequiredAttributes (inout string theSelectedAttrs); + boolean isValid (in wstring theTrackSelectionAttrs); + }; + + valuetype CriterionExpr : Criterion + { + struct RightCriterionInfos + { + long theCriterionId; + CriterionExpr theRightExpr; + }; + + union RightCriterionExpr switch (boolean) + { + case TRUE: string theRightCriterionInfos; + }; + + public Criterion theLeftCriterion; + public RightCriterionExpr theRightCriterionExpr; + + factory createWithCriterionLink (in Criterion theLeftCriterion, + in string link, + in CriterionExpr theRightCriterion); + + factory createWithSingleCriterion (in Criterion theSingleCriterion); + }; + }; +}; + #endif /* IDL_TEST_VALUETYPE_IDL */ + -- cgit v1.2.1