Bull DPX/20 Guida Utente Pagina 136

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 424
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 135
1-124 SOMobjects Base Toolkit: Programmers Reference Manual
somUnregisterClass Method
Purpose
Removes a class object from the SOM run-time class registry.
IDL Syntax
long somUnregisterClass (in SOMClass class);
Note: For backward compatibility, this method does not take an Environment parameter.
Description
The somUnregisterClass method unregisters a SOM class and frees the class object. If
the class was dynamically loaded, it is also unloaded using somUnloadClassFile (which
causes its entire affinity group to be unloaded as well).
Parameters
receiver Usually SOMClassMgrObject (or a pointer to an instance of a
user-supplied subclass of SOMClassMgr).
class A pointer to the class to be unregistered.
Return Value
The somUnregisterClass method returns 0 for a successful completion, or non-zero to
denote failure.
Example
#include <som.h>
void main ()
{
long rc; /* Return code */
SOMClass animalClass;
/* The next 2 lines declare a static form of somId */
string animalClassName = ”Animal”;
somId animalId = &animalClassName;
somEnvironmentNew ();
animalClass = SOMClassMgr_somFindClass (SOMClassMgrObject,
animalId, 0, 0);
if (!animalClass) {
somPrintf (”Could not load class.\n”);
return;
}
rc = SOMClassMgr_somUnregisterClass (SOMClassMgrObject,
animalClass);
if (rc)
somPrintf (”Could not unregister class, error code:
%ld.\n”,
rc);
else
somPrintf (”Class successfully unloaded.\n”);
}
Vedere la pagina 135
1 2 ... 131 132 133 134 135 136 137 138 139 140 141 ... 423 424

Commenti su questo manuale

Nessun commento