[DGD] Some basics
nihilxaos at nihilxaos.com
nihilxaos at nihilxaos.com
Mon Oct 20 20:16:59 CEST 2003
ok. I've read through Noah's objectd.c and have gotten some good background on
how the language is working in general. I'm still a little fuzzy on a couple
things so I want to make sure I'm all set with them:
1) When an object is compiled it's create is called. Thus if I write a log
daemon logd.c (aliased by LOGD) and pull the usual if (!find_object(LOGD))
{compile_object(LOGD);} it sees if the logd object has been loaded into memory,
and if not it compiles it and then runs create since you obviously want to
create it. This right? It seems a little off to me, but that seems to be how
things are working. Or is it more correct to say that create is called once the
first call is made to one of the object's functions?
2) When I inherit something, if it doesn't already exist I have to call it's
create function. Thus you'll see something like:
inherit foon FOON;
[...]
foon::create();
Is that because we want to make sure that FOON has been loaded into memory, or
do I have to call create() to make sure that the inherited object is properly
configured for this object and not for something that may have inherited it
before? Basically this is going on the assumption that inheriting brings the
inherited data types into the object, but keeps any non-overridden code in a
separate object so it can be called from any of its children. Thus when you
destruct an object it in turn destructs its ancestors, not to ultimately wipe
out the ancestor such that it can't be called by other like objects, but so it
removes the links between it and its ancestors. (that make sense?)
I'm still having some issues with the concept of cloning, but that's a bit in
the future once I get my base daemons up and running and have started messing
more with the mud's internal envrionment. :)
Patrick
_________________________________________________________________
List config page: http://list.imaginary.com/mailman/listinfo/dgd
More information about the DGD
mailing list