KCMS CMM Developer's Guide

External Entry Points

You need to provide the KCMS framework with an external entry point to load each of your derivatives as an executable. The symbols are loaded and the derivative is called by the framework to access your derivative's functionality.

The types of entry points for a runtime derivative are:

In the paragraphs that follow, XXXX refers to the base class identifier from which it is being derived. XXXX can only have the following values:

Mandatory

For each runtime derivative, you must supply a C-based variable and an external entry point. Respectively, these are:


Note -

The KcsDLOpenStatusCount()()variable is the only requirement for extending the KcsStatus class.


KcsDLOpen()XXXXCount()()

extern

long

KcsDLOpen()XXXXCount();

KcsDLOpen()XXXXCount()()is the number of times the shareable object was opened. It is equivalent to the number of times the shareable object is being shared. The CMM should not set this variable. It is controlled by the KCMS framework.

KcsCreate()XXXX()()

KcsXXXX

*KcsCreateXXXX(KcsStatus *,

XXXX creation

args);

KcsCreate()XXXX()() is one of possibly many creation entry points. This entry point maps directly to the static create()XXXX()() methods of the base class from which it is being derived. The arguments following KcsStatus * are specific to the base class and are described in the appropriate class chapter. See the chapters describing the KcsIO, KcsProfile, KcsProfileFormat, and KcsXform classes (Chapter 4, KcsIO Derivative through Chapter 7, KcsXform Derivative , respectively). The CMM must support all declared create()XXXX()() methods; otherwise, applications receive CMM errors from calls to load()().

Optional

Runtime derivatives can supply the following external entry points:


Note -

It is highly recommended that you use the KcsInit()XXXX()() entry point to verify the version of the versions so that your CMM can use the profile data properly.


KcsInit()XXXX()()

KcsStatus

KcsInit()XXXX(long libMajor,

long libMinor,  		long *myMajor, long

*myMinor);

If you supply the KcsInit()XXXX()()entry point, the KCMS framework calls it when the shareable object is loaded for the first time. This initializes and derives private allocations before any creation method is called. KcsInit()XXXX()() checks for minor version numbering. See "Configuration Requirements" for more information.

KcsCleanup()XXXX()()

KcsStatus

KcsCleanup()XXXX()();

If you supply the KcsCleanup()XXXX()()entry point, the KCMS framework calls it when the shareable object is unloaded for the last time (when KcsDLOpen()XXXXCount = 0()). This cleans up shareable objects when they are no longer needed.

Base-Class Specific

Each base class also provides additional necessary and optional entry points. See the chapters describing the KcsIO, KcsProfile, KcsProfileFormat, and KcsXform classes (Chapter 4, KcsIO Derivative through Chapter 7, KcsXform Derivative , respectively), for detailed explanations.