xref: /aoo42x/main/idlc/test/struct.idl (revision 540d5e64)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements.  See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership.  The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License.  You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied.  See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22/* In this file the idl struct will be tested.
23  bla
24 */
25
26/// idlc defines a test module
27module idlc
28{
29
30/// test defines a test module
31module test
32{
33
34typedef sequence< long > Id;
35//struct Bla
36//{
37//	long bla;
38//};
39
40/** bla
41   BaseStruct defines an * intial struct
42 */
43struct BaseStruct
44{
45	Id Id;
46
47	/// a short  member
48	short  	m1;
49
50	/// a unsigned short  member
51	unsigned short 	m2;
52
53	/// a long member
54	long 	m3;
55
56	/// a unsigned long  member
57	unsigned long 	m4;
58
59	/// a hyper member
60	hyper 	m5;
61
62	/// a unsigned hyper  member
63	unsigned hyper 	m6;
64
65	/// a string member
66	string 	m7;
67
68	/// a byte member
69	byte	m8;
70
71	/// a type member
72	type 	m9;
73
74	/// a float member
75	float 	m10;
76
77	/// a double member
78	double 	m11;
79
80	/// a char member
81	char 	m12;
82
83	/// a boolean member
84	boolean	m13;
85
86	/// a any member
87	any 	m14;
88};
89
90interface XTestBaseTypes;
91
92typedef sequence< long > LongSeq;
93
94typedef sequence< LongSeq > LongSeqSeq;
95
96/** TestStruct deinfes a struct which inherits
97    from the base strcut type BaseStruct.
98*/
99struct TestStruct : BaseStruct
100{
101	/// a sequence< long > member
102	sequence< long > 	ms1;
103
104	/// a sequence< sequence< long > > member
105	sequence< sequence< long > > 	ms2;
106
107	/// a long array member with dimesion 5,10
108//	long			ms3[5][10];
109
110	/// a string array member with dimension 4,8
111//	long[5][10]		ms4;
112
113	/// an interface member
114	XTestBaseTypes ms5;
115
116	/// a typedef  member
117	LongSeq ms6;
118
119	/// a further typedef  member
120	LongSeqSeq ms7;
121
122	/// a sequence typedef  member
123	sequence<LongSeq> ms8;
124
125};
126
127}; };
128
129