Re: orbitcpp idl backend & --onlytop



Hi Robert,

Yes --onlytop (and #pragma inhibit) suppresses the generation of definitions for idl elements. The problem is, orbitcpp builds it's own representation of the IDL tree from the C data-structures it is given by libidl. Because the inhibited elements are never defined they don't appear in the C++ representation. There are a few places in the orbitcpp backend that when undefined/inhibited elements turn up it is assumed to be an error. When, however, it is a legitmate condition. Bug http://bugzilla.gnome.org/show_bug.cgi?id=101455 is the same problem but with exceptions rather than interfaces. I have attached a comment to the above bug so that we don't forget about this. I'll try and fix it as soon as possible.

For the moment avoid the problem by not using --onlytop or pragma inhibit.

rm wrote:

hi all, i'm trying to use the onlytop flag of orbit-idl-2. i believe
the semantics of this flag are to suppress the declarations for
#include'd idl files and implicitly including the headers which are
assumed to already exist. this seems to work fine for the c backend,
but fails for orbit-cpp

for example:
/*-----foo.idl-----------------------*/

module foo {

 interface bar {
};
};
/*-----B.idl------------------------*/
#include "foo.idl"


module B {
 interface C {
   ::foo::bar get_foo();
 };

};
/*----------------------------------*/
and then trying to compile it (first normally) (orbitcpp CVS):

orbit-idl-2 -l cpp B.idl
orbit-idl-2 2.6.0 compiling
 mode, show preprocessor errors, passes: stubs skels common headers skel_impl
imodule

orbit-idl-2 --onlytop -l cpp B.idl
orbit-idl-2 2.6.0 compiling
 mode, show preprocessor errors, passes: stubs skels common headers skel_impl
imodule

foo.idl:4: unknown identifier ::foo::bar

and finally with the C backend

orbit-idl-2 --onlytop  B.idl
orbit-idl-2 2.6.0 compiling
 mode, show preprocessor errors, passes: stubs skels common headers skel_impl
imodule
-------------------------------


	it appears that although the backend does not get the parse
tree of the included file, libIDL does know about it and cross checks
references to it. it's unclear though how much information libidl
actually keeps around to it. the docs seem to imply it keeps
namespace information around for type lookup.
	is it the case that the orbitcpp backend keeps it's own type
information?

thanks, rob



----
Robert Melby
Georgia Institute of Technology, Atlanta Georgia, 30332
uucp:     ...!{decvax,hplabs,ncar,purdue,rutgers}!gatech!prism!gt4255a
Internet: async cc gatech edu
_______________________________________________
orbitcpp-list mailing list
orbitcpp-list gnome org
http://mail.gnome.org/mailman/listinfo/orbitcpp-list


--
Bowie Owens

CSIRO Mathematical & Information Sciences
phone  : +61 3 9545 8055
fax    : +61 3 9545 8080
mobile : 0425 729 875
email  : Bowie Owens csiro au






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]