1 | // tlb2java |
2 | package com.moesol.tests.disp.com_server; |
3 | |
4 | /** |
5 | * * <code>IDL: [ helpstring(""), ]<br/> |
6 | * struct/union</code> |
7 | */ |
8 | public class TEST_FIELDS extends com.moesol.bindings.NativeStructure { |
9 | public static final Class TYPELIB = TYPELIB_E149EE62_34AE_4D0A_B9E2_3ACA3FAD59F8.class; |
10 | public static final com.moesol.bindings.platform_sdk.component_services.GUID UUID = new com.moesol.bindings.platform_sdk.component_services.GUID( |
11 | 0xc869eb5f, (short)0xc97a, (short)0x4f7b, |
12 | new byte[] { |
13 | (byte)0xb9, (byte)0x5e, |
14 | (byte)0xd9, (byte)0x1b, (byte)0x19, (byte)0x8b, (byte)0xf1, (byte)0x0c |
15 | } ); |
16 | |
17 | /** |
18 | * Create a new instance. |
19 | */ |
20 | public TEST_FIELDS() { |
21 | super(new byte[sizeof()]); |
22 | } |
23 | /** |
24 | * Create a new instance on a byte buffer. |
25 | */ |
26 | public TEST_FIELDS(java.nio.ByteBuffer bb) { |
27 | super(bb); |
28 | // set limit based on the dynamic size in byte in bb. |
29 | bb.limit(getDynamicSize()); |
30 | } |
31 | public static int sizeof() { |
32 | return 40; |
33 | } |
34 | |
35 | /** |
36 | * Represent a native array of these structures |
37 | */ |
38 | public static class Array extends com.moesol.bindings.NativeArrayOfStructs { |
39 | public Array(java.nio.ByteBuffer bb) { |
40 | super(bb); |
41 | } |
42 | public TEST_FIELDS get(int index) { |
43 | return new TEST_FIELDS(getElementSlice(index, TEST_FIELDS.sizeof())); |
44 | } |
45 | public void put(int index, TEST_FIELDS value) { |
46 | get(index).putStruct(0, TEST_FIELDS.sizeof(), value); |
47 | } |
48 | public int length() { |
49 | return _getByteBuffer().limit() / TEST_FIELDS.sizeof(); |
50 | } |
51 | public int getDynamicSize() { |
52 | return _getByteBuffer().limit(); |
53 | } |
54 | public String toString() { |
55 | StringBuffer sb = new StringBuffer(); |
56 | for (int i = 0; i < length(); i++) { |
57 | sb.append(get(i)); |
58 | } |
59 | return sb.toString(); |
60 | } |
61 | } |
62 | |
63 | |
64 | |
65 | public static final int OFFSET_m_bstr = 0; |
66 | /** |
67 | * |
68 | * @param v new m_bstr value |
69 | */ |
70 | public void set_m_bstr(String v) { |
71 | putBstr(0, v); |
72 | } |
73 | /** |
74 | * |
75 | * @return m_bstr value |
76 | */ |
77 | public String get_m_bstr() { |
78 | return getBstr(0); |
79 | } |
80 | |
81 | public static final int OFFSET_m_variant = 8; |
82 | /** |
83 | * |
84 | * @param v new m_variant value |
85 | */ |
86 | public void set_m_variant(Object v) { |
87 | putVariant(8, v); |
88 | } |
89 | /** |
90 | * |
91 | * @return m_variant value |
92 | */ |
93 | public Object get_m_variant() { |
94 | return getVariant(8); |
95 | } |
96 | |
97 | public static final int OFFSET_m_unk = 24; |
98 | /** |
99 | * |
100 | * @param v new m_unk value |
101 | */ |
102 | public void set_m_unk(com.moesol.bindings.platform_sdk.component_services.IUnknown v) { |
103 | putInterface(24, v); |
104 | } |
105 | /** |
106 | * |
107 | * @return m_unk value |
108 | */ |
109 | public com.moesol.bindings.platform_sdk.component_services.IUnknown get_m_unk() { |
110 | com.moesol.bindings.platform_sdk.component_services.IUnknown[] result = { null }; |
111 | getInterface(24, result); |
112 | return result[0]; |
113 | } |
114 | |
115 | public static final int OFFSET_m_dual = 28; |
116 | /** |
117 | * |
118 | * @param v new m_dual value |
119 | */ |
120 | public void set_m_dual(com.moesol.tests.disp.com_server.IDual v) { |
121 | putInterface(28, v); |
122 | } |
123 | /** |
124 | * |
125 | * @return m_dual value |
126 | */ |
127 | public com.moesol.tests.disp.com_server.IDual get_m_dual() { |
128 | com.moesol.tests.disp.com_server.IDual[] result = { null }; |
129 | getInterface(28, result); |
130 | return result[0]; |
131 | } |
132 | |
133 | public static final int OFFSET_m_sa_byte = 32; |
134 | private short[] /*sa*/ m_m_sa_byte; |
135 | |
136 | /** |
137 | * |
138 | * @param v new m_sa_byte value |
139 | */ |
140 | public void set_m_sa_byte(short[] /*sa*/ v) { |
141 | m_m_sa_byte = v; |
142 | } |
143 | /** |
144 | * |
145 | * @return m_sa_byte value |
146 | */ |
147 | public short[] /*sa*/ get_m_sa_byte() { |
148 | return m_m_sa_byte; |
149 | } |
150 | |
151 | public static final int OFFSET_m_sa_variant = 36; |
152 | private Object[] /*sa*/ m_m_sa_variant; |
153 | |
154 | /** |
155 | * |
156 | * @param v new m_sa_variant value |
157 | */ |
158 | public void set_m_sa_variant(Object[] /*sa*/ v) { |
159 | m_m_sa_variant = v; |
160 | } |
161 | /** |
162 | * |
163 | * @return m_sa_variant value |
164 | */ |
165 | public Object[] /*sa*/ get_m_sa_variant() { |
166 | return m_m_sa_variant; |
167 | } |
168 | |
169 | /** |
170 | * Get dynamic size in bytes. |
171 | * If this structure contains a variable size array, |
172 | * return the number of bytes needed to hold the fixed |
173 | * part and the variable sized array based on the [length_is()] |
174 | * attribute. Note that the sizeof method on returns the |
175 | * size of the fixed part plus the size of one array entry. |
176 | * |
177 | * @return dynamic size in bytes. |
178 | */ |
179 | public int getDynamicSize() { |
180 | return sizeof(); |
181 | } |
182 | |
183 | public String toString() { |
184 | StringBuffer sb = new StringBuffer(); |
185 | sb.append("\nTEST_FIELDS("); |
186 | sb.append("m_bstr("); |
187 | sb.append(get_m_bstr()); |
188 | sb.append(")"); |
189 | |
190 | sb.append("m_variant("); |
191 | sb.append(get_m_variant()); |
192 | sb.append(")"); |
193 | |
194 | sb.append("m_unk("); |
195 | sb.append(get_m_unk()); |
196 | sb.append(")"); |
197 | |
198 | sb.append("m_dual("); |
199 | sb.append(get_m_dual()); |
200 | sb.append(")"); |
201 | |
202 | sb.append("m_sa_byte("); |
203 | sb.append(get_m_sa_byte()); |
204 | sb.append(")"); |
205 | |
206 | sb.append("m_sa_variant("); |
207 | sb.append(get_m_sa_variant()); |
208 | sb.append(")"); |
209 | |
210 | sb.append(')'); |
211 | return sb.toString(); |
212 | } |
213 | |
214 | protected void finalize() { |
215 | clearRecord(); |
216 | } |
217 | } |