summaryrefslogtreecommitdiff
path: root/CIAO/connectors/ami4ccm/tests/InterOutArgs/Base/InterOutArgsT.idl
blob: a116fd1b60dc04c5f9dec1d21ce57cc67df9a8a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
// $Id$

#ifndef INTEROUTARGS_T_IDL
#define INTEROUTARGS_T_IDL

#pragma ciao lem "Base/InterOutArgsTE.idl"
#pragma ciao ami4ccm interface "InterOutArgsT::MyFoo"
#pragma ciao lem "Base/InterOutArgsTAE.idl"
#pragma ciao ami4ccm idl "Base/InterOutArgsTA.idl"

module InterOutArgsT
{
  typedef short short_array[5];

  // Mixed struct
  struct TestTopic {
    string key;
    long x;
    };

  // String struct
  struct TopicString {
    string key;
    string x_str;
    };

  // Array
  struct TopicArray {
    string key;
    short_array x_array;
    };

  // Union
  union X_Union switch (short) {
    case 0:
      string x_test;
    case 1:
      long   x_long;
    };

  // Sequence
  struct test {
    short x_test;
    string x_teststr;
    };
  typedef sequence<test> test_seq;

  enum test_enum
  {
    ZERO,
    ONE,
    TWO
  };

  exception InternalError
    {
      long id;
      string error_string;
    };

  // Sender/Receiver interface
  interface MyFoo
    {
      void var_outs (in string in_str,  out string answer, out double d_cmd,
                     out long l_cmd )
        raises (InternalError);
      void var_div_outs (out TestTopic test_topic, out TopicString topic_str,
                         out TopicArray topic_arr)
        raises (InternalError);
      void var_div2_outs (out X_Union x_uni,
                          out test_seq seq)
        raises (InternalError);
      void enum_out (out test_enum out_test)
        raises (InternalError);
    };
};

#endif