xref: /trunk/main/idlc/test/struct.idl (revision cdf0e10c)
1*cdf0e10cSrcweir/* In this file the idl struct will be tested.
2*cdf0e10cSrcweir  bla
3*cdf0e10cSrcweir */
4*cdf0e10cSrcweir
5*cdf0e10cSrcweir/// idlc defines a test module
6*cdf0e10cSrcweirmodule idlc
7*cdf0e10cSrcweir{
8*cdf0e10cSrcweir
9*cdf0e10cSrcweir/// test defines a test module
10*cdf0e10cSrcweirmodule test
11*cdf0e10cSrcweir{
12*cdf0e10cSrcweir
13*cdf0e10cSrcweirtypedef sequence< long > Id;
14*cdf0e10cSrcweir//struct Bla
15*cdf0e10cSrcweir//{
16*cdf0e10cSrcweir//	long bla;
17*cdf0e10cSrcweir//};
18*cdf0e10cSrcweir
19*cdf0e10cSrcweir/** bla
20*cdf0e10cSrcweir   BaseStruct defines an * intial struct
21*cdf0e10cSrcweir */
22*cdf0e10cSrcweirstruct BaseStruct
23*cdf0e10cSrcweir{
24*cdf0e10cSrcweir	Id Id;
25*cdf0e10cSrcweir
26*cdf0e10cSrcweir	/// a short  member
27*cdf0e10cSrcweir	short  	m1;
28*cdf0e10cSrcweir
29*cdf0e10cSrcweir	/// a unsigned short  member
30*cdf0e10cSrcweir	unsigned short 	m2;
31*cdf0e10cSrcweir
32*cdf0e10cSrcweir	/// a long member
33*cdf0e10cSrcweir	long 	m3;
34*cdf0e10cSrcweir
35*cdf0e10cSrcweir	/// a unsigned long  member
36*cdf0e10cSrcweir	unsigned long 	m4;
37*cdf0e10cSrcweir
38*cdf0e10cSrcweir	/// a hyper member
39*cdf0e10cSrcweir	hyper 	m5;
40*cdf0e10cSrcweir
41*cdf0e10cSrcweir	/// a unsigned hyper  member
42*cdf0e10cSrcweir	unsigned hyper 	m6;
43*cdf0e10cSrcweir
44*cdf0e10cSrcweir	/// a string member
45*cdf0e10cSrcweir	string 	m7;
46*cdf0e10cSrcweir
47*cdf0e10cSrcweir	/// a byte member
48*cdf0e10cSrcweir	byte	m8;
49*cdf0e10cSrcweir
50*cdf0e10cSrcweir	/// a type member
51*cdf0e10cSrcweir	type 	m9;
52*cdf0e10cSrcweir
53*cdf0e10cSrcweir	/// a float member
54*cdf0e10cSrcweir	float 	m10;
55*cdf0e10cSrcweir
56*cdf0e10cSrcweir	/// a double member
57*cdf0e10cSrcweir	double 	m11;
58*cdf0e10cSrcweir
59*cdf0e10cSrcweir	/// a char member
60*cdf0e10cSrcweir	char 	m12;
61*cdf0e10cSrcweir
62*cdf0e10cSrcweir	/// a boolean member
63*cdf0e10cSrcweir	boolean	m13;
64*cdf0e10cSrcweir
65*cdf0e10cSrcweir	/// a any member
66*cdf0e10cSrcweir	any 	m14;
67*cdf0e10cSrcweir};
68*cdf0e10cSrcweir
69*cdf0e10cSrcweirinterface XTestBaseTypes;
70*cdf0e10cSrcweir
71*cdf0e10cSrcweirtypedef sequence< long > LongSeq;
72*cdf0e10cSrcweir
73*cdf0e10cSrcweirtypedef sequence< LongSeq > LongSeqSeq;
74*cdf0e10cSrcweir
75*cdf0e10cSrcweir/** TestStruct deinfes a struct which inherits
76*cdf0e10cSrcweir    from the base strcut type BaseStruct.
77*cdf0e10cSrcweir*/
78*cdf0e10cSrcweirstruct TestStruct : BaseStruct
79*cdf0e10cSrcweir{
80*cdf0e10cSrcweir	/// a sequence< long > member
81*cdf0e10cSrcweir	sequence< long > 	ms1;
82*cdf0e10cSrcweir
83*cdf0e10cSrcweir	/// a sequence< sequence< long > > member
84*cdf0e10cSrcweir	sequence< sequence< long > > 	ms2;
85*cdf0e10cSrcweir
86*cdf0e10cSrcweir	/// a long array member with dimesion 5,10
87*cdf0e10cSrcweir//	long			ms3[5][10];
88*cdf0e10cSrcweir
89*cdf0e10cSrcweir	/// a string array member with dimension 4,8
90*cdf0e10cSrcweir//	long[5][10]		ms4;
91*cdf0e10cSrcweir
92*cdf0e10cSrcweir	/// an interface member
93*cdf0e10cSrcweir	XTestBaseTypes ms5;
94*cdf0e10cSrcweir
95*cdf0e10cSrcweir	/// a typedef  member
96*cdf0e10cSrcweir	LongSeq ms6;
97*cdf0e10cSrcweir
98*cdf0e10cSrcweir	/// a further typedef  member
99*cdf0e10cSrcweir	LongSeqSeq ms7;
100*cdf0e10cSrcweir
101*cdf0e10cSrcweir	/// a sequence typedef  member
102*cdf0e10cSrcweir	sequence<LongSeq> ms8;
103*cdf0e10cSrcweir
104*cdf0e10cSrcweir};
105*cdf0e10cSrcweir
106*cdf0e10cSrcweir}; };
107*cdf0e10cSrcweir
108