summaryrefslogtreecommitdiff
path: root/TAO/tests/IDL_Test/interface.idl
blob: e7eb46adf477452c1314899f33f33c81a0f74818 (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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
// $Id$

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



// Used to be a problem in the get() and set() 
// generated code.

interface Base
{
  attribute long value;
};

interface Derived : Base
{
};

// The fact that the interface begins with 'foo' was causing
// problems. The IDL compiler thought the interface was in
// foo's scope.
module foo_mod
{
  struct date 
    {
	    short month;
    };
};

interface foostep
{
  foo_mod::date getDate ();
};

// Only operations or attributes should cause a clash
// in this type of situation.
interface mother
{
  struct member
    {
      long val;
    };
};

interface father
{
  struct member
    {
      short ident;
    };
};

interface child : mother, father
{
};

// Definition below in file.
interface later;

interface later_user
{
  later op (in later inarg, 
            inout later inoutarg,
            out later outarg);
};

struct later_holder
{
  later member;
};

interface later {};

// Previously, we could have found v if it
// was inherited into Client, but not in
// the case below, where it is inherited into
// somewhere other than the scope where the
// lookup starts.

interface Begin 
{
  typedef long Value;
};

interface Middle : Begin
{
};

interface End : Middle 
{
};

interface Client 
{
  attribute End::Value v;
};