VarProbe
Name
VarProbe -- A class that allows the user to inspect a given variable in any candidate that is an instance of, or inherits from, a given class.
Description
This is a specialized subclass of the abstract class Probe. It completes the specification of a probe that refers to an instance variable element of an object.
Methods
Phase: Creating
-
setProbedVariable: (const char *)
aVariable The setProbedVariable: sets the variable being probed. The aVariable identifier is simply a character string consisting of the identifier of the variable referent. This method must be called during the create phase.
Phase: Setting
-
setFloatFormat: (const char *)
format The setFloatFormat: method sets the floating-point format of a GUI display widget when given a sprintf-style formatting string.
-
setStringReturnType: returnType The setStringReturnType: method sets the format that will be used to print the variable. When the probedVariable is of type unsigned char or char, the method probeAsString will, by default, return a string of the format: "'%c' %d". This is meant to reflect the commonplace use of an unsigned char as a small int.
-
setNonInteractive The setNonInteractive method sets a VarProbe to be non-interactive. This ensures that the user will not be able to change the value of a probe, only observe it. Setting the VarProbe to be non-interactive will not interfere with the drag and drop capability of the objects into the VarProbe field.
Phase: Using
- (void)
setData: anObject ToDouble: (double)
val Sets the probeVariable value using a double. This requires that the value is numeric.
- (BOOL)
setData: anObject ToString: (const char *)
s The setData:ToString: sets the probedVariable using a string which the probe reads and converts appropriately. When setting the value of an unsigned char or a char using this method, the expected format of the string is always "%i" unless CharString was chosen (in which case the format should be "'%c'").
- (void)
setData: anObject To: (void *)
newValue The setData:To: method sets the probedVariable using the pointer to the new value.
-
iterateAsInteger: anObject using: (void (*) (unsigned rank, unsigned *vec, int val))
func Iterates through the elements in an array, calling the argument function with the rank, position vector, and array element cast as an integer.
-
iterateAsDouble: anObject using: (void (*) (unsigned rank, unsigned *vec, double val))
func Iterates through the elements in an array, calling the argument function with the rank, position vector, and array element cast as a double.
- (unsigned *)
getDims Returns a vector equal to length returned by getRank: with the dimensions of the array (major to minor).
- (const char *)
getBaseType In the case of arrays, returns the base type.
- (unsigned)
getRank Returns rank of array, or 0 for scalar objects.
- (id <String>)
probeAsString: anObject The probeAsString: method prints the value of the variable into a new String object.
- (const char *)
probeAsString: anObject Buffer: (char *)
buffer The probeAsString:Buffer: method prints the value of the variable into the buffer. The buffer should be pre-allocated.
- (const char *)
probeAsString: anObject Buffer: (char *)
buf withFullPrecision: (BOOL)
precision The probeAsString:Buffer:withFullPrecision: method prints the value of the variable into the buffer. The buffer should be pre-allocated. This version of probeAsString is used internally by ObjectSaver to use the "saved as" precision form which may differ from the "displayed" precision.
- (double)
probeAsDouble: anObject The probeAsDouble: method returns a pointer to the probed variable as a double.
- (int)
probeAsInt: anObject The probeAsInt: method returns a pointer to the probed variable as an integer.
-
probeObject: anObject A field probed with probeAsObject: must be an object.
- (void *)
probeAsPointer: anObject The probeAsPointer: method returns a pointer to the probed variable based on the probeType.
- (void *)
probeRaw: anObject The probeRaw: method returns a pointer to the probed variable.
- (BOOL)
getInteractiveFlag The getInteractiveFlag method returns the interactivity state of the VarProbe.
- (const char *)
getProbedVariable The getProbedVariable method returns a string matching the identifier of variable being probed.
Globals
- id <Symbol> DefaultString
No description available.
- id <Symbol> CharString
No description available.
- id <Symbol> IntString
No description available.