Re: [gdome]RFC: Perl libgdome wrapper
- From: "T.J. Mather" <tjmather tjmather com>
- To: gdome gnome org
- Subject: Re: [gdome]RFC: Perl libgdome wrapper
- Date: Sun, 14 Oct 2001 13:38:54 -0400 (EDT)
> I suppose you want to translate the script to perl, but if you intend to
> use ruby for code creation you could simply add create_perl_code methods
> to the IDL_* classes. They already have create_ruby_code and
> create_cpp_code methods.
Actually I was considering using the ruby script, just because it would
easier than rewriting it in Perl. On the other hand, there was some
interest expressed on the Perl-XML list on creating a IDL Parser in
Perl.
> This is because code creation is implemented as a 2 stage process: first
> the IDL is parsed, and its info is stored independent from the target
> language in an object tree like this:
>
> module-+-interfaces--+-methods
> +-constants +-attributes
> +-(exception) +-constants
>
> Then the module's create_*_code is invoked, and it traverses the tree as
> appropriate for the target code.
Thanks for the info. Sounds like a good design.
> As Paolo pointed out once, the user visible core interface of libgdome is
> also automatically generated, there is an XML file in test/apigen
> describing the interface. You may want to parse that instead of the
> official IDL file.
>
> While this introduces a chicken-egg problem, it also has an advantage: All
> document loading and saving functionality is implementation specific and
> thus not specified in the IDL file. I wrote the code to wrap these methods
> by hand. But they are contained in this xml file!
Interesting. Is there anything you get from using the IDL instead of the
XML file? If not it sounds like XML is the way to go, since it contains
all the implementation specific code.
Thanks,
TJ
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]