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_NO_UUID_STRUCT 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 | 0x00000000, (short)0x0000, (short)0x0000, |
12 | new byte[] { |
13 | (byte)0x00, (byte)0x00, |
14 | (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00 |
15 | } ); |
16 | |
17 | /** |
18 | * Create a new instance. |
19 | */ |
20 | public TEST_NO_UUID_STRUCT() { |
21 | super(new byte[sizeof()]); |
22 | } |
23 | /** |
24 | * Create a new instance on a byte buffer. |
25 | */ |
26 | public TEST_NO_UUID_STRUCT(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 2; |
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_NO_UUID_STRUCT get(int index) { |
43 | return new TEST_NO_UUID_STRUCT(getElementSlice(index, TEST_NO_UUID_STRUCT.sizeof())); |
44 | } |
45 | public void put(int index, TEST_NO_UUID_STRUCT value) { |
46 | get(index).putStruct(0, TEST_NO_UUID_STRUCT.sizeof(), value); |
47 | } |
48 | public int length() { |
49 | return _getByteBuffer().limit() / TEST_NO_UUID_STRUCT.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_short_member = 0; |
66 | /** |
67 | * |
68 | * @param v new m_short_member value |
69 | */ |
70 | public void set_m_short_member(short v) { |
71 | putShort(0, v); |
72 | } |
73 | /** |
74 | * |
75 | * @return m_short_member value |
76 | */ |
77 | public short get_m_short_member() { |
78 | return getShort(0); |
79 | } |
80 | |
81 | /** |
82 | * Get dynamic size in bytes. |
83 | * If this structure contains a variable size array, |
84 | * return the number of bytes needed to hold the fixed |
85 | * part and the variable sized array based on the [length_is()] |
86 | * attribute. Note that the sizeof method on returns the |
87 | * size of the fixed part plus the size of one array entry. |
88 | * |
89 | * @return dynamic size in bytes. |
90 | */ |
91 | public int getDynamicSize() { |
92 | return sizeof(); |
93 | } |
94 | |
95 | public String toString() { |
96 | StringBuffer sb = new StringBuffer(); |
97 | sb.append("\nTEST_NO_UUID_STRUCT("); |
98 | sb.append("m_short_member("); |
99 | sb.append(get_m_short_member()); |
100 | sb.append(")"); |
101 | |
102 | sb.append(')'); |
103 | return sb.toString(); |
104 | } |
105 | } |