summaryrefslogtreecommitdiff
path: root/CIAO/connectors/ami4ccm/tests/InterInOutArgs/Base/InterInOutT.idl
blob: ca36ea71350a50d133beb18578e52d1f182aee40 (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
#ifndef INTERINOUT_T_IDL
#define INTERINOUT_T_IDL

#pragma ciao lem "Base/InterInOutTE.idl"
#pragma ciao ami4ccm interface "InterInOutT::MyFoo"
#pragma ciao lem "Base/InterInOutTAE.idl"
#pragma ciao ami4ccm idl "Base/InterInOutTA.idl"

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

#endif