KCMS CMM Reference Manual

Chapter 9 KcsXformSeq Class

This chapter describes the KCMS framework KcsXformSeq class. This class provides an interface to manipulate a list or concatenation of KcsXforms in a sequence as one KcsXform instance.

As you read this chapter, you will find it helpful to have access to the following header files:

kcsxfseq.h and kcsxform.h


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 header file for the class is kcsxfseq.h. The constant and #define identifiers for this class are defined in the kcsxfseq.h header file as:

const KcsId KcsXfrmSeqId = {0x53657120}; /* 'Seq ' */
#define KcsXfrmSeqIdd (0x53657120) /* 'Seq ' */

In addition to the KcsLoadable and KcsXform methods overridden by this class, there are methods to manipulate a list or concatenation of KcsXforms. The protected and public members are described.

Protected Members

The KcsXformSeq class has the following protected members.

Table 9-1 KcsXformSeq Protected Members

Protected Member 

Description 

virtual KcsStatus 
evalPrep(unsigned long *seqCount,
 	KcsPixelLayout *inBuffer,
 	KcsPixelLayout *outBuffer,
 	KcsPixelLayout *genIn,
 	KcsPixelLayout *genOut,
 	KcsPixelLayout *remIn,
 	KcsPixelLayout *remOut);

Prepares the pixel layouts for evaluation. 

Public Members

The KcsXformSeq class has the following public members.

Table 9-2 KcsXformSeq Public Members

Public Member 

Description 

virtual KcsStatus addAsParent(KcsXformSeq *parent);

Adds a parent to my list of parents. 

virtual KcsStatus delAsParent(KcsXformSeq *parent);

Deletes a parent from my list of parents. Decrements the parent use count and unshares the parent. 

virtual KcsStatus deOptimize();

Deoptimizes this sequence. If the original data is not available, returns KCS_CANNOT_DEOPTIMIZE.

virtual KcsStatus
evalSegment(const KcsOperationType opsAndHints,
 	KcsPixelLayout *inBuffer,
 	KcsPixelLayout *outBUffer,
 	KcsCallbackFunction progress);

Evaluates the inBuffer data through the sequence of Xforms described by this instance into outBuffer.

virtual KcsStatus
 getLeftmostXform(long *n,
 	KcsXformSeq **pnextXform,
 	KcsXform **nextXform);

Gets the leftmost basic Xform in the sequence. Returns the parent of the xform(pnextXform) and the number of the Xform within that sequence. Recurses to the true leftmost.

virtual KcsStatus
 getNextXform(KcsXformSeq **pnextXform,
 	KcsXform **nextXform);

Gets the next basic Xform in the sequence. Returns the parent of the xform(pnextXform). Unrolls a sequence into a list of its most basic Xforms. Returns KCS_END_OF_XFORMS when it reaches the last Xform in the sequence.

virtual long getOrigNumber() const
 	{return(numOriginalXforms);};;

Returns the number of KcsXforms in the sequence.

virtual KcsStatus
 getRightmostXform(long *n,
 	KcsXformSeq **pnextXform,
 	KcsXform **nextXform);

Gets the rightmost basic Xform in the sequence. Returns the parent of the xform(pnextXform) and the number of the Xform within that sequence. Recurses to the true rightmost.

virtual KcsStatus
 getXform(long n, KcsXform **anXform);

Gets the nth Xform in the list. Applies only to this sequence. It does not recurse through sequences of sequences.

virtual KcsStatus
 insertXform(long n, KcsXform *anXform);

Adds the Xform in the nth position in the list. It is not recursive.

virtual KcsOptimizationType isOptimized();

Indicates if the sequence is optimized. 

KcsXformSeq(KcsStatus *status,
 	KcsAttributeSet *aAttrSet = NULL);

Constructors from a sequence of 0 Xforms. 

KcsXformSeq(KcsStatus *status,
 	const KcsOperationType opsAndHints,
 	KcsChunkSet *aChunkSet,
 	KcsChunkId chunkId,
 	KcsAttributeSet *aAttrSet = NULL);

Constructors from a chunk set object. 

KcsXformSeq(const KcsOperationType opsAndHints,
 	const long numXforms, KcsXform **technologies,
 	KcsCallbackFunction progress,
 	long *numberThatFailed, KcsStatus *stat,
 	KcsAttributeSet *aAttrSet = NULL);

Constructors based on the list of Xforms supplied. 

virtual ~KcsXformSeq();

Destructor. 

virtual KcsOptimizationType isOptimized();

Queries whether this sequence has been optimized. 

virtual KcsStatus
 optimizeLineage(const KcsOperationType opsAndHints,
 	const KcsOptimizationType optimization,
 	KcsCallbackFunction prog);

Optimizes this Xform and all of its lineages. Does not optimize parents since a parent use count is kept. 

virtual KcsStatus 
removeXform(long n);

Deletes the nth Xform in the list. It is not recursive.

virtual KcsStatus
 replaceXform(long n, KcsXform *anXform);

Replaces the Xform in the nth position in the list with an Xform. It is not recursive.