Creates and returns a new PODSPod
object. Allocates memory for the POD and tells M-Business Client about this POD. Your implementation may also perform any
other initialization functions that your POD requires.
Not part of any interface
Not applicable
Not applicable
PODSPod* PODSPodNew(PODSAvantGo* podsavantgo)
podsavantgo The PODSAvantGo
object.
None
This is a required function that must allocate enough memory for the PODSPod
structure. PODSPodNew( )
is where a POD would normally register any document sources, object sources, and event handlers. You may perform any other
necessary initialization tasks in this function. For example, if your server routinely accesses a database, you might set
up access to that database in this method. The simplest way of allocating memory is to make this call:
PODSPod* pod = (PODSPod *) MemPtrNew(sizeof(PODSPod)); |
Your POD may require more memory than the PODSPod
structure provides. For example, you might need to store the handle of an open database that the POD uses. In this case,
you can subclass PODSPod
by defining a structure that contains both the PODSPod
and the extra fields you need:
typedef MyPod { PODSPod base; UInt dbHandle; }; .... PODSPod* podSPodNew(PODSAvantGo*podsavantgo) { MyPod *pod = (MyPod *)MemPtrNew(sizeof(MyPod)); .... return (PODSPod *)pod; } |
To set up the POD’s function table, see Implementing the PODSObject object.
PODSObject
object's destroy( )
Send feedback about this page using email. | Copyright © 2008, iAnywhere Solutions, Inc. |