Bull DPX/20 Betriebsanweisung Seite 87

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 424
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 86
SOM Kernel Reference 1-75
somCheckVersion Method
Purpose
Checks a class for compatibility with the specified major and minor version numbers. Not
generally overridden.
IDL Syntax
boolean somCheckVersion (
In long majorVersion,
In long minorVersion);
Note: For backward compatibility, this method does not take an Environment parameter.
Description
The somCheckVersion method checks the receiving class for compatibility with the
specified major and minor version numbers. An implementation is compatible with the
specified version numbers if it has the same major version number and a minor version
number that is equal to or greater than minorVersion. The version number pair (0,0) is
considered to match any version.
This method is called automatically after creating a class object to verify that a dynamically
loaded class definition is compatible with a client application.
Parameters
receiver A pointer to the SOM class whose version information should be checked.
majorVersion This value usually changes only when a significant enhancement or
incompatible change is made to a class.
minorVersion This value changes whenever minor enhancements or fixes are made to a
class. Class implementors usually maintain downward compatibility across
changes in the minorVersion number.
Return Value
Returns 1 (true) if the implementation of this class is compatible with the specified major
and minor version number, and 0 (false) otherwise.
C Example
#include <animal.h>
main()
{
Animal myAnimal;
myAnimal = AnimalNew();
if (_somCheckVersion(_Animal, 0, 0))
somPrintf(”Animal IS compatible with 0.0\n”);
else
somPrintf(”Animal IS NOT compatible with 0.0\n”);
if (_somCheckVersion(_Animal, 1, 1))
somPrintf(”Animal IS compatible with 1.1\n”);
else
somPrintf(”Animal IS NOT compatible with 1.1\n”);
_somFree(myAnimal);
}
Seitenansicht 86
1 2 ... 82 83 84 85 86 87 88 89 90 91 92 ... 423 424

Kommentare zu diesen Handbüchern

Keine Kommentare