On Friday 09 February 2007 17:17:41 res wrote:
> On 09.02.2007 17:01, Quentin Anciaux wrote:
> > To make it work I've added the following in the cspace.i:
> >
> > %include "csutil/flags.h"
> > %inline %{
> > void setUint32(csFlags & flag, int i) {
> > flag.Set(i);
> > }
> > %}
> >
> > It is now possible to set the flag in java this way:
> >
> > cspace.setUint32(laserbeam.GetFlags(),
> > cspaceConstants.CS_ENTITY_NOHITBEAM);
>
> Why does "laserbeam.GetFlags().Set
> (cspaceConstants.CS_ENTITY_NOHITBEAM)" not work?
>
> -f.r.
Because "csutil/flags.h" was not included, which gives only access to a class
SWIGTYPE_p_csFlags with which you can do nothing.
By adding %include "csutil/flags.h", it is better, you have access to csflags
class (and the Set method) but the method is defined like this :
public void Set(SWIGTYPE_p_uint32_t mask);
Which again gives you a pointer with which you can do nothing except pass it.
I didn't found how to tell swig to take uint32 as a java int instead of
returning an uint32 pointer... so I added the inlined function above.
Regards,
Quentin
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Crystal-main mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/crystal-main
Unsubscribe: mailto:[EMAIL PROTECTED]