[Swig-user] Hide SWIG Generated Getter/Setter in Java class and Replace with Custom Getter Code

80 views
Skip to first unread message

colin gray

unread,
Mar 22, 2012, 6:09:59 PM3/22/12
to swig...@lists.sourceforge.net
Hello, 

I have the below C struct that has a nested structure (sender_id_t) that I've been unable to find a way to map correctly as it contains non ASCII characters and it gets jumbled up on the Java side. Is there a way to hide the SWIG generated getter and setter method for Sample.java and add a custom getter method for the struct that calls another wrapped function?

Sample.java

getId(){
//call another wrapped function here
}

SWIG.i (pseudo code)

%module Test
%rename (Sample) sample_t_;
typedef struct sample_t_ {
  sender_id_t id;

} sample_t;
Thanks!
Reply all
Reply to author
Forward
0 new messages