dbertoni 00/07/25 07:51:35
Modified: c/src/XSLT NodeSorter.cpp NodeSorter.hpp
Log:
Removed unnecessary member variables.
Revision Changes Path
1.12 +9 -10 xml-xalan/c/src/XSLT/NodeSorter.cpp
Index: NodeSorter.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/NodeSorter.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- NodeSorter.cpp 2000/07/10 01:06:54 1.11
+++ NodeSorter.cpp 2000/07/25 14:51:32 1.12
@@ -81,9 +81,7 @@
-NodeSorter::NodeSorter(StylesheetExecutionContext&
executionContext) :
- m_executionContext(executionContext),
- m_keys()
+NodeSorter::NodeSorter()
{
}
@@ -97,17 +95,16 @@
void
NodeSorter::sort(
- const MutableNodeRefList& theList,
- NodeVectorType&
v,
- const NodeSortKeyVectorType& keys)
+ StylesheetExecutionContext&
executionContext,
+ const MutableNodeRefList& theList,
+ NodeVectorType& v,
+ const NodeSortKeyVectorType& keys) const
{
#if !defined(XALAN_NO_NAMESPACES)
using std::stable_sort;
#endif
- m_keys = keys;
-
- NodeSortKeyCompare theComparer(m_executionContext,
+ NodeSortKeyCompare theComparer(executionContext,
theList,
v,
keys);
@@ -123,8 +120,9 @@
void
NodeSorter::sort(
+ StylesheetExecutionContext&
executionContext,
MutableNodeRefList& theList,
- const NodeSortKeyVectorType& keys)
+ const NodeSortKeyVectorType& keys) const
{
const unsigned int theLength = theList.getLength();
@@ -142,6 +140,7 @@
// Do the sort...
sort(
+ executionContext,
theList,
theNodes,
keys);
1.8 +8 -9 xml-xalan/c/src/XSLT/NodeSorter.hpp
Index: NodeSorter.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/NodeSorter.hpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- NodeSorter.hpp 2000/07/10 01:06:54 1.7
+++ NodeSorter.hpp 2000/07/25 14:51:33 1.8
@@ -105,10 +105,9 @@
/**
* Construct a NodeSorter, passing in the XSL Processor so it can know
how
* to get the node data according to the proper whitespace rules.
- *
- * @param executionContext current execution context
*/
- NodeSorter(StylesheetExecutionContext& executionContext);
+ explicit
+ NodeSorter();
~NodeSorter();
@@ -116,13 +115,15 @@
* Given a list of nodes, sort each node according to the criteria in
the
* keys. The list is assumed to be in document order.
*
+ * @param executionContext current execution context
* @param v list of Nodes
* @param keys vector of NodeSortKeys
*/
void
sort(
+ StylesheetExecutionContext&
executionContext,
MutableNodeRefList& theList,
- const NodeSortKeyVectorType& keys);
+ const NodeSortKeyVectorType& keys) const;
/*
* TODO: Optimize compare -- cache the getStringExpr results,
@@ -221,19 +222,17 @@
* Given a vector of nodes, sort each node according to the criteria in
the
* keys.
*
+ * @param executionContext current execution context
* @param theList the original node list.
* @param v vector of Nodes
* @param keys vector of NodeSortKeys
*/
void
sort(
+ StylesheetExecutionContext&
executionContext,
const MutableNodeRefList& theList,
NodeVectorType& v,
- const NodeSortKeyVectorType& keys);
-
- StylesheetExecutionContext& m_executionContext;
-
- NodeSortKeyVectorType m_keys;
+ const NodeSortKeyVectorType& keys) const;
/**
* @@ TODO: Adjust this for locale.