summaryrefslogtreecommitdiff
path: root/TAO/tests/IDL_Test/anonymous.idl
blob: 19b85b0ffd80ca384eed6390409a31c0d6db4ee6 (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
// $Id$

// ============================================================================
//
// = LIBRARY
//    TAO/tests/IDL_Test
//
// = FILENAME
//    anonymous.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.
//
// ============================================================================

// Normal typedef'd sequence
module Not_Anon
{
  typedef sequence<short> short_seq;
};

// Array is typedef'd, but sequence is not
module Half_Anon
{
  typedef sequence<char> char_seq_array[14];
  typedef sequence<unsigned long, 18> bd_ulong_seq_array[17];
  typedef sequence<unsigned short> ushort_seq_array[12];
  typedef sequence<unsigned short, 7> bd_ushort_seq_array[11];
};

module All_Anon
{
  // Tests generation of unique template parameter type
  // names when identical bounded strings are used
  // repeatedly as parameters and/or return types.
  interface anon_bd_string_test
  {
    const long test_string_size = 25;

    string<test_string_size> TestFunc ();
    string<test_string_size> TestFunc2 ();
    string<test_string_size> TestFunc3 ();
    string<test_string_size> TestFunc23 ();

    void TestFunc4 (in string<test_string_size> inarg);
    void TestFunc41 (in string<test_string_size> inarg);
    void TestFunc42 (in string<test_string_size> inarg);
    void TestFunc43 (in string<test_string_size> inarg);
  };

  // Neither array nor sequence are typedef'd.
  exception Nested_Anon 
  {
    sequence<float> float_seq_array[6];
  };
};

// An anonymous string of the same bound will be found in
// another IDL file not included in this one (typedef.idl).
// The typecode for the anonymous string should not give us
// 'already found' link errors.
module Second
{
  typedef string<32> SecondString;
};