This chapter describes the KCMS framework KcsProfileFormat class. With the KcsProfileFormat class interface you can map a profile from a static store into the traditional objects that make up a profile. The KcsProfileFormat class is derived from the KcsLoadable class. See Chapter 4, KcsLoadable Class for a description of the KcsLoadable class.
As you read this chapter, you will find it helpful to have access to the following header files:
kcspfmt.h
kcsload.h and kcsxform.h
kcsattr.h
The header file for the class is kcspfmt.h. The constant and #define identifiers for this class are defined in the kcsids.h header file as:
const KcsId KcsLoadPfmtId = {(0x50666D74UL)}; /* 'Pfmt' */ #define KcsLoadPfmtIdd (0x50666D74UL) /* 'Pfmt' */
In addition to the KcsLoadable methods overridden by this class, there are methods for mapping data in static store into profiles comprised of objects. The protected and public members are described, as well as the member function override rules when deriving from this class.
The KcsProfileFormat class has the following protected members.
Table 6-1 KcsProfileFormat Protected Members
The KcsProfileFormat class has the following public members.
Table 6-2 KcsProfileFormat Public Members
The following table tells you which KcsProfileFormat member functions you must override and can override when deriving from this class. The member functions indicated with an "X" in the Must column are required to successfully derive from this base class. Others can be used but not overridden.
Table 6-3 KcsProfileFormat Member Function Override Rules
Member Function |
Override Rules |
|
---|---|---|
Must |
Can |
|
deleteXform() |
|
X |
dirtyAttrCache() |
|
X |
dirtyXformCache() |
|
X |
generateLoadWhat() |
|
X |
generateXformAttributes() |
|
X |
getObject() |
|
X |
getSaveSize() |
|
X |
initEmptyFormat() |
|
X |
isSupported() |
|
X |
KcsProfileFormat() |
X |
|
~KcsProfileFormat() |
|
X |
load() |
|
X |
loadObjectMap() |
|
X |
postAttrCompose() |
|
X |
save() |
|
X |
saveNew() |
|
X |
saveObjectMap() |
|
X |
setCmmId() |
|
X |
setObject() |
|
X |
unload() |
|
X |
unloadWhenMatch() |
|
X |
All KcsProfileFormat derivatives support runtime derivability. The base class supports the static createX(UID)() method like many of the other classes in the KCMS framework. It also supports createProfileFormat(KcsVersion)() for creation of new profile formats.
static KcsProfileFormat *createProfileFormat( KcsStatus *aStat, KcsIO *aIO); // Create a profile format given a chunkSet that has // already been created. static KcsProfileFormat *createProfileFormat( KcsStatus *aStat, KcsId aCmmId, KcsVersion aCmmVersion, KcsId aProfId, KcsVersion aProfVersion); // Create a new profile format of a given version. |
See the KCMS CMM Developer's Guide for more information on creating a KcsProfileFormat runtime derivative.