1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package com.ochafik.lang.jnaerator.runtime;
20
21 import com.sun.jna.Pointer;
22 import com.sun.jna.PointerType;
23 import com.sun.jna.WString;
24
25 @Deprecated
26 public class WStringPointer extends Structure<WStringPointer, WStringPointer.ByValue, WStringPointer.ByReference> {
27 public WString value;
28 public String toString() {
29 return value.toString();
30 }
31
32 public WStringPointer() {}
33 public WStringPointer(PointerType p) {
34 this(p.getPointer(), 0);
35 }
36 public WStringPointer(Pointer p) {
37 this(p, 0);
38 }
39 public WStringPointer(Pointer p, int offset) {
40 useMemory(p, offset);
41 read();
42 }
43 public WStringPointer(WString value) {
44 super();
45 this.value = value;
46 }
47 public WStringPointer(String value) {
48 super();
49 this.value = new WString(value);
50 }
51 public static class ByValue extends WStringPointer implements com.sun.jna.Structure.ByValue {}
52 public static class ByReference extends WStringPointer implements com.sun.jna.Structure.ByReference {}
53 @Override
54 protected ByReference newByReference() {
55 return new ByReference();
56 }
57 @Override
58 protected ByValue newByValue() {
59 return new ByValue();
60 }
61 @Override
62 protected WStringPointer newInstance() {
63 return new WStringPointer();
64 }
65 }