summaryrefslogtreecommitdiff
path: root/CIAO/connectors/ami4ccm/tests/InterInArgs/Base/InterInArgsT.idl
blob: d39973c41e78fdbd45c2003254bf8697bb61e7d3 (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
80
81
82
83
// $Id$

#ifndef INTERINARGS_T_IDL
#define INTERINARGS_T_IDL

#pragma ciao lem "Base/InterInArgsTE.idl"
#pragma ciao ami4ccm interface "InterInArgsT::MyFoo"
#pragma ciao lem "Base/InterInArgsTAE.idl"
#pragma ciao ami4ccm idl "Base/InterInArgsTA.idl"

module InterInArgsT
{
  const short update_val = 999;

  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;
    };

  typedef TopicArray TestArray[5];

  // 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
    {
      long foo (in string in_str, in long cmd, out string answer)
        raises (InternalError);
      void var_ins (in string in_str,  out string answer, in double cmd)
        raises (InternalError);
      void var_div_ins (in TestTopic test_topic,  in TopicString topic_str,
                        in TestArray topic_arr, out string answer)
        raises (InternalError);
      void var_div2_ins (in X_Union topic_union,  in test_seq seq,
                         out string answer)
        raises (InternalError);
      void enum_in(out string answer, in test_enum in_test)
        raises (InternalError);
    };
};

#endif