|
| 以 PDF 格式下载本书
KcsTags Class
7
- This chapter describes the KcsTags class of the KCMS framework. This class provides numerous data members used throughout the KCMS framework and for use in your CMM.
-
Note - KcsAttributeSet is an alias to the KcsTags class. This is for historical reasons only.
- As you read this chapter, you will find it helpful to have access to the kcstags.h header file.
-
Note - It is highly recommended that you do not use any of the variables and functions for handle-based memory in the these header files. Handle-based memory is not required on the Solaris system.
- The #define identifiers for this class are defined in the kcstags.h header file as:
-
-
#define KcsAttributeSet KcsTags
- In addition to the KcsLoadable methods overridden by this class, there are data members used throughout the KCMS framework and for use in your CMM. There are no protected members; the public members are described in detail.
Public Members
- The KcsTags class provides the following public members.
-
Table 7-1 KcsTags
| Public Member | Description |
| KcsAttributeSet *copy(KcsStatus *status); | A non-shared copy of the object. |
static KcsTags *
createAttributeSet(KcsStatus *status); | Creates a blank attribute set. |
static KcsTags *
createAttributeSet(KcsChunkSet *ChunkSet,
KcsStatus *status); | Creates an attribute set from a chunk set. |
static KcsTags *
createAttributeSet(KcsStatus *aStat,
KcsChunkSet *aCS,
KcsChunkId aChunkId); | Creates an attributes set from a chunk set and chunk Id. |
KcsStatus
getAttribute(KcsAttributeName tag,
KcsAttributeValue *value,
KcsAliasUsage aAliasUse =
KcsIndirectThroughAlias); | Given a valid tag, loads the value. |
| static KcsStatus
getAttributeInfo(KcsAttributeName aTag, KcsAttributeType *aType, unsigned long *count, unsigned long *sizeOfType, KcsTags *tags = NULL);
| Given a valid aTag, populates the supplied parameters with the type and the count (the number of tokens that make up the attribute) of the attribute associated with the supplied aTag. |
| static unsigned long
getAttrSize(KcsAttributeType aTagType);
| Returns the size in bytes of the tag type. |
| static unsigned long
getAttrSize(KcsAttributeValue *aVal);
| Returns the attribute size. |
static long
getICProfSeqDescInfo(
icProfileSequenceDesc *aDesc,
icDescStruct **aDescPtrs,
long nPtrs); | Returns information about an ICC profile sequence
description. |
-
Table 7-1 KcsTags(Continued)
| Public Member | Description |
| static long getICTextDescInfo( icTextDescription *aDesc, long *aASCIILength = NULL, icUInt8Number **aASCIIPtr = NULL, icInt32Number *aUniCodeCode = NULL, long *aUniCodeLength = NULL, icInt8Number **aUniCodePtr = NULL, icInt16Number *aScriptCodeCode = NULL,
long *aScriptCodeLength = NULL, icInt8Number **aScriptCodePtr = NULL);
| Given an ICC text description, returns the parameters contained in it. |
static long
KcsTags::getICTextDescSize(
long aASCIILength,
long aUniCodeLength,
long aScriptCodeLength); | Returns the size of an ICC text description tag. |
| static long
getICUcrBgCounts(icUcrBg *aUcrBg, icUInt32Number *aUcrCount = NULL, icUInt32Number *aBgCount = NULL);
| Returns the number of xxx in an ICC Ucr Bg curve. |
| unsigned long getLargestAttrValSize(); | Returns the size of the largest attribute. |
KcsStatus
getTag(long ordinal,
KcsAttributeName *aTag); | Sets the parameter aName to the ordinal'th tagName in the
internal tag array pointed to by the member handle
tagHandle. |
| virtual Boolean
isReadOnly(KcsAttributeName name);
| Returns true if an attributre is read only. Read-only attributes are: icSigNumTag, icSigListTag, KcsAttrNumber, KcsAttrAttributesSet, and
KcsPixelLayoutSupported.
|
KcsStatus
KcsAttrCompose(const long count,
KcsTags **sequence); | Given a count and a sequence of KcsAttributeSet objects,
combines the attributes according to the rules in the current
KcsAttributeSet object and populates it's attributes
accordingly. See the ICC Specification for the profile sequence
tag. |
typedef enum {
/* ... */
} KcsAttribute; | Listed separately in Code Example 7-1 on page 52; see that
table for a full definition. |
-
Table 7-1 KcsTags(Continued)
| Public Member | Description |
KcsStatus
KcsClassify(const long count,
KcsTags **sequence,
KcsAttributeName tag); | Attribute composition rule. Classifies the tags. |
KcsStatus
KcsCommon(const long count,
KcsTags **sequence,
KcsAttributeName tag); | Attribute composition rule. Returns status on whether there
are common attributes in two profiles. |
KcsStatus
KcsConcatenate(const long count,
KcsTags **sequence,
KcsAttributeName tag); | Attribute composition rule. Concatenates tags. |
KcsStatus
KcsNever(const long count,
KcsTags **sequence,
KcsAttributeName tag); | Attribute composition rule. Attribute composition never
propagates. |
KcsTags(KcsChunkSet *ChunkSet,
KcsChunkId chunkId,
KcsStatus *status)); | Allows you to create an attribute's object from a chunk. A
chunk constructor. |
KcsTags(char *buffer,
unsigned long sizeOfBuf,
KcsStatus *status); | Allows a user to create an attribute's object from data found in
the character buffer supplied as an input parameter. A
character buffer constructor |
| KcsTags(KcsStatus *status); | Constructor that allows a user to create an empty attributes object. |
| ~KcsTags(); | Destructor. |
KcsStatus
KcsUseCSInRight(const long count,
KcsTags **sequence,
KcsAttributeName tag); | Composition rule. |
KcsStatus
KcsUseLeft(const long count,
KcsTags **sequence,
KcsAttributeName tag); | Composition rule. |
-
Table 7-1 KcsTags(Continued)
| Public Member | Description |
KcsStatus
KcsUseRight(const long count,
KcsTags **sequence,
KcsAttributeName tag); | Composition rule. |
| long
returnCurrentNumberOfAttributes(void);
| Returns the current number of attributes stored in the attribute array. |
| KcsStatus save(); | Saves the attributes. |
| KcsStatus saveTags(); | Saves the tags. |
| KcsStatus
setAttribute(KcsAttributeName aName, void *data);
| Stores an association of name-to-attribute in the attribute array. |
| KcsStatus
setAttribute(KcsAttributeName tag, void *data);
| Stores an association of tag-to-attribute in the attribute array. |
| KcsStatus
setAttribute(KcsAttributeName tag, KcsAttributeType aType, const char *value);
| Stores an association of tag-to-attribute in the attribute array. The information is supplied in a character string. |
KcsStatus
setAttribute(KcsAttributeName tag,
const KcsAttributeValue *value,
KcsAliasUsage aAliasUse =
KcsIndirectThroughAlias); | Stores an association of tag-to-attribute in the attribute
array.If you use the KcsAttributeValue structure as a
parameter and pass in NULL as its value, the attribute will be
deleted if it is stored; otherwise an error is returned. |
| static long
KcsTags::setICTextDesc( icTextDescription *aDesc, long aSize, icUInt32Number aASCIILength = 1, icUInt8Number *aASCIIPtr = NULL, icUInt32Number aUniCodeCode = 0, icUInt32Number aUniCodeLength = 1, icUInt8Number *aUniCodePtr = NULL, icUInt16Number aScriptCodeCode = 0, icUInt8Number aScriptCodeLength = 1, icUInt8Number *aScriptCodePtr = NULL);
| Puts the various arguments into an ICC text description structure. |
KcsAttribute Public Member
- The following code is the KcsAttribute public member definition.
-
Code Example 7-1 KcsAttribute Public Member Definition
-
#define KcsAttrRangeStart0
#define KcsIllegalTagId (KcsAttrRangeStart-1)
typedef enum {
KcsAttrBitsIn = KcsAttrRangeStart +1, /* Precision of Input Data */
KcsAttrBitsOut = KcsAttrRangeStart +2, /* Precision of Output Data */
KcsAttrClass = KcsAttrRangeStart +3, /* Class of this profile */
KcsAttrCopyright= KcsAttrRangeStart +4, /* Copyright String */
KcsAttrCreator = KcsAttrRangeStart +5, /* Profile manufacturer string */
KcsAttrDescription= KcsAttrRangeStart +6, /* Profile description string */
KcsAttrEffectType = KcsAttrRangeStart +7, /* Profile type if it is an effect profile */
KcsAttrIllumIn = KcsAttrRangeStart +8, /* Enum for illuminant type of input */
KcsAttrIllumOut = KcsAttrRangeStart +9, /* Enum for illuminant type of output */
KcsAttrInternational = KcsAttrRangeStart +10, /* Enum for character set type. */
KcsAttrVersion = KcsAttrRangeStart +11, /* Profile version string */
KcsAttrSpaceIn = KcsAttrRangeStart +12, /* Enum of input color space */
KcsAttrSpaceOut = KcsAttrRangeStart +13, /* Enum of output color space */
KcsAttrWhitePtIn = KcsAttrRangeStart +14, /* 2 floats, xy chromaticity of input */
KcsAttrWhitePtOut = KcsAttrRangeStart +15, /* 2 floats, xy chromaticity of output */
KcsAttrDeviceMfgIn = KcsAttrRangeStart +16, /* String, input device manufacturer */
KcsAttrDeviceMfgOut = KcsAttrRangeStart +17, /* String, output device manufacturer */
KcsAttrDeviceModelIn = KcsAttrRangeStart +18, /* String, input device model name */
KcsAttrDeviceModelOut = KcsAttrRangeStart +19,/* String, output device model name. */
KcsAttrDeviceSettingsIn = KcsAttrRangeStart +20, /* String, input device settings */
KcsAttrDeviceSettingsOut = KcsAttrRangeStart +21,/* String, output device settings */
KcsAttrDevicePhosphorIn = KcsAttrRangeStart +22, /* Input device phosphor set */
KcsAttrDevicePhosphorOut = KcsAttrRangeStart +23,/* Output device phosphor set */
KcsAttrDeviceSerialNumIn = KcsAttrRangeStart +24,/* String, input device serial no. */
KcsAttrDeviceSerialNumOut = KcsAttrRangeStart +25,/* String, input device serial no.*/
KcsAttrDeviceTypeIn = KcsAttrRangeStart +26, /* Enum, input device type */
KcsAttrDeviceTypeOut = KcsAttrRangeStart +27, /* Enum, output device type */
KcsAttrDeviceUnitIn = KcsAttrRangeStart +28, /* String, input device */
KcsAttrDeviceUnitOut = KcsAttrRangeStart +29, /* String, output device */
KcsAttrDmaxIn = KcsAttrRangeStart +30, /* 4 floats, input colorants */
KcsAttrDmaxOut = KcsAttrRangeStart +31, /* 4 floats, output colorants */
KcsAttrMediumIn = KcsAttrRangeStart +32, /* Enum, input medium type */
KcsAttrMediumOut= KcsAttrRangeStart +33, /* Enum, output medium type */
KcsAttrMediumDescIn = KcsAttrRangeStart +34, /* String, input medium description */
KcsAttrMediumDescOut = KcsAttrRangeStart +35, /* String output medium description */
KcsAttrMediumSenseIn = KcsAttrRangeStart +36, /* Enum, -/+ medium sense for input */
KcsAttrMediumSenseOut = KcsAttrRangeStart +37,/* Enum, -/+ medium sense for output */
|
-
Code Example 7-1 KcsAttribute Public Member Definition (Continued)
-
KcsAttrMediumProductIn = KcsAttrRangeStart +38, /*String, hard copy input medium name*/
KcsAttrMediumProductOut = KcsAttrRangeStart +39,
/* String, hard copy output medium name*/
KcsAttrMonitorWhitePt = KcsAttrRangeStart +40, /* CIE xy chromaticity coordinates */
KcsAttrInputPrimaries1 = KcsAttrRangeStart +41, /* Chromaticities of input ch 1 */
KcsAttrInputPrimaries2 = KcsAttrRangeStart +42, /* Chromaticities of input ch 2 */
KcsAttrInputPrimaries3 = KcsAttrRangeStart +43, /* Chromaticities of input ch 3 */
KcsAttrInputPrimaries4 = KcsAttrRangeStart +44, /* Chromaticities of input ch 4 */
KcsAttrOutputPrimaries1 = KcsAttrRangeStart +45,/* Chromaticities of output ch 1 */
KcsAttrOutputPrimaries2 = KcsAttrRangeStart +46,/* Chromaticities of output ch 2 */
KcsAttrOutputPrimaries3 = KcsAttrRangeStart +47,/* Chromaticities of output ch 3 */
KcsAttrOutputPrimaries4 = KcsAttrRangeStart +48,/* Chromaticities of output ch 4 */
KcsAttrGreyComp = KcsAttrRangeStart +49, /* Grey component replacement */
KcsAttrPrintLineRulings = KcsAttrRangeStart +50,/* Halftone printer output lines per
component */
KcsAttrScreenAngles = KcsAttrRangeStart +51, /* Halftone printer output lines angle */
KcsAttrUCR = KcsAttrRangeStart +52, /* Percent undercolor removal */
KcsAttrCharacterizationID = KcsAttrRangeStart +53,/* Unique Id of profile */
KcsAttrTechType = KcsAttrRangeStart +54, /* Technology type */
KcsAttrTechVersion = KcsAttrRangeStart +55, /* Technology version */
KcsAttrMonitorRatios = KcsAttrRangeStart +56, /* Cap Y ratios: R/G and B/G */
KcsAttrNumber = KcsAttrRangeStart +57,/* Number of attributes which may be returned */
KcsAttrAttributesSet = KcsAttrRangeStart +58, /* Set of all attributes returned */
KcsAttrSupportedOperations = KcsAttrRangeStart +59, /* Content types & operations
supported */
KcsAttrReserved0002 = KcsAttrRangeStart +60,
KcsAttrReserved0003 = KcsAttrRangeStart +61,
KcsAttrQuality = KcsAttrRangeStart +62,/* Transform quality in profile on 1-3 scale */
KcsAttrDeltaE = KcsAttrRangeStart +63, /* rms color error of transforms in profile */
KcsAttrReserved0001 = KcsAttrRangeStart +64,
KcsAttrProfileLength = KcsAttrRangeStart +65, /* profile size if saved to io Obj */
KcsAttrPixelLayoutSupported = KcsAttrRangeStart +66,/* attribute for storing supported
pixel layouts */
KcsAttrBlackPtIn = KcsAttrRangeStart +67,
KcsAttrBlackPtOut = KcsAttrRangeStart +68,
KcsAttrCMMType = KcsAttrRangeStart +69,
KcsAttrCMMVersion = KcsAttrRangeStart +70,
KcsAttrDotGain25 = KcsAttrRangeStart +71,
KcsAttrDotGain50 = KcsAttrRangeStart +72,
KcsAttrDotGain75 = KcsAttrRangeStart +73,
KcsAttrGammaIn = KcsAttrRangeStart +74,
KcsAttrGammaOut = KcsAttrRangeStart +75,
KcsAttrSenseInvertibleIn = KcsAttrRangeStart +76,
KcsAttrSenseInvertibleOut = KcsAttrRangeStart +77,
|
-
Code Example 7-1 KcsAttribute Public Member Definition (Continued)
-
KcsAttrModifiedTimeStamp = KcsAttrRangeStart +78,
KcsAttrCalibratedTimeStamp = KcsAttrRangeStart +79,
KcsAttrInterColorProfileVersion = KcsAttrRangeStart +80,
/* This is equivalent to the apple Colorsync definition of the profile format version.
In colorsynce 1.0 it is the TBD field of the TBD struct */
KcsAttrMonCalLutRed = KcsAttrRangeStart +81,
KcsAttrMonCalLutGreen = KcsAttrRangeStart +82,
KcsAttrMonCalLutBlue = KcsAttrRangeStart +83,
KcsAttrCreationTimeStamp = KcsAttrRangeStart +84,/* When this profile was Created */
KcsAttrPrimaryPlatform = KcsAttrRangeStart +85,
/* primary Platform of profile creation */
KcsAttrCMMOptions = KcsAttrRangeStart +86, /* Flags of hints for CMM, such as
distributed processing and caching options */
KcsAttrICCDeviceAttributes= KcsAttrRangeStart +87,/* The ICC 3.0 device attributes */
KcsAttrICCRenderIntent= KcsAttrRangeStart +88, /* The ICC 3.0 rendering intent */
KcsAttrCSXformType= KcsAttrRangeStart +89, /* The ColorSense Xform type */
KcsAttrInterColorProfileId = KcsAttrRangeStart +90,/* Magic number for ICC profiles
acsp, byte 36 */
KcsAttrNameEnd,
KcsAttrNameMax = KcsForceAlign /* Forces to 32 bit integer. */
} KcsAttribute;
#define KcsAttrRangeEnd (KcsAttrNameEnd - KcsAttrRangeStart)
|
|
|