Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Simple class question
Message
 
À
10/01/1999 20:22:30
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00173492
Message ID:
00174625
Vues:
27
>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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform