18 #if !defined(XALAN_NODESORTER_HEADER_GUARD)
19 #define XALAN_NODESORTER_HEADER_GUARD
46 class MutableNodeRefList;
47 class StylesheetExecutionContext;
72 XalanSize_t thePosition = 0) :
74 m_position(thePosition)
86 NodeSorter(MemoryManager& theManager);
90 NodeSortKeyVectorType&
124 NodeSorter& theSorter,
125 const NodeVectorType& theNodes,
126 const NodeSortKeyVectorType& theNodeSortKeys) :
127 m_executionContext(executionContext),
130 m_nodeSortKeys(theNodeSortKeys)
147 XalanSize_t theKeyIndex = 0)
const;
161 XalanSize_t theKeyIndex = 0)
const
163 return compare(theLHS, theRHS, theKeyIndex) < 0 ?
true :
false;
171 XalanSize_t theKeyIndex,
177 XalanSize_t theKeyIndex,
183 NodeSorter& m_sorter;
184 const NodeVectorType& m_nodes;
185 const NodeSortKeyVectorType& m_nodeSortKeys;
200 #if defined(XALAN_NODESORTER_CACHE_XOBJECTS)
218 NumberResultsCacheType m_numberResultsCache;
220 StringResultsCacheType m_stringResultsCache;
222 NodeSortKeyVectorType m_keys;
224 NodeVectorType m_scratchVector;
233 #endif // XALAN_NODESORTER_HEADER_GUARD
NodeSortKeyCompare(StylesheetExecutionContext &executionContext, NodeSorter &theSorter, const NodeVectorType &theNodes, const NodeSortKeyVectorType &theNodeSortKeys)
Construct a NodeSortKeyCompare object, to perform the sort.
XalanVector< XObjectVectorType > XObjectCacheType
XalanVector< StringVectorType > StringCacheType
bool operator()(const NodeVectorType::value_type &theLHS, const NodeVectorType::value_type &theRHS, XalanSize_t theKeyIndex=0) const
Compare two nodes as a less predicate.
StringCacheType StringResultsCacheType
Local implementation of MutableNodeRefList.
Simple data structure class for use by the NodeSorter class.
XalanVector< XObjectPtr > XObjectVectorType
NumberCacheType NumberResultsCacheType
#define XALAN_CPP_NAMESPACE
Xalan-C++ namespace, including major and minor version.
compare(const CharVectorType &theLHS, const CharVectorType &theRHS)
Compare the contents of two strings.
XalanVector< NumberVectorType > NumberCacheType
VectorEntry(XalanNode *theNode=0, XalanSize_t thePosition=0)
StringVectorTypeDecl StringVectorType
XalanVector< NodeSortKey > NodeSortKeyVectorType
XalanVector< double > NumberVectorTypeDecl
This class can sort vectors of nodes according to a select pattern.
NodeSortKeyVectorType & getSortKeys()
#define XALAN_USES_MEMORY_MANAGER(Type)
#define XALAN_XSLT_EXPORT
XalanVector< VectorEntry > NodeVectorType
NumberVectorTypeDecl NumberVectorType
Return the results of a compare of two nodes.