18 #if !defined(XALAN_NODESORTER_HEADER_GUARD) 19 #define XALAN_NODESORTER_HEADER_GUARD 42 XALAN_CPP_NAMESPACE_BEGIN
72 XalanSize_t thePosition = 0) :
74 m_position(thePosition)
86 NodeSorter(MemoryManager& theManager);
90 NodeSortKeyVectorType&
111 #if defined(XALAN_NO_STD_NAMESPACE) 112 struct XALAN_XSLT_EXPORT NodeSortKeyCompare :
public binary_function<const NodeVectorType::value_type&, const NodeVectorType::value_type&, bool>
114 struct
XALAN_XSLT_EXPORT NodeSortKeyCompare :
public std::binary_function<const NodeVectorType::value_type&, const NodeVectorType::value_type&, bool>
128 NodeSorter& theSorter,
129 const NodeVectorType& theNodes,
130 const NodeSortKeyVectorType& theNodeSortKeys) :
131 m_executionContext(executionContext),
134 m_nodeSortKeys(theNodeSortKeys)
149 first_argument_type theLHS,
150 second_argument_type theRHS,
151 XalanSize_t theKeyIndex = 0)
const;
163 first_argument_type theLHS,
164 second_argument_type theRHS,
165 XalanSize_t theKeyIndex = 0)
const 167 return compare(theLHS, theRHS, theKeyIndex) < 0 ? true :
false;
175 XalanSize_t theKeyIndex,
176 first_argument_type theEntry)
const;
181 XalanSize_t theKeyIndex,
182 first_argument_type theEntry)
const;
187 NodeSorter& m_sorter;
188 const NodeVectorType& m_nodes;
189 const NodeSortKeyVectorType& m_nodeSortKeys;
192 friend struct NodeSortKeyCompare;
204 #if defined(XALAN_NODESORTER_CACHE_XOBJECTS) 222 NumberResultsCacheType m_numberResultsCache;
224 StringResultsCacheType m_stringResultsCache;
226 NodeSortKeyVectorType m_keys;
228 NodeVectorType m_scratchVector;
233 XALAN_CPP_NAMESPACE_END
237 #endif // XALAN_NODESORTER_HEADER_GUARD
int compare(first_argument_type theLHS, second_argument_type theRHS, XalanSize_t theKeyIndex=0) const
Compare two nodes, returning a value to indicate the result.
XalanVector< XObjectPtr > XObjectVectorType
Local implementation of MutableNodeRefList.
NumberCacheType NumberResultsCacheType
const XalanDOMString & getStringResult(const NodeSortKey &theKey, XalanSize_t theKeyIndex, first_argument_type theEntry) const
XalanVector< NodeSortKey > NodeSortKeyVectorType
double getNumberResult(const NodeSortKey &theKey, XalanSize_t theKeyIndex, first_argument_type theEntry) const
StringVectorTypeDecl StringVectorType
StringCacheType StringResultsCacheType
XalanVector< StringVectorType > StringCacheType
void sort(StylesheetExecutionContext &executionContext, MutableNodeRefList &theList)
Given a list of nodes, sort each node according to the criteria in the keys.
Simple data structure class for use by the NodeSorter class.
XalanVector< XObjectVectorType > XObjectCacheType
result_type operator()(first_argument_type theLHS, second_argument_type theRHS, XalanSize_t theKeyIndex=0) const
Compare two nodes as a less predicate.
#define XALAN_USES_MEMORY_MANAGER(Type)
#define XALAN_XSLT_EXPORT
VectorEntry(XalanNode *theNode=0, XalanSize_t thePosition=0)
XalanVector< NumberVectorType > NumberCacheType
NumberVectorTypeDecl NumberVectorType
NodeSortKeyCompare(StylesheetExecutionContext &executionContext, NodeSorter &theSorter, const NodeVectorType &theNodes, const NodeSortKeyVectorType &theNodeSortKeys)
Construct a NodeSortKeyCompare object, to perform the sort.
NodeSortKeyVectorType & getSortKeys()
This class can sort vectors of nodes according to a select pattern.
XalanVector< double > NumberVectorTypeDecl
XalanVector< VectorEntry > NodeVectorType