Bull DPX/20 Betriebsanweisung Seite 131

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 424
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 130
SOM Kernel Reference 1-119
C Example
/*
* The following example is a hypothetical
* implementation of an override of the somNew method
* in a subclass of SOMClassMgr. It illustrates the
* proper use of the somMergeInto method.
*/
SOM_Scope SOMAny * SOMLINK somNew (MySOMClassMgr somSelf)
{
SOMAny *newInstance;
static int firstTime = 1;
/*
* Permit only one instance of MySOMClassMgr to be created.
*/
if (!firstTime)
return (SOMClassMgrObject);
newInstance = parent_SOMClassMgr_somNew (somSelf);
/*
* The next line will transfer the class registry
* information from SOMClassMgrObject into our
* new instance.
*/
_somMergeInto (SOMClassMgrObject, newInstance);
/* As a result of the above operation
* SOMClassMgrObject is now set to point to the
* new instance of MySOMClassMgr.
*/
firstTime = 0;
return (newInstance);
}
Original Class
SOMClassMgr
Seitenansicht 130
1 2 ... 126 127 128 129 130 131 132 133 134 135 136 ... 423 424

Kommentare zu diesen Handbüchern

Keine Kommentare