Unicorn XML Toolkit
Version 1.00.00

Namespace Xslt
Class CSortKey

class CSortKey: public CInterface {
public:
    CSortKey(int nPosition);
    ~CSortKey();
public:
    void Add(const CString &strKey);
    int GetPosition();
    int GetSize();
    CString GetAt(int nIndex);
    };

The sort key.

When an array of document nodes is sorted, the sort key is evaluated for every node in the array. Every sort key is an ordered sequence of string segment values. Furthermore, every sort key is assigned a certain position index. The position index is equal to the index of the corresponding element in the original (unsorted) array. Position indexes are used to ensure the stable sorting.

Since:
1.00.00
Version:
1.00.00
Author:
Alexey Gokhberg
Constructor/Destructor Summary
CSortKey (int nPosition);
����������Constructs the sort key.
~CSortKey ();
����������Destroys the sort key.

Function Summary
void Add (const CString &strKey);
����������Adds the segment to this sort key.
int GetPosition ();
����������Returns the position index of this sort key.
int GetSize ();
����������Returns the number of segments in this sort key.
CString GetAt (int nIndex);
����������Returns the value of the segment at the given index in this sort key.

Constructor/Destructor Detail

CSortKey

CSortKey(int nPosition);

Constructs the sort key.

Parameters:
nPosition - the position index of this sort key

~CSortKey

~CSortKey();

Destroys the sort key.

Function Detail

Add

void Add(const CString &strKey);

Adds the segment to this sort key.

Parameters:
strKey - the value of the segment

GetPosition

int GetPosition();

Returns the position index of this sort key.

Returns:
the position index of this sort key

GetSize

int GetSize();

Returns the number of segments in this sort key.

Returns:
the number of segments in this sort key

GetAt

CString GetAt(int nIndex);

Returns the value of the segment at the given index in this sort key.

Parameters:
nIndex - the index of the segment (zero-based)
Returns:
the value of the segment at the given index in this sort key

Unicorn XML Toolkit
Version 1.00.00


This document was created using Unicorn DOC++.

Copyright 1999-2001 Unicorn Enterprises SA.
All Rights Reserved.