Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Include file from base class to a derived class
Message
From
02/06/2006 13:11:57
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
01126779
Message ID:
01126796
Views:
22
Thanks.

>Wei,
>
>include files are not inherited, they are only used compile time. If the derived class needs to use the the constants they have to know where they are found.
>
>I have adopted using an include file for each classlib. This way if the classlib with the derived classes inherit from more than one classlib you can easily account for it:
>
>
>* parentclasslib1.h
>#define XYZ 0
>
>* parentclasslib2.h
>#define QWERTY 1
>
>* classlibX.h (which derives from both 1 and 2
>#include parentclasslib1.h
>#include parentclasslib2.h
>
>#define NewStuffForTheClassesInClasslibX "test"
>
>
>This way each class that needs to have access to #define constants simply uses its own classlib.h file.
>
>>Thanks. Is there anyway can make it easier? How does VFP implement the derived class?
Previous
Reply
Map
View

Click here to load this message in the networking platform