The getMethod()
method returns a pointer to a function that implements a PODS method. To implement getMethod()
, simply compare the requested method's name with each method name the object supports. For example:
static PODSMethod SampleObjectGetMethod(PODSObject *podsObj, PODSString methodName, PODSString *methodSignature) { if (0 == strcmp(methodName, "add")) { *methodSignature = "ii_i"; return (PODSMethod)SampleObjectAdd; } if (0 == strcmp(methodName, "destroy")) { *methodSignature = ""; return (PODSMethod)SampleObjectDestroy; } return NULL; } |
For information on the values that getMethod()
returns, see Type strings returned by getMethod( ).
Send feedback about this page using email. | Copyright © 2008, iAnywhere Solutions, Inc. |