[DGD]DGD and Melville

Stephen Schmidt schmidsj at union.edu
Sun Jan 14 04:19:22 CET 2001


On Sat, 13 Jan 2001, Nightlith wrote:
> Steve Schmidt wrote:
> > Not include. It is almost never correct (I am tempted
> > to say literally never) to include code rather than
> > inherit it.

I remember the exception now: You can't inherit into the
auto object, so you have to #include into it. There's
then no difference between doing that and having One
Big File for auto.c, except for organization of the
code.

> I have a question: how do those two (user.c and login.c) function
> access player.c functions? I don't see any cloning code, and from what I can
> tell, the only place it could happen is by simply having
>     static object player;

By call_other. You have the reference to the player, so you
can do
  player->set_my_stats() ;

to invoke the function set_my_stats() in the player object.
You have to be sure you are pointing at the correct player
object, and player.c usually wants some security to make
sure the object that invoked the function is the matching
user object.

> What I have going is user.c having both login.c (to create/restore
> a user) and creation.c (to create/restore the player). player.c inherits
> living.c and creation.c is inherited after login.c. If I have player
> declared in login, creation.c complains, and vice versa. Obviously, I don't
> know what I'm doing :-)

It sounds to me like login.c should be inherited by user.c, not
by player.c. What error message do you get when it "complains"?

Steve






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



More information about the DGD mailing list