C bindings for OmniORB?

Bart Schuller schuller@lunatech.com
Mon, 12 Jan 1998 23:47:29 +0100

On Jan 12, Miguel de Icaza wrote
> > The most difficult bit will be writing a compiler
> > to generate the language stubs from idl I think. However there are a lot
> > of idl compilers out there, so we may be able to butcher one to fit our
> > needs.
> Sun's IDL compiler (the one used and adapted in OmniORB) seems a bit
> huge for me.  There are two possibilities: MICO's IDL compiler (which
> generates C++ at this point) and the Flick's modular compiler.

Consider also that you can use an Interface Repository instead of an IDL
parser. That's what I did for my Perl Orb. Walking a tree of objects and
generating source code should be a fun project in almost every language.

In more detail:
To compile an IDL file, I first start an IR process (which prints its
object reference). The IR which comes with OmniBroker has the option to
parse an IDL file, so that's what I use.
Then I have my code generator, which is a CORBA client for the IR, read
the object reference for the IR, and that's all you need: to the code
generator, it's as if it has a tree of local objects corresponding to
entities found in the IDL file.

And you see, it doesn't matter if which implementation of the IR you
use, as long as it works.

I had great fun bootstrapping the whole process, writing just enough
stub functions by hand to get the client support for the IR working :-)

Bart Schuller                  schuller+sig@lunatech.com At Lunalabs, where the
Lunatech Research              http://www.lunatech.com/  future is made today..
Partner of The Perl Institute  http://www.perl.org/    Linux http://www.li.org/