Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Simple class question
Message
 
To
10/01/1999 20:22:30
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00173492
Message ID:
00174625
Views:
26
>Jim (B),
>
>Just a clarification, if you will. . .
>
>I do not see how the scope resolution operator's need of the parent class' name violates encapsulation. I thought (and still do) that encapsulation would apply to all sub-classes of a parent, all the way up the line to the parent. Is it not also true that the subclass inherently contains the name of its parent (thus 'breaking' encapsulation per the definition you suggest?
>
>Thanks in advance,
>
>Jim N

Jim,

Encapsulation may have been a poor selection of terminology, but the example I provided shows the nature of the problem. If I have ClassB which is a subclass of ClassA and in ClassB ClassA::Init appears. Now at a leter date I realize that I nedd a ClassA1 between ClassA and ClassB the :: makes that a difficult thing to do because I need to change all references to ClassA in ClassB. If, instead, I had used DoDefault() all that is needed is to redefine ClassB as a subclass of ClassA1 and the references are all updated.
Previous
Reply
Map
View

Click here to load this message in the networking platform