Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Abstract classes useful?
Message
From
03/06/2008 16:30:43
 
 
To
03/06/2008 16:17:22
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01320973
Message ID:
01321431
Views:
15
>>Instead of only returning False in case this.class ends with an underscore, the class might display its documentation or a link to that documentation, before returning False in the init.
>A more accurate way than simply returning false might be to write something in debugout, maybe even raise an error ERROR "instanciation of abstract class "+this.class.
>
>I wouldn't display a documentation. If you code this.name = 42 you also don't get a documentation of this or the name property.
>
>But in my interface class I have made a method documentation(). You can of course not call that from the abstract class, as you can't instanciate the abstract class and then call it's documentation() mehtod. But I programmed it in a way it prints it's own documentation and the parentclass documentation, so finally you got the whole class hierachy with docs for this class and all it's (abstract) ancestor classes.

The method Documentation is also omnipresent in my stuff. Mine only has documentation between #IF .F. and #ENDIF, but I guess code in the Init() might very well call that method and that method itself might very well send documentation to a text file.
Groet,
Peter de Valença

Constructive frustration is the breeding ground of genius.
If there’s no willingness to moderate for the sake of good debate, then I have no willingness to debate at all.
Let's develop superb standards that will end the holy wars.
"There are three types of people: Alphas and Betas", said the beta decisively.
If you find this message rude or offensive or stupid, please take a step away from the keyboard and try to think calmly about an eventual a possible alternative explanation of my message.
Previous
Reply
Map
View

Click here to load this message in the networking platform