From: Grzegorz J. <ja...@ac...> - 2005-01-03 09:23:49
|
Hi, sdflemin wrote: > > Hi, > I have been using OpenC++ for about a year now, and recently ran into a > problem. I am doing member call translations (using > MemberCallTranslate), and I need to know if the member function that the > call is being made on returns void. I find that when the call is made > outside the member's class, the Environment does not contain the member > function's symbol. A stripped-down sample that illustrates the problem > follows. I don't have much time to look into it now, but it seems to me that you are looking in wrong environment. Given C x; x->f(); you should be looking for 'f()' in environment of class C, not in the environment of the call site. Given the fact that you are in a metaclass of C, you should be able to get hold on the right environment by calling 'this->GetEnvironment()'. Let me know if this does not work, I will have a deeper look. > I have used the Environment::Dump function before the Lookup to help > debug this, and sure enough, none of the Foo member functions appear in > the dump. The Foo class does, however... Seems right. > My question to you: is this behavior a feature that I don't understand > or a bug? > > If it's a feature, can you suggest a way for me to determine the return > type of foo_do_it() in the TranslateMemberCall() function? > > If it's a bug, can you suggest a patch? I am happy to patch the OpenC++ > source myself, but it will take me awhile to understand it. It seems that no patch is needed here, but if you would consider contributing your work to OpenC++ there are always bigger and smaller jobs to do in OpenC++, OpenC++Core or OpenC++ website, just contact me for arrangements. > Any pointers > you can give me would be great, and also, is there a document that > describes the OpenC++ source design? See opencxx/doc/architecture.html in CVS. BR Grzegorz > Many Thanks, Scott > > PS: My thanks to the OpenC++ maintainers. It has been an extremely > useful tool for me, and I am glad that the project is alive and well. > > > ------------------------------------------------------- > The SF.Net email is sponsored by: Beat the post-holiday blues > Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. > It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt > _______________________________________________ > Opencxx-users mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/opencxx-users |