IDL compiler needs to be enhanced to generate toString
method and equals methods to all IDL structs and unions.
toString and equals are two most used methods in Java
and generating these methods makes it easy to use
structs and unions.
Someother implementations of CORBA are know to generate
these methods.
thanks !
Logged In: YES
user_id=1039996
I have modified the IDL compiler to generate toString and
equals method for IDL structs, unions, enums (equals method)
and exception.
I am attaching a patch which is against 1.3.1. But I can
create a patch against the CVS and/or merge into CVS if I
get CVS access.
To apply the patch :
1) Unzip the patch.
2) cd OpenORB
3) patch -Np0 < patch.file
Patch for generating toString and equals for IDL stuct, unions etc
Logged In: YES
user_id=21814
I modified the patch to work withhe CVS HEAD version, but
unfortunately there is a bug remaining in the equals method
for unions.
Please checkout all modules:
cvs co OpenORBAll
cvs co admin
patch -p0 < OpenORB_RFE986322.diff
and then run the command:
./admin/bin/build.sh nightly
The OpenORB test cases fail with code that cannot be compiled...
If you fix this problem I will apply the patch to 1.4.1 as
soon as 1.4.0 has been released.
Cheers,
Michael
The CVS/HEAD patch for equals and toString methods.
Patch for equals and toString methods against CVS/HEAD. Fixes issues with unions.
Logged In: YES
user_id=1039996
I have modified the way the code gets generated for Unions
to take care of default values and it should also work for
Enum/boolean case statements.
Please try out with the latest patch file.
(OpenORB_RFE986322_20040728.diff)
Cheers,
Saravanan