diff options
Diffstat (limited to 'ACE/TAO/tests/IDL_Test/sequence.idl')
-rw-r--r-- | ACE/TAO/tests/IDL_Test/sequence.idl | 117 |
1 files changed, 117 insertions, 0 deletions
diff --git a/ACE/TAO/tests/IDL_Test/sequence.idl b/ACE/TAO/tests/IDL_Test/sequence.idl new file mode 100644 index 00000000000..3e5b9415ed9 --- /dev/null +++ b/ACE/TAO/tests/IDL_Test/sequence.idl @@ -0,0 +1,117 @@ +// $Id$ + +// ============================================================================ +// +// = LIBRARY +// TAO/tests/IDL_Test +// +// = FILENAME +// sequence.idl +// +// = DESCRIPTION +// This file contains examples of IDL code that has +// caused problems in the past for the TAO IDL +// compiler. This test is to make sure the problems +// stay fixed. +// +// = AUTHORS +// Jeff Parsons <parsons@cs.wustl.edu> and TAO users. +// +// ============================================================================ + +#include "tao/OctetSeq.pidl" + +struct myfoostruct; +typedef sequence<myfoostruct> myfoostructseq; + +struct myfoostruct +{ + string str_mem; + myfoostructseq rec_mem; +}; + +exception nasty +{ + string id; + myfoostruct rec_info; +}; + +// This will produce a link error if a handcraft we have added to +// tao/OctetSeqC.h is ever removed. +typedef sequence<CORBA::OctetSeq> OctetSeqSeq; + +// Bounded string elements of a sequence, +// require the use of CORBA_Any::to_char. + +interface seqTest +{ + typedef sequence< string<12> > dozens; + + void send_dozen (inout dozens bouquets); +}; + +local interface seqLocal +{ +}; + +typedef sequence<seqLocal> seqLocalSeq; + +// Anonymous sequence members must be unique types even if the +// sequence itself is not, so the member name has been +// incorported into the sequence class name. #if !defined guards +// are generated around code for the inner anonymous sequences. +struct twinStruct + { + sequence<sequence<short> > and_; + sequence<sequence<short> > or_; + }; + +// Nested sequences +typedef sequence<sequence<short, 5> > outside; + +struct nestedSeqStruct +{ + sequence<sequence<outside>, 7> inside; +}; + +// Tests deeply nested recursive type. +module Deployment +{ + struct ComponentPackageDescription; + + typedef sequence < ComponentPackageDescription > ComponentPackageDescriptions; + + struct ComponentAssemblyDescription { + ComponentPackageDescriptions instance; + }; + + typedef sequence < ComponentAssemblyDescription > ComponentAssemblyDescriptions; + + struct NamedImplementationArtifact; + + typedef sequence < NamedImplementationArtifact > NamedImplementationArtifacts; + + struct NamedImplementationArtifact { + string str; + NamedImplementationArtifacts dependsOn; + }; + + struct MonolithicImplementationDescription { + NamedImplementationArtifacts primaryArtifact; + }; + + typedef sequence < MonolithicImplementationDescription > MonolithicImplementationDescriptions; + + struct PackagedComponentImplementation { + ComponentAssemblyDescriptions assemblyImpl; + MonolithicImplementationDescriptions monolithicImpl; + }; + + typedef sequence < PackagedComponentImplementation > PackagedComponentImplementations; + + struct ComponentPackageDescription { + string str; + PackagedComponentImplementations implementation; + }; +}; + |