Closed ivangfr closed 9 years ago
Hi,
I have a C struct like:
typedef struct type_MyStruct { int iMeasure; int position[3]; } MyStruct;
When I generate the java class I get something like:
public class MyStruct extends StructObject { ... @Field(0) public int iMeasure() { ... } @Field(0) public MyStruct iMeasure(int iMeasure) { ... } @Array({3}) @Field(1) public Pointer<Integer> position() { ... } ... }
As you can see I don't have a method set for position like:
@Field(1) public MyStruct position(Pointer<Integer> position) { ... }
So, how can I set values for this array of 3 positions? For example:
MyStruct myStruct = new MyStruct(); myStruct.iMeasure(10); ??? myStruct.position()
Thanks
Hi @ivangfr,
Thanks for using BridJ! You can set items of position with myStruct.position().set(index, value).
myStruct.position().set(index, value)
Cheers
Hi,
I have a C struct like:
When I generate the java class I get something like:
As you can see I don't have a method set for position like:
So, how can I set values for this array of 3 positions? For example:
Thanks