SomLocateClassFile: Difference between revisions
Created page with "{{DISPLAYTITLE:somLocateClassFile}} This method determines the file that holds a class to be dynamically loaded. For backward compatibility, this method does not take an Envi..." |
mNo edit summary |
||
Line 7: | Line 7: | ||
==Syntax== | ==Syntax== | ||
string somLocateClassFile (SOMClassMgr receiver, somId classId, | |||
string somLocateClassFile (SOMClassMgr receiver, somId classId, | long majorVersion, long minorVersion) | ||
long majorVersion, long minorVersion) | |||
==Parameters== | ==Parameters== | ||
; | ;receiver (SOMClassMgr) : Usually SOMClassMgrObject (or a pointer to an instance of a user-supplied subclass of SOMClassMgr). | ||
;classId (somId) : The somId representing the name of the class to locate. | |||
; classId (somId) : The somId representing the name of the class to locate. | ;majorVersion (long) : The major version number used to check the compatibility of the class's implementation with the caller's expectations. | ||
;minorVersion (long) : The minor version number used to check the compatibility of the class's implementation with the caller's expectations. | |||
; majorVersion (long) : The major version number used to check the compatibility of the class's implementation with the caller's expectations. | |||
; minorVersion (long) : The minor version number used to check the compatibility of the class's implementation with the caller's expectations. | |||
==Return Code== | ==Return Code== | ||
; | ;rc (string) : Returns the name of the file containing the class. | ||
==Remarks== | ==Remarks== | ||
Line 30: | Line 25: | ||
==Example Code== | ==Example Code== | ||
==Related== | ==Related== |
Latest revision as of 16:37, 12 October 2022
This method determines the file that holds a class to be dynamically loaded.
For backward compatibility, this method does not take an Environment parameter.
- Original Class
- SOMClassMgr
Syntax
string somLocateClassFile (SOMClassMgr receiver, somId classId, long majorVersion, long minorVersion)
Parameters
- receiver (SOMClassMgr)
- Usually SOMClassMgrObject (or a pointer to an instance of a user-supplied subclass of SOMClassMgr).
- classId (somId)
- The somId representing the name of the class to locate.
- majorVersion (long)
- The major version number used to check the compatibility of the class's implementation with the caller's expectations.
- minorVersion (long)
- The minor version number used to check the compatibility of the class's implementation with the caller's expectations.
Return Code
- rc (string)
- Returns the name of the file containing the class.
Remarks
The SOMClassMgr object uses the somLocateClassFile method when executing somFindclass to obtain the name of a file to use when dynamically loading a class. The default implementation consults the Interface Repository for the value of the dllname modifier of the class; if no dllname modifier was specified, the method simply returns the class name as the expected filename.
If you override the somLocateClassFile method in a user-supplied subclass of SOMClassMgr, the name you return can be either a simple, unqualified name without any extension or a fully-qualified file name. Generally speaking, you would not invoke this method directly. It is provided to permit customization of subclasses of SOMClassMgr through overriding.