2-19
DSOM Framework Reference
Return Value
The create method returns a pointer to a SOMDObject which refers to a local application
object.
Example
#include <somd.h>
#include <repostry.h>
#include <intfacdf.h>
Environment ev;
ReferenceData id;
InterfaceDef intfdef;
SOMDObject objref;
string fname; /* a file name to be saved with reference */
...
/* create the id for the reference */
id._maximum = id._length = strlen(fname)+1;
id._buffer = (string) SOMMalloc(strlen(fname)+1);
strcpy(id._buffer,fname);
/* get the interface def object for interface Foo*/
intfdef = _lookup_id(SOM_InterfaceRepository, &ev, ”Foo”);
objref = _create(SOMD_SOMOAObject,
&ev, id, intfdef, SOMD_ImplDefObject);
...
Original Class
BOA
Related Information
Methods: change_id, create_constant, create_SOM_ref, dispose, get_id
Commenti su questo manuale