1 package wpiutl as
2 TYPE tvarchar IS table of varchar2(512) index by binary_integer;
3 TYPE tvchar3 IS table of VARCHAR2(3) index by binary_integer;
4 SUBTYPE ptnod IS pidl.ptnod;
5
6 -- Constant for errors
7 s_ok CONSTANT NUMBER := 0; -- successful
8 s_subpnotfound CONSTANT NUMBER := 1; -- subprogram NOT found
9 s_notinpackage CONSTANT NUMBER := 2; -- PACKAGE found, proc NOT found
10 s_notasub CONSTANT NUMBER := 3; -- found, but not a subprog
11 s_notunique CONSTANT NUMBER := 4; -- too many matches (overloading error)
12 s_nomatch CONSTANT NUMBER := 5; -- found, but param names not matched
13 s_typenotmatch CONSTANT NUMBER := 6; -- name match, type doesn't match
14
15 -- The following t_ constants can NOT exceed 999
16 t_scalar CONSTANT CHAR(3) := '000';
17 t_v7array CONSTANT CHAR(3) := '001';
18
19 -- subpparam:
20 -- IN: name name of the subprogram, package, or owner
21 -- subname name of subprogram if not null
22 -- prename name of owner if not null
23 -- pnames names of formal parameter
24 -- OUT: ptnames names of formal parameter types
25 -- ptypes characteristic of the types: scalar, V7_array, ...
26 -- status error code = s_ok : subprogram found
27 -- s_subpnotfound : not found in schema
28 -- s_notinpackage : not found in package
29 -- s_notasub : found, but not a subprog
30 -- s_notunique : too many matches.
31 -- s_nomatch : found, but no match
32 --
33 -- This function analyzes the following types of names:
34 -- <NAME>
35 -- <NAME>.<SUBNAME>
36 -- <PRENAME>.<NAME>.<SUBNAME>
37 -- It resolves overloading subprograms by parameter names (i.e. PNAMES),
38 -- and returns types of the parameters that are listed in pnames
39 -- <NAME> may not be NULL while prename and subname may.
40 --
41 -- pnames, ptnames, and ptypes are optional.
42 --
43 PROCEDURE subpparam(objnum NUMBER, name VARCHAR2, subname VARCHAR2,
44 prename VARCHAR2, status OUT NUMBER, misdef OUT VARCHAR2,
45 nename OUT VARCHAR2);
46 PROCEDURE subpparam(objnum NUMBER, name VARCHAR2, subname VARCHAR2,
47 prename VARCHAR2, pnames IN OUT tvarchar,
48 ptnames IN OUT tvarchar, ptypes IN OUT tvchar3,
49 status OUT NUMBER, misdef OUT VARCHAR2,
50 nename OUT VARCHAR2);
51
52 -- This is similar to subpparam but used for flexible parameter
53 -- Note: different from subpparam, pnames and ptypes are INput only
54 PROCEDURE subpfparam(objnum NUMBER, name VARCHAR2, subname VARCHAR2,
55 prename VARCHAR2, pnames IN tvarchar,
56 ptnames IN OUT tvarchar, ptypes IN tvchar3,
57 status OUT NUMBER, misdef OUT VARCHAR2,
58 nename OUT VARCHAR2);
59 end;