Bull DPX/20 Guida Utente Pagina 299

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 424
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 298
2-131
DSOM Framework Reference
change_id Method
Purpose
Changes the reference data associated with an object.
IDL Syntax
void change_id (
in SOMDObject objref,
in ReferenceData id );
Description
The change_id changes the ReferenceData associated with the object identified by objref.
The ReferenceData previously stored in the SOMOAs reference data table is replaced with
the value of id. The new ID cannot be larger than the maximum size of the original
ReferenceData (usually specified as 1024 bytes).
Parameters
receiver A pointer to the SOMOA object managing the implementation.
env A pointer to the Environment structure for the method caller.
objref A pointer to the SOMDObject which identifies the object.
id A pointer to the ReferenceData structure representing the object to be
created.
Example
#include <somd.h>
#include <repostry.h>
#include <intfacdf.h>
Environment ev;
ReferenceData id;
InterfaceDef intfdef;
SOMDObject objref;
string fname; /* 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_constant(SOMD_SOMOAObject,
&ev, id, intfdef, SOMD_ImplDefObject);
Vedere la pagina 298
1 2 ... 294 295 296 297 298 299 300 301 302 303 304 ... 423 424

Commenti su questo manuale

Nessun commento