swarm.objectbase
Interface ProbeLibrary

All Known Implementing Classes:
ProbeLibraryImpl

public interface ProbeLibrary
extends CreateS, Create, DropS, Drop

A (singleton) Class, whose instance is used as a container for a global mapping between classnames and their 'default' ProbeMaps. These defaults can be changed by the user, thus allowing him/her to customize the default contents of the ProbeDisplays generated when probing objects.. The normal Swarm simulation will probably only ever contain one instance of this class, namely the probeLibrary object. This object is used for Library Generation of Probes and ProbeMaps: its role is to cache one unique "official" ProbeMap for every Class ever probed during a run of Swarm. These ProbeMaps are generated as they are requested.


Method Summary
 ProbeMap getCompleteProbeMapFor(Class aClass)
          The getCompleteProbeMapFor: method returns a ProbeMap containing Probes for all the instance variables and messages of the given Class (including inherited variables and messages).
 ProbeMap getCompleteVarMapFor(Class aClass)
          The getCompleteVarMapFor: method returns a ProbeMap containing Probes for all the instance variables of the given Class (including inherited variables) but does not include any MessageProbes.
 int getDisplayPrecision()
          The getDisplayPrecision method gets the current display precision set in the ProbeLibrary instance.
 MessageProbe getProbeForMessage$inClass(String aMessage, Class aClass)
          The getProbeForMessage:inClass: method returns a probe that has been "checked out" from the appropriate Probes in the probe library.
 VarProbe getProbeForVariable$inClass(String aVar, Class aClass)
          The getProbeForVariable:inClass: method returns a probe that has been "checked out" from the appropriate Probes in the probe library.
 ProbeMap getProbeMapFor(Class aClass)
          The getProbeMapFor: method returns a ProbeMap for the aClass class.
 int getSavedPrecision()
          The getSavedPrecision method gets the current saved precision set in the ProbeLibrary instance.
 boolean isProbeMapDefinedFor(Class aClass)
          The isProbeMapDefinedFor: method returns True if there is a non-nil value in the ProbeLibrary for that class and False otherwise.
 Object setDisplayPrecision(int nSigDisplay)
          The setDisplayPrecision: method sets the number of significant digits for floating point and double floating point numbers displayed on GUI widgets.
 Object setProbeMap$For(Object aMap, Class aClass)
          The setProbeMap:For: method sets the standard probe map as the probe map.
 Object setSavedPrecision(int nSigSaved)
          The setSavedPrecision: method sets the number of significant digits saved for floating-point and double floating-point numbers through ObjectSaver.
 
Methods inherited from interface swarm.defobj.Drop
drop
 
Methods inherited from interface swarm.defobj.DefinedObject
compare, describe, describeID, getDisplayName, getTypeName, getZone, perform, perform$with, perform$with$with, perform$with$with$with, respondsTo, setDisplayName, xfprint, xfprintid, xprint, xprintid
 

Method Detail

setDisplayPrecision

public Object setDisplayPrecision(int nSigDisplay)
The setDisplayPrecision: method sets the number of significant digits for floating point and double floating point numbers displayed on GUI widgets. This method is currently only implemented for VarProbes. It has not been implemented for MessageProbes yet. The setDisplayPrecision method allows all probes checked out from the global ProbeLibrary instance to access this displayed precision. However, individual probes can vary from this global default, by using the setFloatFormat method on a exisiting probe.

getDisplayPrecision

public int getDisplayPrecision()
The getDisplayPrecision method gets the current display precision set in the ProbeLibrary instance.

setSavedPrecision

public Object setSavedPrecision(int nSigSaved)
The setSavedPrecision: method sets the number of significant digits saved for floating-point and double floating-point numbers through ObjectSaver. This function sets the global default precision for all floating point numbers, including double floating point numbers. This floating point precision affects all numbers saved via the ObjectSaver class. There is currently no way to override this global default for an individual probe.

getSavedPrecision

public int getSavedPrecision()
The getSavedPrecision method gets the current saved precision set in the ProbeLibrary instance.

isProbeMapDefinedFor

public boolean isProbeMapDefinedFor(Class aClass)
The isProbeMapDefinedFor: method returns True if there is a non-nil value in the ProbeLibrary for that class and False otherwise.

getProbeMapFor

public ProbeMap getProbeMapFor(Class aClass)
The getProbeMapFor: method returns a ProbeMap for the aClass class. If a specific ProbeMap has been designed and installed in the ProbeLibrary for that class, then that specific ProbeMap is returned. If a custom ProbeMap was not designed and installed, then a CompleteProbeMap is created and returned.

getCompleteProbeMapFor

public ProbeMap getCompleteProbeMapFor(Class aClass)
The getCompleteProbeMapFor: method returns a ProbeMap containing Probes for all the instance variables and messages of the given Class (including inherited variables and messages). The current implementation of ProbeLibrary does not cache CompleteProbeMaps.

getCompleteVarMapFor

public ProbeMap getCompleteVarMapFor(Class aClass)
The getCompleteVarMapFor: method returns a ProbeMap containing Probes for all the instance variables of the given Class (including inherited variables) but does not include any MessageProbes.

getProbeForVariable$inClass

public VarProbe getProbeForVariable$inClass(String aVar,
                                            Class aClass)
The getProbeForVariable:inClass: method returns a probe that has been "checked out" from the appropriate Probes in the probe library. Note: The returned probe will be cached so to avoid affecting the results of future requests for the same probes, clone the probe prior to making modifications to the probe.

getProbeForMessage$inClass

public MessageProbe getProbeForMessage$inClass(String aMessage,
                                               Class aClass)
The getProbeForMessage:inClass: method returns a probe that has been "checked out" from the appropriate Probes in the probe library. Note: The returned probe will be cached so to avoid affecting the results of future requests for the same probes, clone the probe prior to making modifications to the probe.

setProbeMap$For

public Object setProbeMap$For(Object aMap,
                              Class aClass)
The setProbeMap:For: method sets the standard probe map as the probe map. The returned Probe will be cached as though it was produced by the library itself.