IPB_Value interface

PowerBuilder Native Interface

IPB_Value interface

Helper methods

virtual pbclass          GetClass() const = 0;
virtual pbint              GetType() const = 0;
virtual pbboolean     IsArray() const = 0;
virtual pbboolean     IsObject() const = 0;
virtual pbboolean     IsByRef() const = 0;
virtual pbboolean     IsNull() const = 0;
virtual PBXRESULT   SetToNull() = 0;
if ( ci->pArgs->GetAt(0)->IsNull() ||
   ci->pArgs->GetAt(1)->IsNull() )
   {
// if either of the passed arguments is null,
// return the null value
ci->returnValue->SetToNull();

Set methods

virtual PBXRESULT Set<type>(<pbtype> arg);
ci-> pArgs -> GetAt(0) -> SetInt(int_val1);
ci-> pArgs -> GetAt(1) -> SetInt(int_val2);

Get methods

virtual <pbtype> Get<type>( ); 
PBCallInfo   *ci
...
pblong longval = NULL;
IPB_Value* pArg = ci-> pArgs-> GetAt(0);
   
if (!pArg->IsNull())
   longval = pArg -> GetLong();
ret_val = ci.returnValue->GetInt();
return ret_val;