Use DOMString instead of String.

Not part of build yet. a=leaf


git-svn-id: svn://10.0.0.236/trunk@65511 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
Peter.VanderBeken%pandora.be
2000-04-07 22:59:18 +00:00
parent b66a335e7f
commit 276d072ae7
11 changed files with 41 additions and 42 deletions

View File

@@ -21,13 +21,13 @@
* Keith Visco, kvisco@ziplink.net
* -- original author.
*
* $Id: BooleanResult.cpp,v 1.1 2000-04-06 07:45:19 kvisco%ziplink.net Exp $
* $Id: BooleanResult.cpp,v 1.2 2000-04-07 22:57:06 Peter.VanderBeken%pandora.be Exp $
*/
/**
* Boolean Expression result
* @author <A href="mailto:kvisco@ziplink.net">Keith Visco</A>
* @version $Revision: 1.1 $ $Date: 2000-04-06 07:45:19 $
* @version $Revision: 1.2 $ $Date: 2000-04-07 22:57:06 $
**/
#include "ExprResult.h"
@@ -83,7 +83,7 @@ short BooleanResult::getResultType() {
return ExprResult::BOOLEAN;
} //-- getResultType
void BooleanResult::stringValue(String& str) {
void BooleanResult::stringValue(DOMString& str) {
if ( value ) str.append("true");
else str.append("false");
} //-- toString

View File

@@ -23,12 +23,11 @@
* Larry Fitzpatrick, OpenText, lef@opentext.com
* -- changed constant short result types to enum
*
* $Id: ExprResult.h,v 1.1 2000-04-06 07:45:30 kvisco%ziplink.net Exp $
* $Id: ExprResult.h,v 1.2 2000-04-07 22:57:17 Peter.VanderBeken%pandora.be Exp $
*/
#include "MITREObject.h"
#include "String.h"
#include "baseutils.h"
#include "dom.h"
#include "primitives.h"
#ifndef MITREXSL_EXPRRESULT_H
@@ -43,7 +42,7 @@
* <BR/>
* Note: for NodeSet, see NodeSet.h <BR />
* @author <A HREF="mailto:kvisco@ziplink.net">Keith Visco</A>
* @version $Revision: 1.1 $ $Date: 2000-04-06 07:45:30 $
* @version $Revision: 1.2 $ $Date: 2000-04-07 22:57:17 $
*/
class ExprResult : public MITREObject {
@@ -70,7 +69,7 @@ public:
* Creates a String representation of this ExprResult
* @param str the destination string to append the String representation to.
**/
virtual void stringValue(String& str) = 0;
virtual void stringValue(DOMString& str) = 0;
/**
* Converts this ExprResult to a Boolean (MBool) value
@@ -101,7 +100,7 @@ public:
void setValue(const BooleanResult& boolResult);
virtual short getResultType();
virtual void stringValue(String& str);
virtual void stringValue(DOMString& str);
virtual MBool booleanValue();
virtual double numberValue();
@@ -126,7 +125,7 @@ public:
MBool isNaN() const;
virtual short getResultType();
virtual void stringValue(String& str);
virtual void stringValue(DOMString& str);
virtual MBool booleanValue();
virtual double numberValue();
@@ -149,7 +148,7 @@ public:
void setValue(const String& str);
virtual short getResultType();
virtual void stringValue(String& str);
virtual void stringValue(DOMString& str);
virtual MBool booleanValue();
virtual double numberValue();

View File

@@ -27,7 +27,7 @@
* Olivier Gerardin, ogerardin@vo.lu
* -- fixed numberValue()
*
* $Id: NodeSet.cpp,v 1.1 2000-04-06 07:45:32 kvisco%ziplink.net Exp $
* $Id: NodeSet.cpp,v 1.2 2000-04-07 22:57:32 Peter.VanderBeken%pandora.be Exp $
*/
#include "NodeSet.h"
@@ -36,7 +36,7 @@
* NodeSet <BR />
* This class was ported from XSL:P. <BR />
* @author <A HREF="mailto:kvisco@ziplink.net">Keith Visco</A>
* @version $Revision: 1.1 $ $Date: 2000-04-06 07:45:32 $
* @version $Revision: 1.2 $ $Date: 2000-04-07 22:57:32 $
**/
@@ -344,7 +344,7 @@ double NodeSet::numberValue() {
* Creates a String representation of this ExprResult
* @param str the destination string to append the String representation to.
**/
void NodeSet::stringValue(String& str) {
void NodeSet::stringValue(DOMString& str) {
if ( size()>0) {
XMLDOMUtils::getNodeValue(get(0), &str);
}

View File

@@ -24,13 +24,13 @@
* Larry Fitzpatrick, OpenText, lef@opentext.com
* -- moved initialization of DEFAULT_SIZE to NodeSet.cpp
*
* $Id: NodeSet.h,v 1.1 2000-04-06 07:45:33 kvisco%ziplink.net Exp $
* $Id: NodeSet.h,v 1.2 2000-04-07 22:57:48 Peter.VanderBeken%pandora.be Exp $
*/
/**
* NodeSet
* @author <a href="mailto:kvisco@ziplink.net">Keith Visco</a>
* @version $Revision: 1.1 $ $Date: 2000-04-06 07:45:33 $
* @version $Revision: 1.2 $ $Date: 2000-04-07 22:57:48 $
**/
#ifndef TRANSFRMX_NODESET_H
@@ -191,7 +191,7 @@ public:
* Creates a String representation of this ExprResult
* @param str the destination string to append the String representation to.
**/
virtual void stringValue(String& str);
virtual void stringValue(DOMString& str);
private:

View File

@@ -123,7 +123,7 @@ ExprResult* NumberFunctionCall::evaluate(Node* context, ContextState* cs) {
}
else {
String resultStr;
String temp;
DOMString temp;
XMLDOMUtils::getNodeValue(context, &temp);
if ( cs->isStripSpaceAllowed(context) ) {
XMLUtils::stripSpace(temp, resultStr);

View File

@@ -21,14 +21,14 @@
* Keith Visco, kvisco@ziplink.net
* -- original author.
*
* $Id: NumberResult.cpp,v 1.1 2000-04-06 07:45:35 kvisco%ziplink.net Exp $
* $Id: NumberResult.cpp,v 1.2 2000-04-07 22:58:06 Peter.VanderBeken%pandora.be Exp $
*/
/**
* NumberResult
* Represents the a number as the result of evaluating an Expr
* @author <A HREF="mailto:kvisco@ziplink.net">Keith Visco</A>
* @version $Revision: 1.1 $ $Date: 2000-04-06 07:45:35 $
* @version $Revision: 1.2 $ $Date: 2000-04-07 22:58:06 $
**/
#include "ExprResult.h"
@@ -90,7 +90,7 @@ short NumberResult::getResultType() {
return ExprResult::NUMBER;
} //-- getResultType
void NumberResult::stringValue(String& str) {
void NumberResult::stringValue(DOMString& str) {
int intVal = (int)value;
if (intVal == value) { //-- no fraction
Integer::toString(intVal, str);

View File

@@ -21,7 +21,7 @@
* Keith Visco, kvisco@ziplink.net
* -- original author.
*
* $Id: RelationalExpr.cpp,v 1.1 2000-04-06 07:45:38 kvisco%ziplink.net Exp $
* $Id: RelationalExpr.cpp,v 1.2 2000-04-07 22:58:10 Peter.VanderBeken%pandora.be Exp $
*/
#include "Expr.h"
@@ -62,7 +62,7 @@ MBool RelationalExpr::compareResults(ExprResult* left, ExprResult* right) {
if (ltype == ExprResult::NODESET) {
NodeSet* nodeSet = (NodeSet*)left;
for ( int i = 0; i < nodeSet->size(); i++) {
String str;
DOMString str;
Node* node = nodeSet->get(i);
XMLDOMUtils::getNodeValue(node, &str);
StringResult strResult(str);
@@ -74,7 +74,7 @@ MBool RelationalExpr::compareResults(ExprResult* left, ExprResult* right) {
else if ( rtype == ExprResult::NODESET) {
NodeSet* nodeSet = (NodeSet*)right;
for ( int i = 0; i < nodeSet->size(); i++) {
String str;
DOMString str;
Node* node = nodeSet->get(i);
XMLDOMUtils::getNodeValue(node, &str);
StringResult strResult(str);

View File

@@ -21,14 +21,14 @@
* Keith Visco, kvisco@ziplink.net
* -- original author.
*
* $Id: StringFunctionCall.cpp,v 1.1 2000-04-06 07:45:41 kvisco%ziplink.net Exp $
* $Id: StringFunctionCall.cpp,v 1.2 2000-04-07 22:58:25 Peter.VanderBeken%pandora.be Exp $
*/
/**
* StringFunctionCall
* A representation of the XPath String funtions
* @author <A HREF="mailto:kvisco@ziplink.net">Keith Visco</A>
* @version $Revision: 1.1 $ $Date: 2000-04-06 07:45:41 $
* @version $Revision: 1.2 $ $Date: 2000-04-07 22:58:25 $
**/
#include "FunctionLib.h"
@@ -121,7 +121,7 @@ ExprResult* StringFunctionCall::evaluate(Node* context, ContextState* cs) {
break;
case STRING_LENGTH:
if ( requireParams(0, 1, cs) ) {
String resultStr;
DOMString resultStr;
if ( argc == 1) {
evaluateToString((Expr*)iter->next(),context, cs, resultStr);
}
@@ -225,7 +225,7 @@ ExprResult* StringFunctionCall::evaluate(Node* context, ContextState* cs) {
evaluateToString((Expr*)iter->next(),context, cs, resultStr);
}
else {
String temp;
DOMString temp;
XMLDOMUtils::getNodeValue(context, &temp);
if ( cs->isStripSpaceAllowed(context) ) {
XMLUtils::stripSpace(temp, resultStr);

View File

@@ -21,14 +21,14 @@
* Keith Visco, kvisco@ziplink.net
* -- original author.
*
* $Id: StringResult.cpp,v 1.1 2000-04-06 07:45:44 kvisco%ziplink.net Exp $
* $Id: StringResult.cpp,v 1.2 2000-04-07 22:58:41 Peter.VanderBeken%pandora.be Exp $
*/
/**
* StringResult
* Represents a String as a Result of evaluating an Expr
* @author <a href="mailto:kvisco@ziplink.net">Keith Visco</a>
* @version $Revision: 1.1 $ $Date: 2000-04-06 07:45:44 $
* @version $Revision: 1.2 $ $Date: 2000-04-07 22:58:41 $
**/
#include "ExprResult.h"
@@ -81,7 +81,7 @@ short StringResult::getResultType() {
return ExprResult::STRING;
} //-- getResultType
void StringResult::stringValue(String& str) {
void StringResult::stringValue(DOMString& str) {
str.append(this->value);
} //-- stringValue