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 gets the value at the index i.
-> GetAt(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 |
int i;<br>for (i=0; i < ci-> pArgs -> GetCount();i++)<br>{<br>   pbuint ArgsType;<br>   if( ci -> pArgs -> GetAt(i) -> IsArray())   <br>      pArguments[i].array_val = <br>         ci -> pArgs -> GetAt(i) -> GetArray();<br>      continue;<br>   }<br> <br>   if( ci -> pArgs -> GetAt(i) -> IsObject()) <br>   {<br>      if (ci -> pArgs -> GetAt(i) -> IsNull()) <br>         pArguments[i].obj_val=0;<br>      else<br>         pArguments[i].obj_val = <br>            ci -> pArgs -> GetAt(i) -> GetObject();<br>      continue;<br>   }<br>   ... |
Document get from Powerbuilder help
Thank you for watching.
Subscribe
Login
0 Comments
Oldest