Type strings returned by getMethod( )

Parameter type strings returned by getMethod( ) consist of:

  • One character indicating the type of each method parameter

  • An underscore (_)

  • A character indicating the type of the return value

If a method returns no value, the underscore may be omitted.

The characters that indicate method parameter types are listed in the table below. The data types represented are detailed in the sections that follow.

Table 1. Characters indicating method parameter types

Character

PODS data type*

Default Value

a
PODSArray
NULL
I
PODSInt32
0
I
PODSInt16
0
s
PODSString

(not NULL)

""
S
PODSString

(may be NULL)

NULL
b
PODSBoolean
PODS_FALSE
B
PODSBoolean
PODS_TRUE
o
PODSObject
NULL
d
PODSDate
0
f
PODSDouble
0.0
u
PODSUInt32
0
U
PODSUInt16
0
v
PODSVariant
NULL
V

Variable number of arguments

* For more information on these data types, see PODS data types.

Below are some examples of parameter type strings that could be returned by getMethod( ):

  • "ss_i" indicates that a method takes two PODSString parameters and returns a PODSInt32.

  • "_o" indicates that a method takes no parameters and returns a (PODSObject *).

  • "sib" indicates that a method takes a PODSString, a PODSInt32, and a PODSBoolean as parameters and returns no value (the method call returns the undefined value to JavaScript).

    Note

    Remember that a C function that implements a PODS method takes, as its first parameter, a pointer to the object on which method is being invoked. This pointer is not considered a method parameter and does not appear in the type string.