[DGD] Re: My idea for the DGD driver - validate
Erwin Harte
harte at is-here.com
Thu Feb 12 22:29:27 CET 2004
On Thu, Feb 12, 2004 at 09:12:52PM +0000, Robert Forshaw wrote:
[...]
> The idea is that there would be a keyword, for example, validate, for a
> function. Any function declared with this keyword can not be called by
> anything except the driver. Now, when naughty_object does a call_other to
> OBJECTD, or whatever, if there is a validate function there then that
> function will be called instead of the function specified. If the function
> bearing the validate keyword returns zero,
Perhaps you've noticed 'private' and 'static' functions in other code?
I believe these will allow you to do 99% of what you want, already.
A private function is only callable from within the program where it
was implemented. Even code inheriting it cannot access the function,
similar to how private variable are not visible to inheriting code.
A static function is only callable from within the object that it's
in. Code inheriting the program that it was in can also use it but
you cannot access it from another object.
Hope that helps,
Erwin.
--
Erwin Harte <harte at is-here.com>
_________________________________________________________________
List config page: http://list.imaginary.com/mailman/listinfo/dgd
More information about the DGD
mailing list