[DGD]Scope (::) operator and Kernel lib wiztool

Kris Van Hees aedil at alchar.org
Mon Jun 11 05:57:41 CEST 2001


Functions called with the :: scope prefix call a function in the inherited
objects, and because of the multiple inheritance implementation it is known
that exactly one function with a given name will be visible to the calling
code.  If the auto object defines the functions and no other inherited class
that's interposed between the auto object and your object redefines it, then
it will be calling the function in the auto object of course.

	Kris

On Sun, Jun 10, 2001 at 08:47:35PM -0700, Noah Lee Gibbs wrote:
>   I've got a lightly-customized Kernel lib up and running and I'm playing
> around with the code in different ways.  Got a DGD LPC question.
>   I remember from the archives that the two-colon scope operator, ::, is
> used to call a kfun or (same thing, mostly) a static function in the auto
> object.  But in /kernel/obj/wiztool's create() function, it appears to be
> calling to its parent (/kernel/lib/wiztool) with the same syntax -- if it
> called straight up to auto, it would just say ::create(1) to say that it
> was a clone (and it isn't) instead of saying ::create(200) to set hsize to
> 200.
>   Does anybody know if this is just a bug in the Kernel lib or if
> functions called with the scope operator call to the parent before trying
> the auto object?
> 
> 
> List config page:  http://list.imaginary.com/mailman/listinfo/dgd

-- 
Software Developer & Creator of Worlds

List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list