[omniORB] Any suggestions for implementing kylix backend?

Daniel Weber dweber1@austin.rr.com
Sun, 1 Jul 2001 21:00:15 -0500

I've been messing aroudn this weekend looking at creating some way of getting 
CORBA functionality in Kylix.  OmniOrb would appear to be an excellent 
vehicle for this (although I'm looking at ORBit as well, mostly b/c of it's 
object activation framework).

Any suggestions out there on how feasible it is to create a backend for 
omniidl to create .pas files?  As far as I know, there isn't a standard for 
object pascal mappings (and I have no experience with the Enterprise Delphi 
implementation), so it's not going to be pretty.

>From what I've learned so far, it should be fairly straightforward to create 
the back-end, it looks like it can all be done in python.  It looks like I 

1) inherit the backend from idlvisitor.AstVisitor
2)  override the visit methods for each of the types, creating data 
structures to hold the eventual output information.
3)  Write the output file on completion of the run method.

It looks like the AST parser will handle all the syntax evaluation of the IDL 
file for me, though I'll have to worry about validating the .pas files.

Object pascal handles most data formats natively (including long long but not 
unsigned long long), enumerations should be clean, as should exceptions.  My 
first thought is to implement interfaces as, well, interfaces, though that 
wouldn't lead me any closer on how to handle the actual GIOP translation.

Any suggestions appreciated (source more so, of course).