[DGD] Kernel lib create()
Felix A. Croes
felix at dworkin.nl
Thu Feb 19 14:19:06 CET 2004
Michael McKiel <crashnbrn71 at yahoo.ca> wrote:
> I was curious about a couple calls done in the Kernel lib, which seem to be
> strange, in both the telnet.c & binary.c files in kernel/obj/
> Within their create() {} functions, they respectively do calls:
>
> ::create("binary");
> ::create("telnet");
>
> They are the only objects which do this...so...
> What is the purpose or gain of this?
> Doesn't create only accept an int?
They both inherit /kernel/lib/connection, and you'll notice that the
create function there expects a string argument.
In general, objects that do not have their own dataspace (pure
classes) do not require a standard create function, because it is
never called by the standard initialization procedure anyway.
Instead, they can use whatever arguments the class requires to
create a proper instance.
Regards,
Dworkin
_________________________________________________________________
List config page: http://list.imaginary.com/mailman/listinfo/dgd
More information about the DGD
mailing list