summaryrefslogtreecommitdiff
path: root/modules/CIAO/tests/IDL_Test/IDL3_Plus/KitchenSink.idl
diff options
context:
space:
mode:
Diffstat (limited to 'modules/CIAO/tests/IDL_Test/IDL3_Plus/KitchenSink.idl')
-rw-r--r--modules/CIAO/tests/IDL_Test/IDL3_Plus/KitchenSink.idl292
1 files changed, 292 insertions, 0 deletions
diff --git a/modules/CIAO/tests/IDL_Test/IDL3_Plus/KitchenSink.idl b/modules/CIAO/tests/IDL_Test/IDL3_Plus/KitchenSink.idl
new file mode 100644
index 00000000000..8aff3ed46e5
--- /dev/null
+++ b/modules/CIAO/tests/IDL_Test/IDL3_Plus/KitchenSink.idl
@@ -0,0 +1,292 @@
+// $Id$
+/**
+ * @file KitchenSink.idl
+ * @author Jeff Parsons <j.parsons@vanderbilt.edu>
+ *
+ * Tests TAO_IDL generation of CIAO servant, executor IDL
+ * and executor implementation stencil for a variety of
+ * IDL3+ constructs.
+ */
+
+#include <Components.idl>
+
+#if !defined (CCM_LW)
+module mod
+{
+ valuetype future_key : Components::PrimaryKeyBase
+ {
+ public string info;
+ };
+};
+#endif
+
+interface iface
+{
+ exception iface_excep {};
+
+ void iface_op (in string inarg);
+};
+
+typedef sequence<iface> ifaceSeq;
+
+eventtype ev
+{
+};
+
+module orange
+{
+ module apple
+ {
+ eventtype Bar;
+ eventtype Bar;
+ };
+};
+
+module GlobalTyped<typename A, typename B>
+{
+ typedef short x;
+};
+
+module orange
+{
+ module apple
+ {
+ eventtype Bar
+ {
+ };
+ };
+};
+
+module A
+{
+ local interface C
+ {
+ };
+
+ module Nested<typename T, sequence <T> TSeq>
+ {
+ typedef short y;
+
+ interface XX
+ {
+ };
+
+ union Nested_Union switch (y)
+ {
+ case 2: string strmem;
+ case 0: T Tmem;
+ };
+
+ enum Nested_Enum
+ {
+ ZERO,
+ ONE,
+ TWO
+ };
+
+ // A regular module may be nested inside a template module,
+ // but another template module may not.
+ module GoodNested
+ {
+ typedef long Lo;
+ };
+/*
+ module BadNested<typename S>
+ {
+ typedef S S_Tdef;
+ };
+*/
+ };
+
+ module Nested<iface, ifaceSeq> Nested_Inst;
+};
+
+module second<exception X, typename W>
+{
+ typedef short sho;
+
+#if !defined (CCM_LW)
+ valuetype pkey : Components::PrimaryKeyBase
+ {
+ public long id_key;
+ };
+#endif
+};
+
+module B
+{
+ module second_B<typename T, sequence <T> TSeq>
+ {
+ alias A::Nested<T, TSeq> NestedA;
+
+ interface do : NestedA::XX
+ {
+ };
+ };
+};
+
+module T
+{
+ typedef unsigned long MyLongType;
+ module Typed <typename T, sequence <T> TSeq>
+ {
+ local interface X
+ {
+ void send (in MyLongType a);
+ };
+
+ porttype Y
+ {
+ uses X data;
+ };
+
+ component Z
+ {
+ port Y myport;
+ };
+ };
+};
+
+struct XX
+{
+ string YY;
+};
+
+typedef sequence <XX> XX_Seq;
+
+module T
+{
+ module ::T::Typed < ::XX, ::XX_Seq> XX;
+};
+
+module V
+{
+ component JJ : T::XX::Z
+ {
+ };
+};
+
+connector Comp3_T
+{
+ provides iface Conn_T_Port;
+};
+
+module B::second_B<iface, ifaceSeq> second_B_Inst;
+
+module Ast<typename T,
+ eventtype E,
+ exception S,
+ valuetype V,
+ sequence<T> TSeq,
+ const unsigned long M>
+{
+ interface Foo : T
+ {
+ attribute T Foo_Attr getraises (S);
+
+ void Foo_Op (inout long inoutarg,
+ in T inarg,
+ out T outarg,
+ in TSeq seq_inarg)
+ raises (S);
+ };
+
+ alias second<T, S> second_ref;
+
+ valuetype VT_T : V supports T
+ {
+ private T T_member;
+
+ factory make_VT_T ();
+
+ factory create_VT_T (in T T_arg,
+ in string str_arg)
+ raises (S);
+ };
+
+ porttype PT_T
+ {
+ provides iface iface_facet;
+ uses multiple T T_Recep;
+ };
+
+ component Comp_T
+ {
+ uses multiple T Comp_T_Recep;
+ mirrorport PT_T Comp_T_Mirror_Port;
+ provides T Comp_T_Facet;
+ emits E Comp_T_Emit;
+
+ // Tests unique lookup mechanism for types referenced
+ // from an aliased template module.
+ attribute second_ref::sho sho_attr;
+ };
+
+#if !defined (CCM_LW)
+ home Comp_T_Home manages Comp_T primarykey second_ref::pkey
+ {
+ factory create_Comp_T (in TSeq inarg);
+ finder find_Comp_T (in T inarg);
+ };
+
+ // TAO IDL compiler uses the same code for both component
+ // and home 'supports' constructs, so we test it here
+ // where there is no conflict with the port interfaces.
+ home Comp_T_Home_2 supports T manages Comp_T primarykey V
+ {
+ };
+#endif
+
+ connector Comp2_T
+ {
+ port PT_T Conn_T_Port;
+ provides T Conn_T_Facet;
+ };
+
+ connector Conn_T
+ {
+ port PT_T Conn_T_Port;
+ provides T Conn_T_Facet;
+ };
+
+ const unsigned long Ast_Const = M;
+ const unsigned long LC = 7;
+
+ typedef sequence<T, M> AnotherTSeq;
+
+ struct boo
+ {
+ T T_field;
+ Foo Foo_field;
+ };
+
+ typedef T T_array[M][Ast_Const][LC];
+};
+
+#if !defined (CCM_LW)
+module Ast<iface,
+ ev,
+ iface::iface_excep,
+ mod::future_key,
+ ifaceSeq,
+ 101>
+ Ast_Inst;
+#endif
+
+module M
+{
+ module N <typename T>
+ {
+ interface A {
+ void do_something (in T arg);
+ };
+ };
+};
+
+/*
+Support for native is there, but this results in non compiling code
+native NAT;
+module M {
+ module N <NAT> N_NAT;
+};
+*/