pbsig125
Description
The PowerBuilder function signature is the internal signature of a PowerBuilder function that is used to identify polymorphism functions in a class. The pbsig125 tool obtains these function signatures from a PBL.
You can also obtain a signature by selecting the function in the System Tree or Browser and selecting Properties from its pop-up menu. The pbsig125 tool does not report the signature of functions that are inherited from an ancestor object unless they are extended in the descendant. For such functions, you must use the Properties dialog box to obtain the signature. The Properties dialog box in the Browser also allows you to obtain the signature of PowerBuilder system functions.
Syntax
pbsig125 pbl_name
Examples
This command extracts function signatures from one of the PBLs in the Code Examples sample application:
pbsig125 pbexamw1.pbl
Here is some of the output from the previous command:
PB Object Name: w_date_sort
public subroutine of_sort (string as_Column,
string as_Order)
/* QSS */
PB Object Name: w_date_window
public function boolean of_is_leap_year
(integer ai_year)
/* BI */
public subroutine of_days ()
/* Q */
PB Object Name: w_dde_server
public subroutine check_hotlink (checkbox status,
string data, string item)
/* QCcheckbox.SS */
PB Object Name: w_dir_treepublic function integer wf_collapse_rows (datawindow
adw_datawindow, long al_startrow)
/* ICdatawindow.L */
public function long of_recurse_dir_list (string
as_path, long al_parent)
/* LSL */
public function string of_build_dw_tree
(long al_handle)
/* SL */
The following example illustrates the use of a letter code to represent a PowerBuilder system class or a custom class. Consider this function:
function integer of_get_all_sales_orders (Ref s_sales_order astr_order[], date adt_date, integer ai_direction)
For this function, the pbsig125 tool returns the following string. The first argument is an unbounded array of type s_sales_order and is passed by reference:
/* IRCs_sales_order.[]YI */
Usage
The pbsig125 tool generates a string that
represents the declaration and signature of all the functions and
events in the PBL, including argument types, return types, and passing
style. Each function and event is followed by a commented string.
You pass the commented string, for example, QSS
in
the first comment in the previous example, as the last argument
to the GetMethodID method.
For example, the following output indicates that the function returns an integer and has a single integer argument passed by reference:
/* IRI */
PowerBuilder arrays
PowerBuilder arrays are indicated with a pair of square brackets [ ] as a suffix. For bounded arrays, the brackets enclose the bounds.
/* IRCdatastore.RS[]SS */
PowerBuilder system or custom class
Additional letter codes represent a PowerBuilder system class
or a custom class. The letter C followed by the name of a PowerBuilder
object or enumerated class and a period (Cname.
) represents
an argument or return value of that type.
The following table shows how the output from pbsig125 maps to datatypes and other entities.
Output |
Datatype |
---|---|
[ ] |
array |
A |
any |
B |
boolean |
C |
class |
D |
double |
E |
byte |
F |
real |
G |
basictype |
H |
character |
I |
integer |
J |
cursor |
K |
longlong |
L |
long |
M |
decimal |
N |
unsigned integer (uint) |
O |
blob |
P |
dbproc |
Q |
No type (subroutine) |
S |
string |
T |
time |
U |
unsigned long (ulong) |
W |
datetime |
Y |
date |
Z |
objhandle |
The passing style is indicated by a prefix on the type.
Prefix |
Meaning |
---|---|
None |
Pass by value |
R |
Pass by reference |
X |
Pass as read only |
V |
Variable arguments (varargs) |