Go to the first, previous, next, last section, table of contents.


Selectors

In the runtime, not only in the C world, a selector is identifyable by a string which is called the selector's name. Such a name consists of the various name parts and an abbreviated form of the types involved. The abbreviated type names are:

 v      void
 o      boolean
 b      byte
 c      char
 i      int
 l      long
 f      float
 d      double
 p      pointer
 s      selector
 r      object reference
 x      dynamic

The following table shows examples: for several method declarations the name of the corresponding selector.

[Note: I should write down the grammar for this, but I'm too lazy. End note.]

int value;
"i_value"
void setValue float d;
"v_setValue_d"
(Foo) bar (int, double) (a, b) with: int c = 0;
"r_bar_(id)_with:_i"

In C, a selector is defined by a struct; The struct selector is the direct implementation of the TOM selectors.

typedef struct selector
{
  unsigned int sel_id;

  struct name name;

  struct trt_selector_args *in, *out;
} *selector;
sel_id
This is the unique numeric identity of a selector. All selectors have such an identity in the closed enumeration of all selectors. Every two selectors with identical name, argument types and return types have the same identity. If no dynamic loading has taken place, the following is true for any two selectors a and b:
a->sel_id == b->sel_id <-> a == b.
name
the name of the selector. This has two fields: s being the zero terminated string, and len being its length.
in
out
the selector argument descriptions for the arguments to (in) and return value from (out) methods denoted by this selector.


Go to the first, previous, next, last section, table of contents.