Documentation Set for Swarm 2.2
Prev | Reference IV. Objectbase Library | Next

# MessageProbe

## Name

MessageProbe -- A class that allows the user to call a given message on 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 a message element of an object.

## Protocols adopted by MessageProbe

Probe CREATABLE

## Methods

### Phase: Creating

- + create: (id <Zone>)aZone setProbedSelector: (SEL)aSel
  Convenience factory method for common case.

- - setProbedMethodName: (const char *)methodName
  The setProbedMessage: method sets the message to be probed given the message name. In dynamically-typed languages like JavaScript selectors don't make sense, since method argument types aren't fixed.

- - setProbedSelector: (SEL)aSel
  The setProbedSelector: method sets the message to be probed given the selector.

### Phase: Setting

- - setHideResult: (BOOL)val
  The setHideResult: method is used to set the visibility of the result field. When set to 1, the user is indicating that the result field in a graphical representation of the message probe should not be shown.

### Phase: Using

- - objectDynamicCallOn: target
  The objectDynamicCallOn: method generates a dynamic message call on the target object. This method assumes the user knows the return type to be id.

- - (const char *)stringDynamicCallOn: target
  The stringDynamicCallOn: method generates a dynamic message call on the target object. This method assumes the user knows the return type to be const char *.

- - (long)longDynamicCallOn: target
  The longDynamicCallOn: method generates a dynamic message call on the target object. This method assumes the user knows the return type to be numeric and would like a direct translation into type logn.

- - (double)doubleDynamicCallOn: target
  The doubleDynamicCallOn: method generates a dynamic message call on the target object. This method assumes the user knows the type to be numeric and would like a direct translation into type double.

- - (val_t)dynamicCallOn: target
  The dynamicCallOn: method generates a dynamic message call on the target object.

- - setArg: (unsigned)which ToUnsigned: (unsigned)x
  The setArg:ToUnsigned: method sets the nth argument of the message used by the probe to an unsigned integer value. The user is responsible for matching the unsigned integer type of this argument with the argument type of the method being probed.

- - setArg: (unsigned)which ToString: (const char *)what
  The setArg:ToString: method sets the nth argument of the message. The argument must be provided in string form.

- - (BOOL)getHideResult
  The getHideResult method returns 1 if the result field is "hidden".

- - (const char *)getArgName: (unsigned)which
  The getArgName: method returns a string representation of the argument key with the given index.

- - (val_t)getArg: (unsigned)which
  The getArg: method returns the argument type for a given index.

- - (unsigned)getArgCount

- - (const char *)getProbedMessage
  The getProbedMessage method returns the string matching the identifier of the message being probed.

- - (BOOL)isArgumentId: (unsigned)which
  The isArgumentId: method returns 1 if a given argument of the message is of type object, and returns 0 otherwise.

- - (BOOL)isResultId
  The isResultId method returns 1 if the return value of the message is of type object, and returns 0 otherwise.

Prev | Home | Next
EmptyProbeMap | Up | Probe