IPB_Arguments interface
The IPB_Arguments interface has two methods:
-
GetCount obtains the number of arguments in a method
call. -
GetAt obtains the value at a specific index of the
pArgs member of the PBCallInfo structure. For each argument,
GetAt returns a pointer to the IPB_Value interface.
The following code fragment uses GetCount and GetAt in a FOR loop
to process different argument types. The ci-> pArgs ->
GetCount()statement gets the number of arguments, and ci -> pArgs
-> GetAt(i) gets the value at the index i. This value is a pointer to
the IPB_Value interface on which IPB_Value methods, such as IsArray and
GetArray, can be called (see IPB_Value
interface):
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
int i; for (i=0; i < ci-> pArgs -> GetCount();i++) { pbuint ArgsType; if( ci -> pArgs -> GetAt(i) -> IsArray()) pArguments[i].array_val = ci -> pArgs -> GetAt(i) -> GetArray(); continue; } if( ci -> pArgs -> GetAt(i) -> IsObject()) { if (ci -> pArgs -> GetAt(i) -> IsNull()) pArguments[i].obj_val=0; else pArguments[i].obj_val = ci -> pArgs -> GetAt(i) -> GetObject(); continue; } ... |
Document get from Powerbuilder help
Thank you for watching.
Subscribe
Login
0 Comments
Oldest