swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Basic heatbugs question...DUH!


From: bleydorf
Subject: Re: Basic heatbugs question...DUH!
Date: Wed, 30 Jul 1997 16:09:49 -0400

Ken Cline wrote:
> 
> This is an OOP question.

You are correct, Sir.

> A few of the reasons are:
>    ease of debugging
>    ease of comprehension
>    modularization
>    maintainability
>    reuseability
>      ...
> 
> You can combine files in C, C++ and Objective-C (not in Java
> though); for example look at some of the files in
> src/defobj.   However, combining several classes in one file
> usually makes it less intuitive where to find things.

> Of course there are always a few odds-and-ends that might
> "belong" in several particular places or files.
> 
> The rule: make things intuitive!  (You'll thank yourself
> later!)
> 
> Ken.

But, Ok, so all that stuff is true, for basic OO terminology.  If
Observer, Model and Batch are swarms, what are Heatspace and  Heatbug. 
Are they agents?  If that's the case, I guess I got confused, I was
thinking that agents and objects were the same thing...
But, each of those contain many objects inside. 

Let me run one other thing by you and tell me if I have a clue.  I was
assuming that in Objective C, the interface files is where we
"prototype" member varibles/methods?  And the implementaion files are
where we actually write the method's code?  But, then how does that take
into account all the various objects that are inside of these "agents",
like in heatbugs.m there are world and heat objects...are they internal
to the bug or what?  Or are they objects in reality, but maybe just
pointers to objects?

[as I typed this and checked the code, a lightbulb went on]

In heatbug the only objects are Grid2d (which comes from simtools.h) and
HeatSpace (which comes from heatspace.h(which in turn comes from
space.h)).  The only other objects in Heatbug.m is the internal objects
like Pixmap, and r (used to draw itself). 
And there are no other objects in Heatspace.

Then in the other three (Observer, Batch, and Model), which are swarms,
they contain all kinds of Objects...Or they are a "swarm" of objects. 
Things like (in Observer): 
XColormap, ZoomRaster,EZGraph , Value2dDsiplay, Object2dDisplay,
displayActions, and displaySchedule--all of which are inherited from
various ObjC libraries like simtools, tkobjc, etc...  And
heatbugModelSwarm which it gets from model, contains the heatbug stuff
(heatspace, heatbugslist].

Thanks for letting me run this by you, the process helped me "get it"...

Thanks,
Brad.

                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.
                  ==================================


reply via email to

[Prev in Thread] Current Thread [Next in Thread]