From: Grzegorz J. <ja...@he...> - 2004-03-22 02:22:56
|
On Sun, 21 Mar 2004, SF Markus Elfring wrote: > I try my next suggestions to see if they can be accepted for code improvements. We have already told you, that we do not want your reviews in this forum. You had an option to discuss them with me in private e-mails, I have substantially answered all your e-mails so far, but apparently you are not interested in any substantial discussion. Please be advised that you will be banned from this forum after your next posting. Please e-mail me directly if you have any questions. Best regards Grzegorz > > 1. I see the following in the file "mop.h". > // these must be consistent with ... in token.h > enum { Public = 298, ... , Undefined = 0 }; > I suggest to use C++ to enforce this constraint. The values should be taken from the enumeration in the other header by their symbolic names. > > 2. How do you think about to give the long enumeration in the file "token.h" a name like "OCC_token"? > > 3. Can it be moved to a new file "opencxx_token_id.h" so that it can be separately included? > > 4. Please replace all "ints" that are used for token identifiers in method signatures by this new name to enhance type safety. > - The method "What" seems a candidate for this change. > - Will the method "IsA(int ...)" need also an update then? > > 5. Can the work for this type identifiers be done by virtual methods that are derived from abstract base classes? > Would you like to get independence from this specific numbers? > Examples for use cases: > - http://industriallogic.com/xp/refactoring/conditionalWithStrategy.html > - http://industriallogic.com/xp/refactoring/typeCodeWithClass.html > - http://www.refactoring.com/catalog/replaceTypeCodeWithClass.html > - http://www.refactoring.com/catalog/replaceConditionalWithPolymorphism.html > > > Sincerely, > Markus Elfring > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > _______________________________________________ > Opencxx-users mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/opencxx-users > > On Sun, 21 Mar 2004, SF Markus Elfring wrote: > If you would like to achieve independence from token identifiers, I see that the C++ syntax and the metaobject protocol will be mapped to a detailed class hierarchy. The advice on maintainability in the section "12.2.5 Type identification" of the book "The C++ programming language" by Bjarne Stroustrup may be an indication for the suggested change. > > A pure object-oriented design would lead to a collection of interfaces in the form of abstract base classes. It will result in memory requirements that need to be examined in comparison to other factors like speed in an elegant design. > - Overhead of having virtual functions > http://groups.google.de/groups?threadm=7ebhg5%24jh0%241%40news.platinum.com > > - memory overhead required for inheritance > http://groups.google.de/groups?threadm=u3u2wazdkj.fsf%40isip22.isip.msstate.edu > > But it will perhaps provide an programming interface that has got a similar functionality like the management APIs for Java. > http://en.wikipedia.org/wiki/Java_Management_eXtensions > > Sincerely, > Markus Elfring > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&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. # ################################################################## |