Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Class Questions
Message
From
22/01/1999 11:22:40
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Miscellaneous
Thread ID:
00177951
Message ID:
00178979
Views:
33
>Dragan,
>
>A copy of all object properties are loaded for each class of the inheritance tree, not just the non-default ones. An object though has it's own memory where all the properties are stored. You can see this by using the scope resolution operator to access them (but at the moment I can't recall the correct syntax), or via the PEMSTATUS() that can tell if something is non-default, and GETPEM() will show it. For example
>
>x = createobject( "d" )
>? x.Prop1
>? getpem( x, "prop1" )
>? getpem( "d", "prop1" )
>? getpem( "c", "prop1" )
>? getpem( "b", "prop1" )
>? getpem( "a", "prop1" )
>
>define class a as custom
> Prop1 = "Class A"
>enddefine
>
>define class b as a
> Prop1 = "Class B"
>enddefine
>
>define class c as b
> Prop1 = "Class C"
>enddefine
>
>define class d as c
> Prop1 = "Class D"
>enddefine

In this example you have only one property, which is different in any subclass of the initial class. The whole chain is loaded, and all the definitions are here. What I'm supposing, is that if there was some Prop2, which was redefined only at B and D level, and overrriden in the object itself, wouldn't use any space in C level, and if it wasn't redefined in object x, wouldn't have space allocated in that object either. Is there a way to measure this?

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform