KCMS CMM Reference Manual
この本のみを検索
PDF 文書ファイルをダウンロードする

KcsProfileFormat Class

6

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.

Protected Members

The KcsProfileFormat class has the following protected members.
Table 6-1 KcsProfileFormat
Protected MemberDescription
virtual KcsStatus
deleteXform(KcsXformType aXfType);
Deletes the transforms.
KcsProfileFormat(KcsStatus *aStat, KcsIO *KcsIO, int Format = 0);Constructor that takes a KcsIO object to construct the appropriate profile format.
KcsProfileFormat(KcsStatus *aStat,
KcsId aCmmId,KcsVersion aCmmVersion,
KcsId aProfId, KcsVersion aProfVersion);
Constructor. Takes a profile version and
creates a blank profile format.
virtual KcsStatus
loadObjectMap(const KcsLoadHints aHints =
KcsLoadAllNow,
KcsCallbackFunction aCallback = NULL);
Loads the profile format's objects mapped
to chunk Ids.
virtual KcsStatus saveObjectMap();Saves profile format's objects mapped to chunk Ids.

Public Members

The KcsProfileFormat class has the following public members.
Table 6-2 KcsProfileFormat
Public MemberDescription
static KcsProfileFormat *
createProfileFormat(KcsStatus *aStat, KcsIO *aIO);
Creates a profile format object from a
KcsIO object.
static KcsProfileFormat *

createProfileFormat(KcsStatus *aStat, KcsId aCmmId, KcsVersion aCmmVersion, KcsId aProfId, KcsVersion aProfVersion);

Creates a profile format object from CMM and profile information.
virtual void
dirtyAttrCache();
Caches an attribute that has changed.
virtual void

dirtyXformCache(KcsXformType aXformId);

Caches an Xform that has changed.
Table 6-2 KcsProfileFormat(Continued)
Public MemberDescription
KcsLoadHints generateLoadWhat(
const KcsXformType aXfType) const;
Returns the load hint associated with this
KcsXformType.
virtual KcsAttributeSet *

generateXformAttributes(KcsStatus *aStat, KcsXformType aXfType);

Generates attributes associated with a KcsXform.
virtual KcsStatus getCmmId(KcsId *);Returns a CMM Id.
virtual KcsStatus
getObject(KcsAttributeSet **aAttr,
KcsCallbackFunction aFunc = NULL);
Gets the KcsAttributeSet of the format.
virtual KcsStatus
getObject(KcsXform **aXform, KcsXformType aXformId,
KcsCallbackFunction aFunc = NULL);
Returns the KcsXform that represents the
aXformID operation.
virtual long getSaveSize();Returns the number of bytes to be saved.
static KcsId
getTheCMMId(KcsStatus *aStat, KcsIO *aIO);
Gets the CMM identifier for the KcsIO
object.
static KcsVersion
getTheCMMVersion(KcsStatus *aStat, KcsIO *aIO);
Gets the CMM version for the KcsIO
object.
static KcsId
getTheProfileFormat(KcsStatus *aStat, KcsIO *aIO);
Gets the profile format using the KcsIO
object.
static KcsVersion
getTheProfileVersion(KcsStatus *aStat, KcsIO *aIO);
Gets the profile version using the KcsIO
object.
virtual long getSaveSize();Returns the number of bytes needed to save the profile.
virtual KcsStatus
initEmptyFormat(KcsIdent aCMMId =
KcsKodakColorSenseCMM);
Initializes profile's static store to an initial
state.
virtual KcsStatus isSupported(KcsLoadHint aHints);Returns whether the object(s) associated with aHints is supported by this profile instance.
KcsProfileFormat(KcsStatus *aStat);Constructor.
virtual ~KcsProfileFormat(void);Destructor.
Table 6-2 KcsProfileFormat(Continued)
Public MemberDescription
virtual KcsStatus
postAttrCompose(KcsTags *aOwningAttrSet,
const long aCount, KcsTags **aOrigSequence);
Builds ICC profile sequence description
tag.
virtual KcsStatus
save();
Saves all objects associated with this
profile format.
virtual KcsStatus
saveNew(KcsChunkSet *);
Saves using a different chunk set .
virtual KcsStatus setCmmId(KcsId);Sets the CMM Id.
virtual KcsStatus
setObject(KcsAttribute *aAttr);
Sets KcsAttribute to the set of attributes
to save in this profile's format.
virtual KcsStatus
setObject(KcsXformType aXformId, KcsXform *aXform);
Sets the KcsXformType to the KcsXform
class aXform.
virtual KcsStatus
unloadWhenMatch(KcsLoadHints aMatchHints =
KcsUnloadAfterUse);
Unloads the profile objects associated with
aMatchHints, if they match the last hints
supplied to unload(). Unloads the correct
data automatically. Helps recover memory
(call it with
KcsUnloadWhenNecessary()).

Member Function Override Rules

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 FunctionOverride Rules

Must..Can

deleteXform()
X
dirtyAttrCache()
X
dirtyXformCache()
X
Table 6-3 KcsProfileFormat(Continued)
Member FunctionOverride Rules

Must..Can

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

External Loadable Interface

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.