swarm-support
[Top][All Lists]
Advanced

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

RE: Probes


From: Fred Wan
Subject: RE: Probes
Date: Fri, 6 Apr 2001 14:10:41 +0200

Hmm, maybe it's not so bad to run six hours ahead the US, let's one learn to
solve ones own problems. FYI here's what I did. I realized you probably
meant pseudocode with 'getProbedClass'. I put the probeVariable method in
the derived class and replaced 'getProbedClass' with super.getClass() (see
below). Then in the constructor of the derived class I put:

  EmptyProbeMapImpl probeMapSimpleBug = new EmptyProbeMapImpl(aZone,
getClass());

  probeMapSimpleBug.addProbe(getProbeForVariable("bugColor"));
  probeMapSimpleBug.addProbe(getProbeForVariable("periodsSinceEaten"));

  probeMapSimpleBug.addProbe(probeVariable("xPos"));

  Globals.env.probeLibrary.setProbeMap$For(probeMapSimpleBug,getClass());

Which works. Still the previous questions about the general working of
probeLibrary stand.

VarProbe probeVariable (String name)
{
    VarProbe varProbe = null;
    Class baseClass = super.getClass();

    do {
        varProbe =
            Globals.env.probeLibrary.getProbeForVariable$inClass
            (name, baseClass);
        baseClass = baseClass.getSuperclass ();
    } while (varProbe == null && baseClass != null);
    return varProbe;
}


                  ==================================
   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]