Accessing an array of pointers within a structure from Java with SWIG

Viewed 1197

I've something like this:

typedef struct {
    char * content;
} Boo;

typedef struct {
    Boo **data;
    int size;
} Foo;

I want to convert Boo ** data to an array with Boo elements (Boo[]) in Java with SWIG. And then to read the array (I don't want to edit,delete and create a new array from Java code). In the SWIG documentation is described how to do this with carrays.i and array_functions, but the struct's member data must be of type Boo*. Is there a solution of my problem?

EDIT: I've hurried and I've forgotten to write that I want to generate Java classes with SWIG to cooperate with C structures.

2 Answers
Related