Xalan-C++ API Reference 1.12.0
xalanc::NodeSorter::NodeSortKeyCompare Struct Reference

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

#include <xalanc/XSLT/NodeSorter.hpp>

Public Member Functions

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

Protected Member Functions

double getNumberResult (const NodeSortKey &theKey, XalanSize_t theKeyIndex, const NodeVectorType::value_type &theEntry) const
const XalanDOMStringgetStringResult (const NodeSortKey &theKey, XalanSize_t theKeyIndex, const NodeVectorType::value_type &theEntry) const

Detailed Description

Return the results of a compare of two nodes.

Definition at line 111 of file NodeSorter.hpp.

Constructor & Destructor Documentation

◆ NodeSortKeyCompare()

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

Construct a NodeSortKeyCompare object, to perform the sort.

Parameters
executionContextcurrent execution context
theNodesvector or nodes to be sorted
theNodeSortKeysvector of keys upon which to sort

Definition at line 122 of file NodeSorter.hpp.

References xalanc::NodeSorter::NodeSorter().

Member Function Documentation

◆ compare()

int xalanc::NodeSorter::NodeSortKeyCompare::compare ( const NodeVectorType::value_type & theLHS,
const NodeVectorType::value_type & theRHS,
XalanSize_t theKeyIndex = 0 ) const

Compare two nodes, returning a value to indicate the result.

Parameters
theLHSthe first node to compare
theRHSthe second node to compare
theKeyIndexthe 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

Referenced by operator()().

◆ getNumberResult()

double xalanc::NodeSorter::NodeSortKeyCompare::getNumberResult ( const NodeSortKey & theKey,
XalanSize_t theKeyIndex,
const NodeVectorType::value_type & theEntry ) const
protected

◆ getStringResult()

const XalanDOMString & xalanc::NodeSorter::NodeSortKeyCompare::getStringResult ( const NodeSortKey & theKey,
XalanSize_t theKeyIndex,
const NodeVectorType::value_type & theEntry ) const
protected

◆ operator()()

bool xalanc::NodeSorter::NodeSortKeyCompare::operator() ( const NodeVectorType::value_type & theLHS,
const NodeVectorType::value_type & theRHS,
XalanSize_t theKeyIndex = 0 ) const
inline

Compare two nodes as a less predicate.

Parameters
theLHSthe first node to compare
theRHSthe second node to compare
theKeyIndexthe index of the key to use
Returns
true if theLHS is less than theRHS

Definition at line 158 of file NodeSorter.hpp.

References compare().


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