## Xalan-C++ API Documentation

### The Xalan C++ XSLT Processor Version 1.5

Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members

# NodeSorter::NodeSortKeyCompare Struct Reference

Return the results of a compare of two nodes. More...

`#include <NodeSorter.hpp>`

Inheritance diagram for NodeSorter::NodeSortKeyCompare:

[legend]
Collaboration diagram for NodeSorter::NodeSortKeyCompare:

[legend]
List of all members.

## Public Methods

- NodeSortKeyCompare (StylesheetExecutionContext &executionContext, NodeSorter &theSorter, const NodeVectorType &theNodes, const NodeSortKeyVectorType &theNodeSortKeys)
    Construct a NodeSortKeyCompare object, to perform the sort. More...
- int compare (first_argument_type theLHS, second_argument_type theRHS, unsigned int theKeyIndex=0) const
    Compare two nodes, returning a value to indicate the result. More...
- result_type operator() (first_argument_type theLHS, second_argument_type theRHS, unsigned int theKeyIndex=0) const
    Compare two nodes as a less predicate. More...

## Protected Methods

- double getNumberResult (const NodeSortKey &theKey, unsigned int theKeyIndex, first_argument_type theEntry) const
- const XObjectPtr& getStringResult (const NodeSortKey &theKey, unsigned int theKeyIndex, first_argument_type theEntry) const

## Detailed Description

Return the results of a compare of two nodes.

## Constructor & Destructor Documentation

NodeSorter::NodeSortKeyCompare::NodeSortKeyCompare ( | StylesheetExecutionContext & executionContext,
| NodeSorter & theSorter,
| const NodeVectorType & theNodes,
| const NodeSortKeyVectorType & theNodeSortKeys )

  | Construct a NodeSortKeyCompare object, to perform the sort. Parameters:
  executionContext | current execution context
  theNodes | vector or nodes to be sorted
  theNodeSortKeys | vector of keys upon which to sort

## Member Function Documentation

int NodeSorter::NodeSortKeyCompare::compare ( | first_argument_type theLHS,
| second_argument_type theRHS,
| unsigned int theKeyIndex = 0 ) const

  | Compare two nodes, returning a value to indicate the result. Parameters:
  theLHS | the first node to compare
  theRHS | the second node to compare
  theKeyIndex | the index of the key to use
Returns: < 0 if theLHS is less than theRHS, 0 if they are equal, and > 0 if theLHS is greater than theRHS

double NodeSorter::NodeSortKeyCompare::getNumberResult ( | const NodeSortKey & theKey,
| unsigned int theKeyIndex,
| first_argument_type theEntry ) const`[protected]`

const XObjectPtr & NodeSorter::NodeSortKeyCompare::getStringResult ( | const NodeSortKey & theKey,
| unsigned int theKeyIndex,
| first_argument_type theEntry ) const`[protected]`

result_type NodeSorter::NodeSortKeyCompare::operator() ( | first_argument_type theLHS,
| second_argument_type theRHS,
| unsigned int theKeyIndex = 0 ) const

  | Compare two nodes as a less predicate. Parameters:
  theLHS | the first node to compare
  theRHS | the second node to compare
  theKeyIndex | the index of the key to use
Returns: true if theLHS is less than theRHS

The documentation for this struct was generated from the following file:

- NodeSorter.hpp

Interpreting class diagrams

Doxygen and GraphViz are used to generate this API documentation from the Xalan-C header files.

Xalan-C++ XSLT Processor Version 1.5 Copyright © 2000, 2001, 2002, 2003 The Apache Software Foundation. All Rights Reserved.