KCMS CMM Developer's Guide

Example

*aStat

= KcsLoadable::LoadCreator(Kcs2Id('P', 'f', 'm', 't'),  Kcs2Id('K', 'C', 'M',

'S'), Kcs2Id('0', '1', '\0', '\0'),  Kcs2Id('B', 'l', 'n', 'k'),  (void *

(**)())&sCreateFunction,

&sDLHandle);

This LoadCreator()() example returns a function pointer in sCreateFunction that is cast and called with the arguments as follows:

KcsProfileFormat::KcsProfileFormat(KcsStatus

*aStat,  	KcsId aCmmId, KcsVersion aCmmVersion, KcsId aProfileId,  	KcsVersion

aProfVersion)

KcsEkPfmticc30.so.1 is a KcsProfileFormat derivative whose method's object code is contained in the file mapped from the arguments to the LoadCreator()() method. The B, l, n, and k arguments are qualifiers for the constructor to use. In this case it is the Id-based constructor that generates a blank profile format. This call makes runtime loadabilty of derivatives platform independent. If aDerivId is a non-ASCII printable character, it is treated as BCD for these reasons: the ICC identifies their versions in BCD, and the runtime derivatives naming conventions need to conform to file naming conventions. Therefore, the operating system cannot use anything nonprintable to name files. If available, the method calls the initialization entry points upon the first load of the sharable. Currently, when an object is loaded, it is not unloaded until the program exits. The dlopen(3x) call returns a pointer to the same handle when it is opened.