Prev: 32-bit characters in Java string literals
Next: SocketHandler permissions Re: servlet/applet communication problemor Linux/Windows trouble ?
From: Roedy Green on 23 Dec 2009 11:20 On Wed, 23 Dec 2009 02:03:25 -0800 (PST), warrior <chandu.kushi(a)gmail.com> wrote, quoted or indirectly quoted someone who said : >1) how to convert c struct to java classes see http://mindprod.com/project/readc.html http://mindprod.com/project/structreaderamanuensis.html >2) How do i code the function pointers wriiten in c to java? see http://mindprod.com/jgloss/delegate.html http://mindprod.com/jgloss/callback.html -- Roedy Green Canadian Mind Products http://mindprod.com If you think it�s expensive to hire a professional to do the job, wait until you hire an amateur. ~ Red Adair (born: 1915-06-18 died: 2004-08-07 at age: 89)
From: markspace on 23 Dec 2009 12:00
warrior wrote: > 1) how to convert c struct to java classes Use a class. Consider giving it public members to mimic the accessibility of C structs, but also consider giving it private variables and public accessors and mutator methods. > 2) How do i code the function pointers wriiten in c to java? The easiest is to just use the reference to the object, which you already have. All objects in Java that you deal with are actually "pointers" (references) anyway, you have no choice but to use a "pointer." In some instances, you may wish to define an interface or use reflection. This sounds a bit advanced for you right now, I'd try the reference described above first. |