From: Gyun W. <wo...@gm...> - 2004-09-09 06:26:30
|
Dear OpenC++ Users: I am pretty new to OpenC++. I have just read the tutorial and found that OpenC++ may be used for program transformation. However, currently it seems to support only the class structures. Can I change the global functions of the source code using OpenC++ ? Thanks in advance! Gyun Woo -- wo...@pu... +82-51-510-3518 Pusan National University |
From: Grzegorz J. <ja...@he...> - 2004-09-09 07:40:34
|
Hi, Have a look at 'Class::SetMetaclassForFunctions()' (described in appendix to documentation). Please let me know if you any further assistance. BR Grzegorz On Thu, 9 Sep 2004, Gyun Woo wrote: > Dear OpenC++ Users: > > I am pretty new to OpenC++. I have just read the tutorial > and found that OpenC++ may be used for program transformation. > However, currently it seems to support only the class structures. > Can I change the global functions of the source code using OpenC++ ? > Thanks in advance! > > Gyun Woo > > -- > wo...@pu... > +82-51-510-3518 > Pusan National University > > > ------------------------------------------------------- > This SF.Net email is sponsored by BEA Weblogic Workshop > FREE Java Enterprise J2EE developer tools! > Get your free copy of BEA WebLogic Workshop 8.1 today. > http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > _______________________________________________ > Opencxx-users mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/opencxx-users > > ################################################################## # Grzegorz Jakacki Huada Electronic Design # # Senior Engineer, CAD Dept. 1 Gaojiayuan, Chaoyang # # tel. +86-10-64365577 x2074 Beijing 100015, China # # Copyright (C) 2004 Grzegorz Jakacki, HED. All Rights Reserved. # ################################################################## |
From: RodZilla <rod...@fr...> - 2004-09-09 08:03:44
|
Hello, I've been using OpenC++ for a bit more than a week now and I have a *really* stupid question : is it possible in a TranslateMemberFunction method to obtain the name of the source file (in which the member function is defined) ? I looked into the doc, examples and source code and didn't find anything (but it's likely I missed something). Thanks a lot in advance. Best regards, Rod. |
From: Grzegorz J. <ja...@he...> - 2004-09-09 08:33:00
|
Hi, This should work (not tested, no error handling): void TranslateMemberFunction(Environment* e, Member& m) { int line; Ptree* tmp = e->GetLineNumber(m->GetName(), line); string filename(tmp->ToString()); ... } Let me know if it does not. BR Grzegorz On Thu, 9 Sep 2004, RodZilla wrote: > Hello, > > I've been using OpenC++ for a bit more than a week now > and I have a *really* stupid question : is it possible > in a TranslateMemberFunction method to obtain the name > of the source file (in which the member function is > defined) ? > I looked into the doc, examples and source code and > didn't find anything (but it's likely I missed > something). > > Thanks a lot in advance. > > Best regards, > > Rod. > > > ------------------------------------------------------- > This SF.Net email is sponsored by BEA Weblogic Workshop > FREE Java Enterprise J2EE developer tools! > Get your free copy of BEA WebLogic Workshop 8.1 today. > http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > _______________________________________________ > Opencxx-users mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/opencxx-users > > ################################################################## # Grzegorz Jakacki Huada Electronic Design # # Senior Engineer, CAD Dept. 1 Gaojiayuan, Chaoyang # # tel. +86-10-64365577 x2074 Beijing 100015, China # # Copyright (C) 2004 Grzegorz Jakacki, HED. All Rights Reserved. # ################################################################## |
From: RodZilla <rod...@fr...> - 2004-09-14 15:39:19
|
Hello, I have another stupid question. Now I would like to get (and write into a file) the full declaration of a member in a class. I do this using Member::Signature and TypeInfo::MakePtree, but if the member is an array, its size is omitted. Is it possible to get the full declaration, and how ? Thanks a lot in advance. Best regards, Rod. |
From: Grzegorz J. <ja...@he...> - 2004-09-15 09:03:17
|
On Tue, 14 Sep 2004, RodZilla wrote: > Hello, > > I have another stupid question. Now I would like to > get (and write into a file) the full declaration of > a member in a class. > I do this using Member::Signature and TypeInfo::MakePtree, > but if the member is an array, its size is omitted. > Is it possible to get the full declaration, and how ? I don't think so. Type elaboration takes a shortcut here. However, with minor enhancement to Member class you can get hold on the Ptree representing original declaration of the member (including type). Have a look at Member::original_decl . Adding something like 'Ptree* Member::GetOriginalType()' should not be difficult to add. BR Grzegorz PS: Hopefully the limitation of type elaborator will be addressed soon within core library. > Thanks a lot in advance. > > Best regards, > > Rod. > > > ------------------------------------------------------- > This SF.Net email is sponsored by: thawte's Crypto Challenge Vl > Crack the code and win a Sony DCRHC40 MiniDV Digital Handycam > Camcorder. More prizes in the weekly Lunch Hour Challenge. > Sign up NOW http://ad.doubleclick.net/clk;10740251;10262165;m > _______________________________________________ > Opencxx-users mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/opencxx-users > > ################################################################## # Grzegorz Jakacki Huada Electronic Design # # Senior Engineer, CAD Dept. 1 Gaojiayuan, Chaoyang # # tel. +86-10-64365577 x2074 Beijing 100015, China # # Copyright (C) 2004 Grzegorz Jakacki, HED. All Rights Reserved. # ################################################################## |