Bull DPX/20 Uživatelská příručka Strana 121

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 424
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 120
SOM Kernel Reference 1-109
C Example
#include <som.h>
/*
* This program creates a class object
* (from a DLL) without requiring the
* usage binding file (.h or .xh) for
* the class.
*/
void main ()
{
SOMClass myClass;
somId animalId;
somEnvironmentNew ();
animalId = somIdFromString (”Animal”);
/* The next statement is equivalent to:
* #include ”animal.h”
* myClass = AnimalNewClass (0, 0);
*/
myClass = SOMClassMgr_somFindClass (SOMClassMgrObject,
animalId, 0, 0);
if (myClass)
somPrintf (”myClass: %s\n”, SOMClass_somGetName
(myClass));
else
somPrintf (”Class %s could not be dynamically loaded\n”,
somStringFromId
(animalId));
SOMFree (animalId);
}
This program produces the following output:
myClass: Animal
Original Class
SOMClassMgr
Related Information
Methods: somFindClsInFile, somLocateClassFile
Zobrazit stránku 120
1 2 ... 116 117 118 119 120 121 122 123 124 125 126 ... 423 424

Komentáře k této Příručce

Žádné komentáře