You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by db...@locus.apache.org on 2000/04/20 18:32:15 UTC
cvs commit: xml-xalan/c/src/XPath XPathExecutionContext.hpp XPathExecutionContextDefault.cpp XPathExecutionContextDefault.hpp XPathExpression.cpp XPathExpression.hpp XPathFunctionTable.cpp
dbertoni 00/04/20 09:32:15
Modified: c/src/XPath XPathExecutionContext.hpp
XPathExecutionContextDefault.cpp
XPathExecutionContextDefault.hpp
XPathExpression.cpp XPathExpression.hpp
XPathFunctionTable.cpp
Log:
Fixed namespace problems.
Revision Changes Path
1.7 +4 -1 xml-xalan/c/src/XPath/XPathExecutionContext.hpp
Index: XPathExecutionContext.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XPath/XPathExecutionContext.hpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- XPathExecutionContext.hpp 2000/04/14 21:08:52 1.6
+++ XPathExecutionContext.hpp 2000/04/20 16:32:14 1.7
@@ -77,6 +77,7 @@
+#include <XPath/Function.hpp>
#include <XPath/MutableNodeRefList.hpp>
@@ -103,6 +104,8 @@
{
public:
+ typedef Function::XObjectArgVectorType XObjectArgVectorType;
+
explicit
XPathExecutionContext();
@@ -250,7 +253,7 @@
extFunction(
const XalanDOMString& theNamespace,
const XalanDOMString& extensionName,
- const std::vector<XObject*>& argVec) = 0;
+ const XObjectArgVectorType& argVec) = 0;
/**
* Get an XLocator provider keyed by node. This gets the association
1.5 +3 -3 xml-xalan/c/src/XPath/XPathExecutionContextDefault.cpp
Index: XPathExecutionContextDefault.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XPath/XPathExecutionContextDefault.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- XPathExecutionContextDefault.cpp 2000/04/14 21:08:52 1.4
+++ XPathExecutionContextDefault.cpp 2000/04/20 16:32:14 1.5
@@ -238,9 +238,9 @@
XObject*
XPathExecutionContextDefault::extFunction(
- const XalanDOMString& theNamespace,
- const XalanDOMString& extensionName,
- const std::vector<XObject*>& argVec)
+ const XalanDOMString& theNamespace,
+ const XalanDOMString& extensionName,
+ const Function::XObjectArgVectorType& argVec)
{
return m_xpathEnvSupport.extFunction(*this, theNamespace, extensionName, argVec);
}
1.7 +1 -1 xml-xalan/c/src/XPath/XPathExecutionContextDefault.hpp
Index: XPathExecutionContextDefault.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XPath/XPathExecutionContextDefault.hpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- XPathExecutionContextDefault.hpp 2000/04/14 21:08:52 1.6
+++ XPathExecutionContextDefault.hpp 2000/04/20 16:32:14 1.7
@@ -169,7 +169,7 @@
extFunction(
const XalanDOMString& theNamespace,
const XalanDOMString& extensionName,
- const std::vector<XObject*>& argVec);
+ const XObjectArgVectorType& argVec);
virtual XLocator*
getXLocatorFromNode(const XalanNode* node) const;
1.5 +19 -19 xml-xalan/c/src/XPath/XPathExpression.cpp
Index: XPathExpression.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XPath/XPathExpression.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- XPathExpression.cpp 2000/04/11 14:46:18 1.4
+++ XPathExpression.cpp 2000/04/20 16:32:14 1.5
@@ -73,8 +73,8 @@
XPathExpression::InitializeNodeTestSet();
-XPathExpression::XPathExpressionException::XPathExpressionException(const std::string& theMessage) :
- XPathException(theMessage.c_str())
+XPathExpression::XPathExpressionException::XPathExpressionException(const XalanDOMString& theMessage) :
+ XPathException(theMessage)
{
}
@@ -99,7 +99,7 @@
-std::string
+XalanDOMString
XPathExpression::InvalidOpCodeException::FormatErrorMessage(int theOpCode)
{
#if !defined(XALAN_NO_NAMESPACES)
@@ -113,9 +113,9 @@
<< " was detected."
<< '\0';
- std::string theString = theFormatter.str();
- delete theFormatter.str();
- return theString;
+ theFormatter.freeze(false);
+
+ return theFormatter.str();
}
@@ -136,7 +136,7 @@
-std::string
+XalanDOMString
XPathExpression::InvalidArgumentCountException::FormatErrorMessage(
int theOpCode,
int theExpectedCount,
@@ -157,10 +157,10 @@
<< theSuppliedCount
<< " arguments(s) were supplied."
<< '\0';
+
+ theFormatter.freeze(false);
- std::string theString = theFormatter.str();
- delete theFormatter.str();
- return theString;
+ return theFormatter.str();
}
@@ -180,7 +180,7 @@
-std::string
+XalanDOMString
XPathExpression::InvalidArgumentException::FormatErrorMessage(
int theOpCode,
int theValue)
@@ -197,10 +197,10 @@
<< theOpCode
<< "."
<< '\0';
+
+ theFormatter.freeze(false);
- std::string theString = theFormatter.str();
- delete theFormatter.str();
- return theString;
+ return theFormatter.str();
}
@@ -238,9 +238,9 @@
void
XPathExpression::shrink()
{
- m_opMap = OpCodeMapType(m_opMap);
+ OpCodeMapType(m_opMap).swap(m_opMap);
TokenQueueType(m_tokenQueue).swap(m_tokenQueue);
- m_patternMap = PatternMapType(m_patternMap);
+ PatternMapType(m_patternMap).swap(m_patternMap);
}
@@ -282,9 +282,9 @@
void
XPathExpression::setOpCodeArgs(
- eOpCodes theOpCode,
- OpCodeMapSizeType theIndex,
- const std::vector<OpCodeMapValueType>& theArgs)
+ eOpCodes theOpCode,
+ OpCodeMapSizeType theIndex,
+ const OpCodeMapValueVectorType& theArgs)
{
// There must be at least enough space to hold the OpCode
// and the length indicator.
1.4 +10 -11 xml-xalan/c/src/XPath/XPathExpression.hpp
Index: XPathExpression.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XPath/XPathExpression.hpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- XPathExpression.hpp 2000/04/11 14:46:18 1.3
+++ XPathExpression.hpp 2000/04/20 16:32:14 1.4
@@ -92,13 +92,6 @@
{
public:
-#if defined(XALAN_NO_NAMESPACES)
-# define XALAN_STD
-#else
-# define XALAN_STD std::
-#endif
-
-
/**
* List of operations codes.
*
@@ -630,7 +623,7 @@
*
* @param theMessage string error message
*/
- XPathExpressionException(const XALAN_STD string& theMessage);
+ XPathExpressionException(const XalanDOMString& theMessage);
virtual~
XPathExpressionException();
@@ -655,7 +648,7 @@
private:
- static XALAN_STD string
+ static XalanDOMString
FormatErrorMessage(int theOpCode);
};
@@ -684,7 +677,7 @@
private:
- static XALAN_STD string
+ static XalanDOMString
FormatErrorMessage(
int theOpCode,
int theExpectedCount,
@@ -713,12 +706,18 @@
private:
- static XALAN_STD string
+ static XalanDOMString
FormatErrorMessage(
int theOpCode,
int theValue);
};
+
+#if defined(XALAN_NO_NAMESPACES)
+# define XALAN_STD
+#else
+# define XALAN_STD std::
+#endif
typedef XALAN_STD vector<int> OpCodeMapType;
typedef XALAN_STD vector<XObject*> TokenQueueType;
1.5 +7 -3 xml-xalan/c/src/XPath/XPathFunctionTable.cpp
Index: XPathFunctionTable.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XPath/XPathFunctionTable.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- XPathFunctionTable.cpp 2000/04/11 14:46:19 1.4
+++ XPathFunctionTable.cpp 2000/04/20 16:32:14 1.5
@@ -236,9 +236,13 @@
{
try
{
- std::for_each(m_FunctionCollection.begin(),
- m_FunctionCollection.end(),
- DeleteFunctorType());
+#if !defined(XALAN_NO_NAMESPACES)
+ using std::for_each;
+#endif
+
+ for_each(m_FunctionCollection.begin(),
+ m_FunctionCollection.end(),
+ DeleteFunctorType());
}
catch(...)
{