[PolyORB-users] Additional pragmas facilitating migration of legacy Ada to CORBA
oliver.kellogg at t-online.de
oliver.kellogg at t-online.de
Tue Jun 14 15:59:52 CEST 2011
Hello polyorb-users,
In the GNU Ada CORBA Kit
(http://orbitada.cvs.sourceforge.net/viewvc/orbitada/gnack), we
support following pragmas that facilitate the migration of legacy Ada
code to CORBA:
#pragma switchname <union_type> <switch_name>
- Instructs idl2ada to use the given name for the union switch instead
of
"Switch". Example:
// IDL
#pragma switchname union_t discriminant
union union_t switch (boolean) {
case FALSE:
char a;
case TRUE:
float f;
};
-- Ada
type ind_t is (zero, one, two);
type union_t
(discriminant : CORBA.Boolean := FALSE)
is record
case discriminant is
when FALSE =>
a : CORBA.Char;
when TRUE =>
f : CORBA.Float;
end case;
end record;
#pragma array_index <array_type> <index_type>
- Instructs idl2ada to use the given type as the index type in the
declaration of an array mapped from "typedef". Example:
// IDL
enum ind_t { zero, one, two };
#pragma array_index arr_t ind_t
typedef boolean arr_t[3];
-- Ada
type ind_t is (zero, one, two);
type arr_t is array (ind_t) of CORBA.Boolean;
Would these be of interest for PolyORB?
If so then I would volunteer to provide their implementation in iac.
Regards,
Oliver M. Kellogg
<mailto:okellogg at users.sourceforge.net>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/polyorb-users/attachments/20110614/0a82bb90/attachment.htm
More information about the PolyORB-users
mailing list