diff --git a/mozilla/extensions/transformiix/source/xpath/AdditiveExpr.cpp b/mozilla/extensions/transformiix/source/xpath/AdditiveExpr.cpp
index 75c6c404083..267cbb6e189 100644
--- a/mozilla/extensions/transformiix/source/xpath/AdditiveExpr.cpp
+++ b/mozilla/extensions/transformiix/source/xpath/AdditiveExpr.cpp
@@ -21,7 +21,7 @@
* Keith Visco, kvisco@ziplink.net
* -- original author.
*
- * $Id: AdditiveExpr.cpp,v 1.1 2000-04-06 07:44:37 kvisco%ziplink.net Exp $
+ * $Id: AdditiveExpr.cpp,v 1.2 2001-07-02 20:10:48 sicking%bigfoot.com Exp $
*/
/**
@@ -30,20 +30,11 @@
* + : addition
* - : subtraction
* @author Keith Visco
- * @version $Revision: 1.1 $ $Date: 2000-04-06 07:44:37 $
+ * @version $Revision: 1.2 $ $Date: 2001-07-02 20:10:48 $
**/
#include "Expr.h"
-/**
- * Creates a new AdditiveExpr using the default operator (ADDITION)
-**/
-AdditiveExpr::AdditiveExpr() {
- this->op = ADDITION;
- this->leftExpr = 0;
- this->rightExpr = 0;
-} //-- AdditiveExpr
-
/**
* Creates a new AdditiveExpr using the given operator
**/
@@ -58,20 +49,6 @@ AdditiveExpr::~AdditiveExpr() {
delete rightExpr;
} //-- ~AdditiveExpr
-/**
- * Sets the left side of this AdditiveExpr
-**/
-void AdditiveExpr::setLeftExpr(Expr* leftExpr) {
- this->leftExpr = leftExpr;
-} //-- setLeftExpr
-
-/**
- * Sets the right side of this AdditiveExpr
-**/
-void AdditiveExpr::setRightExpr(Expr* rightExpr) {
- this->rightExpr = rightExpr;
-} //-- setRightExpr
-
/**
* Evaluates this Expr based on the given context node and processor state
* @param context the context node for evaluation of this Expr
diff --git a/mozilla/extensions/transformiix/source/xpath/AttributeExpr.cpp b/mozilla/extensions/transformiix/source/xpath/AttributeExpr.cpp
index 6c1ce61379a..63b9b96d870 100644
--- a/mozilla/extensions/transformiix/source/xpath/AttributeExpr.cpp
+++ b/mozilla/extensions/transformiix/source/xpath/AttributeExpr.cpp
@@ -21,7 +21,7 @@
* Keith Visco, kvisco@ziplink.net
* -- original author.
*
- * $Id: AttributeExpr.cpp,v 1.5 2001-06-26 14:07:18 peterv%netscape.com Exp $
+ * $Id: AttributeExpr.cpp,v 1.6 2001-07-02 20:10:49 sicking%bigfoot.com Exp $
*/
#include "Expr.h"
@@ -36,22 +36,26 @@ const String AttributeExpr::WILD_CARD = "*";
//- Constructors -/
-AttributeExpr::AttributeExpr() {
- this->isNameWild = MB_FALSE;
- this->isNamespaceWild = MB_FALSE;
-} //-- AttributeExpr
+AttributeExpr::AttributeExpr(String& name)
+{
+ if (name.isEqual(WILD_CARD)) {
+ isNameWild = MB_TRUE;
+ isNamespaceWild = MB_TRUE;
+ return;
+ }
-AttributeExpr::AttributeExpr(String& name) {
- this->isNameWild = MB_FALSE;
- this->isNamespaceWild = MB_FALSE;
- setName(name);
-} //-- AttributeExpr
+ int idx = name.indexOf(':');
+ if (idx >= 0)
+ name.subString(0, idx, prefix);
+ else
+ idx = -1;
-/**
- * Destructor
-**/
-AttributeExpr::~AttributeExpr() {
-} //-- ~AttributeExpr
+ name.subString(idx+1, this->name);
+
+ //-- set flags
+ isNamespaceWild = MB_FALSE;
+ isNameWild = this->name.isEqual(WILD_CARD);
+} //-- AttributeExpr
//------------------/
//- Public Methods -/
@@ -98,52 +102,10 @@ double AttributeExpr::getDefaultPriority(Node* node, Node* context, ContextState
return 0.0;
} //-- getDefaultPriority
-/**
- * Returns the name of this ElementExpr
- * @return the name of this ElementExpr
-**/
-const String& AttributeExpr::getName() {
- return (const String&) this->name;
-} //-- getName
-
-void AttributeExpr::setName(const String& name) {
-
- if (name.isEqual(WILD_CARD)) {
- this->isNameWild = MB_TRUE;
- this->isNamespaceWild = MB_TRUE;
- return;
- }
-
- int idx = name.indexOf(':');
- if ( idx >= 0 )
- name.subString(0,idx, this->prefix);
- else
- idx = -1;
-
- name.subString(idx+1, this->name);
-
- //-- set flags
- this->isNamespaceWild = MB_FALSE;
- this->isNameWild = this->name.isEqual(WILD_CARD);
-
-} //-- setName
-
-void AttributeExpr::setWild(MBool isWild) {
- this->isNameWild = isWild;
- this->isNamespaceWild = isWild;
-} //-- setWild
//-----------------------------/
//- Methods from NodeExpr.cpp -/
//-----------------------------/
-/**
- * Returns the type of this NodeExpr
- * @return the type of this NodeExpr
-**/
-short AttributeExpr::getType() {
- return NodeExpr::ATTRIBUTE_EXPR;
-} //-- getType
-
/**
* Determines whether this NodeExpr matches the given node within
* the given context
diff --git a/mozilla/extensions/transformiix/source/xpath/BasicNodeExpr.cpp b/mozilla/extensions/transformiix/source/xpath/BasicNodeExpr.cpp
index 1e92ace0d27..b8d4c344134 100644
--- a/mozilla/extensions/transformiix/source/xpath/BasicNodeExpr.cpp
+++ b/mozilla/extensions/transformiix/source/xpath/BasicNodeExpr.cpp
@@ -21,26 +21,18 @@
* Keith Visco, kvisco@ziplink.net
* -- original author.
*
- * $Id: BasicNodeExpr.cpp,v 1.5 2001-06-30 13:54:26 sicking%bigfoot.com Exp $
+ * $Id: BasicNodeExpr.cpp,v 1.6 2001-07-02 20:10:50 sicking%bigfoot.com Exp $
*/
#include "Expr.h"
/**
* @author Keith Visco
- * @version $Revision: 1.5 $ $Date: 2001-06-30 13:54:26 $
+ * @version $Revision: 1.6 $ $Date: 2001-07-02 20:10:50 $
**/
//- Constructors -/
-/**
- * Creates a new BasicNodeExpr, which matchs any Node
-**/
-BasicNodeExpr::BasicNodeExpr() {
- this->type = NodeExpr::NODE_EXPR;
- nodeNameSet = MB_FALSE;
-} //-- BasicNodeExpr
-
/**
* Creates a new BasicNodeExpr of the given type
**/
@@ -49,11 +41,6 @@ BasicNodeExpr::BasicNodeExpr(NodeExpr::NodeExprType nodeExprType) {
nodeNameSet = MB_FALSE;
} //-- BasicNodeExpr
-/**
- * Destroys this NodeExpr
-**/
-BasicNodeExpr::~BasicNodeExpr() {};
-
//------------------/
//- Public Methods -/
//------------------/
@@ -98,14 +85,6 @@ double BasicNodeExpr::getDefaultPriority(Node* node, Node* context,
return -0.5;
} //-- getDefaultPriority
-/**
- * Returns the type of this NodeExpr
- * @return the type of this NodeExpr
-**/
-short BasicNodeExpr::getType() {
- return type;
-} //-- getType
-
/**
* Determines whether this NodeExpr matches the given node within
* the given context
diff --git a/mozilla/extensions/transformiix/source/xpath/BooleanExpr.cpp b/mozilla/extensions/transformiix/source/xpath/BooleanExpr.cpp
index 2e21679b137..b76e5644d03 100644
--- a/mozilla/extensions/transformiix/source/xpath/BooleanExpr.cpp
+++ b/mozilla/extensions/transformiix/source/xpath/BooleanExpr.cpp
@@ -26,7 +26,7 @@
* - If the left hand was false, the right hand expression
* was not getting checked.
*
- * $Id: BooleanExpr.cpp,v 1.2 2000-05-24 05:00:25 kvisco%ziplink.net Exp $
+ * $Id: BooleanExpr.cpp,v 1.3 2001-07-02 20:10:50 sicking%bigfoot.com Exp $
*/
@@ -34,20 +34,11 @@
* Represents a BooleanExpr, a binary expression that
* performs a boolean operation between it's lvalue and rvalue:
* @author Keith Visco
- * @version $Revision: 1.2 $ $Date: 2000-05-24 05:00:25 $
+ * @version $Revision: 1.3 $ $Date: 2001-07-02 20:10:50 $
**/
#include "Expr.h"
-/**
- * Creates a new BooleanExpr using the default operator (AND)
-**/
-BooleanExpr::BooleanExpr() {
- this->op = AND;
- this->leftExpr = 0;
- this->rightExpr = 0;
-} //-- BooleanExpr
-
/**
* Creates a new BooleanExpr using the given operator
**/
@@ -62,20 +53,6 @@ BooleanExpr::~BooleanExpr() {
delete rightExpr;
} //-- ~BooleanExpr
-/**
- * Sets the left side of this AdditiveExpr
-**/
-void BooleanExpr::setLeftExpr(Expr* leftExpr) {
- this->leftExpr = leftExpr;
-} //-- setLeftExpr
-
-/**
- * Sets the right side of this AdditiveExpr
-**/
-void BooleanExpr::setRightExpr(Expr* rightExpr) {
- this->rightExpr = rightExpr;
-} //-- setRightExpr
-
/**
* Evaluates this Expr based on the given context node and processor state
* @param context the context node for evaluation of this Expr
diff --git a/mozilla/extensions/transformiix/source/xpath/BooleanFunctionCall.cpp b/mozilla/extensions/transformiix/source/xpath/BooleanFunctionCall.cpp
index 75ba94f1008..041e8d918af 100644
--- a/mozilla/extensions/transformiix/source/xpath/BooleanFunctionCall.cpp
+++ b/mozilla/extensions/transformiix/source/xpath/BooleanFunctionCall.cpp
@@ -24,7 +24,7 @@
* Marina Mechtcheriakova, mmarina@mindspring.com
* -- added lang() implementation
*
- * $Id: BooleanFunctionCall.cpp,v 1.8 2001-07-02 09:23:49 peterv%netscape.com Exp $
+ * $Id: BooleanFunctionCall.cpp,v 1.9 2001-07-02 20:10:50 sicking%bigfoot.com Exp $
*/
#include "FunctionLib.h"
@@ -33,32 +33,25 @@
/**
* Creates a default BooleanFunctionCall, which always evaluates to False
* @author Keith Visco
- * @version $Revision: 1.8 $ $Date: 2001-07-02 09:23:49 $
-**/
-BooleanFunctionCall::BooleanFunctionCall() : FunctionCall(XPathNames::FALSE_FN) {
- this->type = TX_FALSE;
-} //-- BooleanFunctionCall
-
-/**
- * Creates a BooleanFunctionCall of the given type
+ * @version $Revision: 1.9 $ $Date: 2001-07-02 20:10:50 $
**/
BooleanFunctionCall::BooleanFunctionCall(short type) : FunctionCall()
{
switch ( type ) {
case TX_BOOLEAN :
- FunctionCall::setName(XPathNames::BOOLEAN_FN);
+ name = XPathNames::BOOLEAN_FN;
break;
case TX_LANG:
- FunctionCall::setName(XPathNames::LANG_FN);
+ name = XPathNames::LANG_FN;
break;
case TX_NOT :
- FunctionCall::setName(XPathNames::NOT_FN);
+ name = XPathNames::NOT_FN;
break;
case TX_TRUE :
- FunctionCall::setName(XPathNames::TRUE_FN);
+ name = XPathNames::TRUE_FN;
break;
default:
- FunctionCall::setName(XPathNames::FALSE_FN);
+ name = XPathNames::FALSE_FN;
break;
}
this->type = type;
diff --git a/mozilla/extensions/transformiix/source/xpath/BooleanResult.cpp b/mozilla/extensions/transformiix/source/xpath/BooleanResult.cpp
index 487eb246242..e34ca7501d5 100644
--- a/mozilla/extensions/transformiix/source/xpath/BooleanResult.cpp
+++ b/mozilla/extensions/transformiix/source/xpath/BooleanResult.cpp
@@ -21,7 +21,7 @@
* Keith Visco, kvisco@ziplink.net
* -- original author.
*
- * $Id: BooleanResult.cpp,v 1.6 2001-01-22 09:36:14 kvisco%ziplink.net Exp $
+ * $Id: BooleanResult.cpp,v 1.7 2001-07-02 20:10:51 sicking%bigfoot.com Exp $
*/
/*
@@ -37,10 +37,6 @@ BooleanResult::BooleanResult() {
value = MB_FALSE;
} //-- BooleanResult
-BooleanResult::BooleanResult(const BooleanResult& boolResult) {
- this->value = boolResult.getValue();
-} //-- BooleanResult
-
/**
* Creates a new BooleanResult with the value of the given MBool parameter
* @param boolean the MBool to use for initialization of this BooleanResult's value
@@ -49,14 +45,6 @@ BooleanResult::BooleanResult(MBool boolean) {
this->value = boolean;
} //-- BooleanResult
-/**
- * Returns the value of this BooleanResult
- * @return the value of this BooleanResult
-**/
-MBool BooleanResult::getValue() const {
- return this->value;
-} //-- getValue
-
/*
* Virtual Methods from ExprResult
*/
diff --git a/mozilla/extensions/transformiix/source/xpath/ElementExpr.cpp b/mozilla/extensions/transformiix/source/xpath/ElementExpr.cpp
index a038410d1fa..256f27afc4f 100644
--- a/mozilla/extensions/transformiix/source/xpath/ElementExpr.cpp
+++ b/mozilla/extensions/transformiix/source/xpath/ElementExpr.cpp
@@ -21,7 +21,7 @@
* Keith Visco, kvisco@ziplink.net
* -- original author.
*
- * $Id: ElementExpr.cpp,v 1.6 2001-05-14 14:22:46 axel%pike.org Exp $
+ * $Id: ElementExpr.cpp,v 1.7 2001-07-02 20:10:51 sicking%bigfoot.com Exp $
*/
#include "Expr.h"
@@ -37,19 +37,20 @@ const String ElementExpr::WILD_CARD = "*";
//- Constructors -/
-ElementExpr::ElementExpr() {
- //-- do nothing
-} //-- ElementExpr
+ElementExpr::ElementExpr(String& name)
+{
+ int idx = name.indexOf(':');
+ if (idx >= 0)
+ name.subString(0, idx, prefix);
+ else
+ idx = -1;
-ElementExpr::ElementExpr(String& name) {
- setName(name);
-} //-- ElementExpr
+ name.subString(idx+1, this->name);
-/**
- * Destructor
-**/
-ElementExpr::~ElementExpr() {
-} //-- ~ElementExpr
+ //-- set flags
+ isNameWild = this->name.isEqual(WILD_CARD);
+ isNamespaceWild = (isNameWild && (prefix.length() == 0));
+} //-- ElementExpr
//------------------/
//- Public Methods -/
@@ -88,40 +89,10 @@ double ElementExpr::getDefaultPriority(Node* node, Node* context, ContextState*
return 0.0;
} //-- getDefaultPriority
-/**
- * Returns the name of this ElementExpr
- * @return the name of this ElementExpr
-**/
-const String& ElementExpr::getName() {
- return (const String&) this->name;
-} //-- getName
-
-void ElementExpr::setName(const String& name) {
- int idx = name.indexOf(':');
- if ( idx >= 0 )
- name.subString(0,idx, this->prefix);
- else
- idx = -1;
- name.subString(idx+1, this->name);
-
- //-- set flags
- this->isNameWild = this->name.isEqual(WILD_CARD);
- this->isNamespaceWild = (isNameWild && (this->prefix.length() == 0));
-} //-- setName
-
-
//-----------------------------/
//- Methods from NodeExpr.cpp -/
//-----------------------------/
-/**
- * Returns the type of this NodeExpr
- * @return the type of this NodeExpr
-**/
-short ElementExpr::getType() {
- return NodeExpr::ELEMENT_EXPR;
-} //-- getType
-
/**
* Determines whether this NodeExpr matches the given node within
* the given context
diff --git a/mozilla/extensions/transformiix/source/xpath/Expr.h b/mozilla/extensions/transformiix/source/xpath/Expr.h
index d4a9b1ad3ed..c8f7b5a1101 100644
--- a/mozilla/extensions/transformiix/source/xpath/Expr.h
+++ b/mozilla/extensions/transformiix/source/xpath/Expr.h
@@ -28,7 +28,7 @@
* -- removal of Patterns and some restructuring
* in the class set
*
- * $Id: Expr.h,v 1.14 2001-06-30 13:54:27 sicking%bigfoot.com Exp $
+ * $Id: Expr.h,v 1.15 2001-07-02 20:10:52 sicking%bigfoot.com Exp $
*/
@@ -49,7 +49,7 @@
/*
XPath class definitions.
Much of this code was ported from XSL:P.
- @version $Revision: 1.14 $ $Date: 2001-06-30 13:54:27 $
+ @version $Revision: 1.15 $ $Date: 2001-07-02 20:10:52 $
*/
//necessary prototypes
@@ -179,32 +179,18 @@ public:
**/
void addParam(Expr* expr);
- /**
- * Returns the name of this FunctionCall
- * @return the name of this FunctionCall
- **/
- const String& getName();
-
virtual MBool requireParams(int paramCountMin, ContextState* cs);
virtual MBool requireParams(int paramCountMin,
int paramCountMax,
ContextState* cs);
- /**
- * Sets the function name of this FunctionCall
- * @param name the name of this Function
- **/
- void setName(const String& name);
-
-
protected:
List params;
FunctionCall();
FunctionCall(const String& name);
- FunctionCall(const String& name, List* parameters);
/**
* Evaluates the given Expression and converts it's result to a String.
@@ -218,8 +204,6 @@ protected:
**/
double evaluateToNumber(Expr* expr, Node* context, ContextState* cs);
-private:
-
String name;
}; //-- FunctionCall
@@ -267,9 +251,7 @@ public:
TEXT_EXPR,
COMMENT_EXPR,
PI_EXPR,
- NODE_EXPR,
- WILD_CARD,
- ROOT_EXPR
+ NODE_EXPR
};
virtual ~NodeExpr() {};
@@ -278,12 +260,6 @@ public:
//- Public Methods -/
//------------------/
- /**
- * Returns the type of this NodeExpr
- * @return the type of this NodeExpr
- **/
- virtual short getType() = 0;
-
/**
* Virtual methods from Expr
**/
@@ -305,29 +281,12 @@ public:
//- Public Methods -/
//------------------/
- AttributeExpr();
AttributeExpr(String& name);
- virtual ~AttributeExpr();
-
- void setWild(MBool isWild);
-
- /**
- * Returns the name of this AttributeExpr
- * @return the name of this AttributeExpr
- **/
- const String& getName();
-
- /**
- * Sets the name of this AttributeExpr
- * @param name the name of the element that this AttributeExpr matches
- **/
- void setName(const String& name);
/**
* Virtual methods from NodeExpr
**/
virtual ExprResult* evaluate(Node* context, ContextState* cs);
- short getType();
virtual MBool matches(Node* node, Node* context, ContextState* cs);
virtual double getDefaultPriority(Node* node, Node* context, ContextState* cs);
virtual void toString(String& dest);
@@ -354,22 +313,11 @@ public:
//- Public Methods -/
//------------------/
- /**
- * Creates a new BasicNodeExpr of type NodeExpr::NODE_EXPR, which matches
- * any node
- **/
- BasicNodeExpr();
-
/**
* Creates a new BasicNodeExpr of the given type
**/
BasicNodeExpr(NodeExprType nodeExprType);
- /**
- * Destroys this BasicNodeExpr
- **/
- virtual ~BasicNodeExpr();
-
/**
* Sets the name of the node to match. Only availible for pi nodes
**/
@@ -379,7 +327,6 @@ public:
* Virtual methods from NodeExpr
**/
virtual ExprResult* evaluate(Node* context, ContextState* cs);
- short getType();
virtual MBool matches(Node* node, Node* context, ContextState* cs);
virtual double getDefaultPriority(Node* node, Node* context, ContextState* cs);
virtual void toString(String& dest);
@@ -402,27 +349,12 @@ public:
//- Public Methods -/
//------------------/
- ElementExpr();
ElementExpr(String& name);
- virtual ~ElementExpr();
-
- /**
- * Returns the name of this ElementExpr
- * @return the name of this ElementExpr
- **/
- const String& getName();
-
- /**
- * Sets the name of this ElementExpr
- * @param name the name of the element that this ElementExpr matches
- **/
- void setName(const String& name);
/**
* Virtual methods from NodeExpr
**/
virtual ExprResult* evaluate(Node* context, ContextState* cs);
- short getType();
virtual double getDefaultPriority(Node* node, Node* context, ContextState* cs);
virtual MBool matches(Node* node, Node* context, ContextState* cs);
virtual void toString(String& dest);
@@ -432,11 +364,8 @@ private:
static const String WILD_CARD;
String name;
-
MBool isNamespaceWild;
-
MBool isNameWild;
-
String prefix;
}; //-- ElementExpr
@@ -456,7 +385,6 @@ public:
* Virtual methods from NodeExpr
**/
virtual ExprResult* evaluate(Node* context, ContextState* cs);
- virtual short getType();
virtual MBool matches(Node* node, Node* context, ContextState* cs);
virtual double getDefaultPriority(Node* node, Node* context, ContextState* cs);
virtual void toString(String& dest);
@@ -495,12 +423,6 @@ public:
**/
MBool isEmpty();
- /**
- * Removes the given Expr from the list
- * @param expr the Expr to remove from the list
- **/
- Expr* remove(Expr* expr);
-
/**
* Returns the String representation of this PredicateList.
* @param dest the String to use when creating the String
@@ -538,19 +460,6 @@ public:
SELF_AXIS
};
- /**
- * Creates a new LocationStep using the default Axis Identifier and no
- * NodeExpr (which matches nothing)
- **/
- LocationStep();
-
- /**
- * Creates a new LocationStep using the default Axis Identifier and
- * the given NodeExpr
- * @param nodeExpr the NodeExpr to use when matching Nodes
- **/
- LocationStep(NodeExpr* nodeExpr);
-
/**
* Creates a new LocationStep using the given NodeExpr and Axis Identifier
* @param nodeExpr the NodeExpr to use when matching Nodes
@@ -563,18 +472,6 @@ public:
**/
virtual ~LocationStep();
- /**
- * Sets the Axis Identifier for this LocationStep
- * @param axisIdentifier the Axis in which to search for nodes
- **/
- void setAxisIdentifier(short axisIdentifier);
-
- /**
- * Sets the NodeExpr of this LocationStep for use when matching nodes
- * @param nodeExpr the NodeExpr to use when matching nodes
- **/
- void setNodeExpr(NodeExpr* nodeExpr);
-
/**
* Virtual methods from Expr
**/
@@ -598,12 +495,6 @@ class FilterExpr : public PredicateList, public Expr {
public:
- /**
- * Creates a new FilterExpr using the default no default Expr
- * (which evaluates to nothing)
- **/
- FilterExpr();
-
/**
* Creates a new FilterExpr using the given Expr
* @param expr the Expr to use for evaluation
@@ -615,12 +506,6 @@ public:
**/
virtual ~FilterExpr();
- /**
- * Sets the Expr of this FilterExpr for evaluation
- * @param expr the Expr to use for evaluation
- **/
- void setExpr(Expr* expr);
-
/**
* Virtual methods from Expr
**/
@@ -630,7 +515,6 @@ public:
virtual void toString(String& dest);
private:
-
Expr* expr;
}; //-- FilterExpr
@@ -640,9 +524,7 @@ class NumberExpr : public Expr {
public:
- NumberExpr();
NumberExpr(double dbl);
- ~NumberExpr();
/**
* Virtual methods from Expr
@@ -662,11 +544,7 @@ class StringExpr : public Expr {
public:
- StringExpr();
- StringExpr(String& value);
StringExpr(const String& value);
- StringExpr(const char* value);
- ~StringExpr();
/**
* Virtual methods from Expr
@@ -694,21 +572,9 @@ public:
//-- LF, changed from static const short to enum
enum _AdditiveExprType { ADDITION = 1, SUBTRACTION };
- AdditiveExpr();
AdditiveExpr(Expr* leftExpr, Expr* rightExpr, short op);
~AdditiveExpr();
- /**
- * Sets the left side of this AdditiveExpr
- **/
- void setLeftExpr(Expr* leftExpr);
-
- /**
- * Sets the right side of this AdditiveExpr
- **/
- void setRightExpr(Expr* rightExpr);
-
-
/**
* Virtual methods from Expr
**/
@@ -728,15 +594,9 @@ class UnaryExpr : public Expr {
public:
- UnaryExpr();
UnaryExpr(Expr* expr);
~UnaryExpr();
- /**
- * Sets the expression to negate
- **/
- void setExpr(Expr* expr);
-
/**
* Virtual methods from Expr
**/
@@ -758,21 +618,9 @@ public:
//-- BooleanExpr Types
enum _BooleanExprType { AND = 1, OR };
- BooleanExpr();
BooleanExpr(Expr* leftExpr, Expr* rightExpr, short op);
~BooleanExpr();
- /**
- * Sets the left side of this BooleanExpr
- **/
- void setLeftExpr(Expr* leftExpr);
-
- /**
- * Sets the right side of this BooleanExpr
- **/
- void setRightExpr(Expr* rightExpr);
-
-
/**
* Virtual methods from Expr
**/
@@ -801,20 +649,9 @@ public:
//-- LF, changed from static const short to enum
enum _MultiplicativeExprType { DIVIDE = 1, MULTIPLY, MODULUS };
- MultiplicativeExpr();
MultiplicativeExpr(Expr* leftExpr, Expr* rightExpr, short op);
~MultiplicativeExpr();
- /**
- * Sets the left side of this MultiplicativeExpr
- **/
- void setLeftExpr(Expr* leftExpr);
-
- /**
- * Sets the right side of this MultiplicativeExpr
- **/
- void setRightExpr(Expr* rightExpr);
-
/**
* Virtual methods from Expr
**/
@@ -852,7 +689,6 @@ public:
GREATER_OR_EQUAL
};
- RelationalExpr();
RelationalExpr(Expr* leftExpr, Expr* rightExpr, short op);
~RelationalExpr();
@@ -878,15 +714,7 @@ class VariableRefExpr : public Expr {
public:
- VariableRefExpr();
VariableRefExpr(const String& name);
- VariableRefExpr(String& name);
- ~VariableRefExpr();
-
- /**
- * Sets the name of the variable of reference
- **/
- void setName(const String& name);
/**
* Virtual methods from Expr
@@ -921,21 +749,12 @@ public:
**/
virtual ~PathExpr();
- /**
- * Adds the Expr to this PathExpr
- * @param expr the Expr to add to this PathExpr
- * @param index the index at which to add the given Expr
- **/
- void addExpr(int index, Expr* expr, short ancestryOp);
-
/**
* Adds the Expr to this PathExpr
* @param expr the Expr to add to this PathExpr
**/
void addExpr(Expr* expr, short ancestryOp);
- virtual MBool isAbsolute();
-
/**
* Virtual methods from Expr
**/
@@ -946,6 +765,8 @@ public:
private:
+ virtual MBool isAbsolute();
+
struct PathExprItem {
Expr* expr;
short ancestryOp;
@@ -984,9 +805,6 @@ public:
virtual double getDefaultPriority(Node* node, Node* context, ContextState* cs);
virtual void toString(String& dest);
- virtual MBool isAbsolute();
-
-
}; //-- RootExpr
/**
@@ -1012,12 +830,6 @@ public:
**/
void addExpr(Expr* expr);
- /**
- * Adds the PathExpr to this UnionExpr at the specified index
- * @param expr the Expr to add to this UnionExpr
- **/
- void addExpr(int index, Expr* expr);
-
/**
* Virtual methods from Expr
**/
diff --git a/mozilla/extensions/transformiix/source/xpath/ExprParser.cpp b/mozilla/extensions/transformiix/source/xpath/ExprParser.cpp
index aeed35dd446..4db8801e961 100644
--- a/mozilla/extensions/transformiix/source/xpath/ExprParser.cpp
+++ b/mozilla/extensions/transformiix/source/xpath/ExprParser.cpp
@@ -30,7 +30,7 @@
* -- fixed bug in ::parsePredicates,
* made sure we continue looking for more predicates.
*
- * $Id: ExprParser.cpp,v 1.15 2001-07-02 09:24:06 peterv%netscape.com Exp $
+ * $Id: ExprParser.cpp,v 1.16 2001-07-02 20:10:52 sicking%bigfoot.com Exp $
*/
/**
@@ -38,7 +38,7 @@
* This class is used to parse XSL Expressions
* @author Keith Visco
* @see ExprLexer
- * @version $Revision: 1.15 $ $Date: 2001-07-02 09:24:06 $
+ * @version $Revision: 1.16 $ $Date: 2001-07-02 20:10:52 $
**/
#include "ExprParser.h"
@@ -168,12 +168,6 @@ Expr* ExprParser::createPatternExpr(const String& pattern) {
return expr;
} //-- createPatternExpr
-LocationStep* ExprParser::createLocationStep(const String& path) {
- ExprLexer lexer(path);
- LocationStep* lstep = createLocationStep(lexer);
- return lstep;
-} //-- createLocationPath
-
//--------------------/
//- Private Methods -/
//-------------------/
@@ -353,8 +347,7 @@ Expr* ExprParser::createFilterExpr(ExprLexer& lexer) {
if (lexer.peek()->type == Token::L_BRACKET) {
- FilterExpr* filterExpr = new FilterExpr();
- filterExpr->setExpr(expr);
+ FilterExpr* filterExpr = new FilterExpr(expr);
//-- handle predicates
if (!parsePredicates(filterExpr, lexer)) {
@@ -396,7 +389,7 @@ FunctionCall* ExprParser::createFunctionCall(ExprLexer& lexer) {
fnCall = new NodeSetFunctionCall(NodeSetFunctionCall::COUNT);
}
else if (XPathNames::FALSE_FN.isEqual(tok->value)) {
- fnCall = new BooleanFunctionCall();
+ fnCall = new BooleanFunctionCall(BooleanFunctionCall::TX_FALSE);
}
else if (XPathNames::ID_FN.isEqual(tok->value)) {
fnCall = new NodeSetFunctionCall(NodeSetFunctionCall::ID);
@@ -480,8 +473,6 @@ FunctionCall* ExprParser::createFunctionCall(ExprLexer& lexer) {
LocationStep* ExprParser::createLocationStep(ExprLexer& lexer) {
- LocationStep* lstep = new LocationStep();
-
//-- child axis is default
short axisIdentifier = LocationStep::CHILD_AXIS;
NodeExpr* nodeExpr = 0;
@@ -534,7 +525,6 @@ LocationStep* ExprParser::createLocationStep(ExprLexer& lexer) {
axisIdentifier = LocationStep::SELF_AXIS;
}
else {
- delete lstep;
//XXX ErrorReport: unknow axis
return 0;
}
@@ -549,13 +539,13 @@ LocationStep* ExprParser::createLocationStep(ExprLexer& lexer) {
//-- eat token
lexer.nextToken();
axisIdentifier = LocationStep::PARENT_AXIS;
- nodeExpr = new BasicNodeExpr();
+ nodeExpr = new BasicNodeExpr(NodeExpr::NODE_EXPR);
break;
case Token::SELF_NODE :
//-- eat token
lexer.nextToken();
axisIdentifier = LocationStep::SELF_AXIS;
- nodeExpr = new BasicNodeExpr();
+ nodeExpr = new BasicNodeExpr(NodeExpr::NODE_EXPR);
break;
default:
break;
@@ -578,14 +568,12 @@ LocationStep* ExprParser::createLocationStep(ExprLexer& lexer) {
lexer.pushBack();
nodeExpr = createNodeExpr(lexer);
if (!nodeExpr) {
- delete lstep;
return 0;
}
}
}
- lstep->setAxisIdentifier(axisIdentifier);
- lstep->setNodeExpr(nodeExpr);
+ LocationStep* lstep = new LocationStep(nodeExpr, axisIdentifier);
//-- handle predicates
if (!parsePredicates(lstep, lexer)) {
@@ -611,7 +599,7 @@ NodeExpr* ExprParser::createNodeExpr(ExprLexer& lexer) {
nodeExpr = new BasicNodeExpr(NodeExpr::COMMENT_EXPR);
break;
case Token::NODE :
- nodeExpr = new BasicNodeExpr();
+ nodeExpr = new BasicNodeExpr(NodeExpr::NODE_EXPR);
break;
case Token::PROC_INST :
nodeExpr = new BasicNodeExpr(NodeExpr::PI_EXPR);
diff --git a/mozilla/extensions/transformiix/source/xpath/ExprParser.h b/mozilla/extensions/transformiix/source/xpath/ExprParser.h
index 51c46d330a9..3697a9a8471 100644
--- a/mozilla/extensions/transformiix/source/xpath/ExprParser.h
+++ b/mozilla/extensions/transformiix/source/xpath/ExprParser.h
@@ -21,14 +21,14 @@
* Keith Visco, kvisco@ziplink.net
* -- original author.
*
- * $Id: ExprParser.h,v 1.5 2001-06-30 13:54:30 sicking%bigfoot.com Exp $
+ * $Id: ExprParser.h,v 1.6 2001-07-02 20:10:54 sicking%bigfoot.com Exp $
*/
/**
* ExprParser
* This class is used to parse XSL Expressions
* @author Keith Visco
- * @version $Revision: 1.5 $ $Date: 2001-06-30 13:54:30 $
+ * @version $Revision: 1.6 $ $Date: 2001-07-02 20:10:54 $
* @see ExprLexer
**/
@@ -56,7 +56,6 @@ public:
Expr* createExpr (const String& pattern);
Expr* createPatternExpr (const String& pattern);
- LocationStep* createLocationStep(const String& path);
/**
* Creates an Attribute Value Template using the given value
diff --git a/mozilla/extensions/transformiix/source/xpath/ExprResult.h b/mozilla/extensions/transformiix/source/xpath/ExprResult.h
index f5f67aef231..56128ced8ec 100644
--- a/mozilla/extensions/transformiix/source/xpath/ExprResult.h
+++ b/mozilla/extensions/transformiix/source/xpath/ExprResult.h
@@ -23,7 +23,7 @@
* Larry Fitzpatrick, OpenText, lef@opentext.com
* -- changed constant short result types to enum
*
- * $Id: ExprResult.h,v 1.10 2001-05-12 09:54:15 nisheeth%netscape.com Exp $
+ * $Id: ExprResult.h,v 1.11 2001-07-02 20:10:55 sicking%bigfoot.com Exp $
*/
#ifndef TRANSFRMX_EXPRRESULT_H
@@ -88,9 +88,6 @@ public:
BooleanResult();
BooleanResult(MBool boolean);
- BooleanResult(const BooleanResult& boolResult);
-
- MBool getValue() const;
virtual short getResultType();
virtual void stringValue(String& str);
@@ -107,10 +104,6 @@ public:
NumberResult();
NumberResult(double dbl);
- NumberResult(const NumberResult& nbrResult);
-
- double getValue() const;
- MBool isNaN() const;
virtual short getResultType();
virtual void stringValue(String& str);
@@ -128,13 +121,9 @@ class StringResult : public ExprResult {
public:
StringResult();
- StringResult(String& str);
StringResult(const String& str);
- StringResult(const StringResult& strResult);
StringResult(const char* str);
- String& getValue();
-
virtual short getResultType();
virtual void stringValue(String& str);
virtual MBool booleanValue();
diff --git a/mozilla/extensions/transformiix/source/xpath/FilterExpr.cpp b/mozilla/extensions/transformiix/source/xpath/FilterExpr.cpp
index 85242508a57..5a027e1edd5 100644
--- a/mozilla/extensions/transformiix/source/xpath/FilterExpr.cpp
+++ b/mozilla/extensions/transformiix/source/xpath/FilterExpr.cpp
@@ -23,7 +23,7 @@
* Bob Miller, kbob@oblix.com
* -- plugged core leak.
*
- * $Id: FilterExpr.cpp,v 1.1 2000-04-06 07:45:30 kvisco%ziplink.net Exp $
+ * $Id: FilterExpr.cpp,v 1.2 2001-07-02 20:10:56 sicking%bigfoot.com Exp $
*/
#include "Expr.h"
@@ -31,15 +31,11 @@
/**
* @author Keith Visco
- * @version $Revision: 1.1 $ $Date: 2000-04-06 07:45:30 $
+ * @version $Revision: 1.2 $ $Date: 2001-07-02 20:10:56 $
**/
//-- Implementation of FilterExpr --/
-FilterExpr::FilterExpr() : PredicateList() {
- expr = 0;
-}
-
/**
* Creates a new FilterExpr using the given Expr
* @param expr the Expr to use for evaluation
@@ -55,15 +51,6 @@ FilterExpr::~FilterExpr() {
delete expr;
} //-- ~FilterExpr
-/**
- * Sets the Expr of this FilterExpr for use during evaluation
- * @param expr the Expr to use for evaluation
-**/
-void FilterExpr::setExpr(Expr* expr) {
- this->expr = expr;
-} //-- setExpr
-
-
//------------------------------------/
//- Virtual methods from PatternExpr -/
//------------------------------------/
diff --git a/mozilla/extensions/transformiix/source/xpath/FunctionCall.cpp b/mozilla/extensions/transformiix/source/xpath/FunctionCall.cpp
index 4f316e5ea54..e313f8455eb 100644
--- a/mozilla/extensions/transformiix/source/xpath/FunctionCall.cpp
+++ b/mozilla/extensions/transformiix/source/xpath/FunctionCall.cpp
@@ -21,7 +21,7 @@
* Keith Visco, kvisco@ziplink.net
* -- original author.
*
- * $Id: FunctionCall.cpp,v 1.3 2001-06-30 13:54:31 sicking%bigfoot.com Exp $
+ * $Id: FunctionCall.cpp,v 1.4 2001-07-02 20:10:56 sicking%bigfoot.com Exp $
*/
#include "Expr.h"
@@ -29,7 +29,7 @@
/**
* This class represents a FunctionCall as defined by the XSL Working Draft
* @author Keith Visco
- * @version $Revision: 1.3 $ $Date: 2001-06-30 13:54:31 $
+ * @version $Revision: 1.4 $ $Date: 2001-07-02 20:10:56 $
**/
const String FunctionCall::INVALID_PARAM_COUNT =
@@ -55,27 +55,6 @@ FunctionCall::FunctionCall(const String& name)
this->name = name;
} //-- FunctionCall
-/**
- * Creates a new FunctionCall with the given function name and parameter list
- * Note: The object references in parameters will be deleted when this
- * FunctionCall gets destroyed.
-**/
-FunctionCall::FunctionCall(const String& name, List* parameters)
-{
- //-- copy name
- this->name = name;
-
- if (parameters) {
- ListIterator* pIter = parameters->iterator();
- while (pIter->hasNext()) {
- params.add(pIter->next());
- }
- delete pIter;
- }
-
-} //-- FunctionCall
-
-
/**
* Destructor
**/
@@ -160,15 +139,6 @@ double FunctionCall::evaluateToNumber(Expr* expr, Node* context,
return result;
} //-- evaluateToNumber
-/**
- * Returns the name of this FunctionCall
- * @return the name of this FunctionCall
-**/
-const String& FunctionCall::getName()
-{
- return (const String&)this->name;
-} //-- getName
-
/**
* Called to check number of parameters
**/
@@ -201,16 +171,6 @@ MBool FunctionCall::requireParams(int paramCountMin, ContextState* cs)
return MB_TRUE;
} //-- requireParams
-/**
- * Sets the function name of this FunctionCall
- * @param name the name of this Function
-**/
-void FunctionCall::setName(const String& name)
-{
- this->name.clear();
- this->name.append(name);
-} //-- setName
-
/**
* Returns the String representation of this NodeExpr.
* @param dest the String to use when creating the String
diff --git a/mozilla/extensions/transformiix/source/xpath/FunctionLib.h b/mozilla/extensions/transformiix/source/xpath/FunctionLib.h
index 12523371017..8e6af730ec3 100644
--- a/mozilla/extensions/transformiix/source/xpath/FunctionLib.h
+++ b/mozilla/extensions/transformiix/source/xpath/FunctionLib.h
@@ -27,7 +27,7 @@
* Marina Mechtcheriakova
* -- added support for lang function
*
- * $Id: FunctionLib.h,v 1.10 2001-04-08 14:34:04 peterv%netscape.com Exp $
+ * $Id: FunctionLib.h,v 1.11 2001-07-02 20:10:57 sicking%bigfoot.com Exp $
*/
#ifndef TRANSFRMX_FUNCTIONLIB_H
@@ -115,11 +115,6 @@ public:
enum booleanFunctions { TX_BOOLEAN = 1, TX_FALSE, TX_LANG, TX_NOT, TX_TRUE };
- /**
- * Creates a default BooleanFunctionCall, which always evaluates to False
- **/
- BooleanFunctionCall();
-
/**
* Creates a BooleanFunctionCall of the given type
**/
@@ -265,11 +260,6 @@ public:
POSITION //-- position()
};
- /**
- * Creates a default NodeSetFunction call. Position function is the default.
- **/
- NodeSetFunctionCall();
-
/**
* Creates a NodeSetFunctionCall of the given type
**/
@@ -309,11 +299,6 @@ public:
TRANSLATE //-- translate()
};
- /**
- * Creates a default String function. String() function is the default.
- **/
- StringFunctionCall();
-
/**
* Creates a String function of the given type
**/
@@ -349,11 +334,6 @@ public:
SUM //-- sum()
};
- /**
- * Creates a default Number function. number() function is the default.
- **/
- NumberFunctionCall();
-
/**
* Creates a Number function of the given type
**/
diff --git a/mozilla/extensions/transformiix/source/xpath/LocationStep.cpp b/mozilla/extensions/transformiix/source/xpath/LocationStep.cpp
index c3d536a36a9..317c8f6d0ac 100644
--- a/mozilla/extensions/transformiix/source/xpath/LocationStep.cpp
+++ b/mozilla/extensions/transformiix/source/xpath/LocationStep.cpp
@@ -21,35 +21,16 @@
* Keith Visco, kvisco@ziplink.net
* -- original author.
*
- * $Id: LocationStep.cpp,v 1.8 2001-06-26 14:08:19 peterv%netscape.com Exp $
+ * $Id: LocationStep.cpp,v 1.9 2001-07-02 20:10:57 sicking%bigfoot.com Exp $
*/
/*
Implementation of an XPath LocationStep
- @version $Revision: 1.8 $ $Date: 2001-06-26 14:08:19 $
+ @version $Revision: 1.9 $ $Date: 2001-07-02 20:10:57 $
*/
#include "Expr.h"
-/**
- * Creates a new LocationStep using the default Axis Identifier and no
- * NodeExpr (which matches nothing)
-**/
-LocationStep::LocationStep() : PredicateList() {
- nodeExpr = 0;
- this->axisIdentifier = CHILD_AXIS;
-} //-- LocationStep
-
-/**
- * Creates a new LocationStep using the default Axis Identifier and
- * the given NodeExpr
- * @param nodeExpr the NodeExpr to use when matching Nodes
-**/
-LocationStep::LocationStep(NodeExpr* nodeExpr) : PredicateList() {
- this->nodeExpr = nodeExpr;
- this->axisIdentifier = CHILD_AXIS;
-} //-- LocationStep
-
/**
* Creates a new LocationStep using the given NodeExpr and Axis Identifier
* @param nodeExpr the NodeExpr to use when matching Nodes
@@ -69,26 +50,6 @@ LocationStep::~LocationStep() {
delete nodeExpr;
} //-- ~LocationStep
-/**
- * Sets the Axis Identifier for this LocationStep
- * @param axisIdentifier the Axis in which to search for nodes
-**/
-void LocationStep::setAxisIdentifier(short axisIdentifier) {
- this->axisIdentifier = axisIdentifier;
-} //-- setAxisIdentifier
-
-
-/**
- * Sets the NodeExpr of this LocationStep for use when matching nodes
- * @param nodeExpr the NodeExpr to use when matching nodes
-**/
-void LocationStep::setNodeExpr(NodeExpr* nodeExpr) {
- // delete current NodeExpr
- if (this->nodeExpr) delete this->nodeExpr;
- this->nodeExpr = nodeExpr;
-} //-- setNodeExpr
-
-
//------------------------------------/
//- Virtual methods from PatternExpr -/
//------------------------------------/
diff --git a/mozilla/extensions/transformiix/source/xpath/MultiplicativeExpr.cpp b/mozilla/extensions/transformiix/source/xpath/MultiplicativeExpr.cpp
index 27b2bf0b5a7..cd17416acbe 100644
--- a/mozilla/extensions/transformiix/source/xpath/MultiplicativeExpr.cpp
+++ b/mozilla/extensions/transformiix/source/xpath/MultiplicativeExpr.cpp
@@ -21,7 +21,7 @@
* Keith Visco, kvisco@ziplink.net
* -- original author.
*
- * $Id: MultiplicativeExpr.cpp,v 1.2 2001-04-08 14:39:37 peterv%netscape.com Exp $
+ * $Id: MultiplicativeExpr.cpp,v 1.3 2001-07-02 20:10:57 sicking%bigfoot.com Exp $
*/
/**
@@ -31,21 +31,12 @@
* mod : modulus
* div : divide
* @author Keith Visco
- * @version $Revision: 1.2 $ $Date: 2001-04-08 14:39:37 $
+ * @version $Revision: 1.3 $ $Date: 2001-07-02 20:10:57 $
**/
#include "Expr.h"
#include
-/**
- * Creates a new MultiplicativeExpr using the default operator (MULTIPLY)
-**/
-MultiplicativeExpr::MultiplicativeExpr() {
- this->op = MULTIPLY;
- this->leftExpr = 0;
- this->rightExpr = 0;
-} //-- RelationalExpr
-
/**
* Creates a new MultiplicativeExpr using the given operator
**/
@@ -60,20 +51,6 @@ MultiplicativeExpr::~MultiplicativeExpr() {
delete rightExpr;
} //-- ~MultiplicativeExpr
-/**
- * Sets the left side of this MultiplicativeExpr
-**/
-void MultiplicativeExpr::setLeftExpr(Expr* leftExpr) {
- this->leftExpr = leftExpr;
-} //-- setLeftExpr
-
-/**
- * Sets the right side of this MultiplicativeExpr
-**/
-void MultiplicativeExpr::setRightExpr(Expr* rightExpr) {
- this->rightExpr = rightExpr;
-} //-- setRightExpr
-
/**
* Evaluates this Expr based on the given context node and processor state
* @param context the context node for evaluation of this Expr
diff --git a/mozilla/extensions/transformiix/source/xpath/NodeSet.cpp b/mozilla/extensions/transformiix/source/xpath/NodeSet.cpp
index d92b6c8515f..78f5e6c514b 100644
--- a/mozilla/extensions/transformiix/source/xpath/NodeSet.cpp
+++ b/mozilla/extensions/transformiix/source/xpath/NodeSet.cpp
@@ -39,7 +39,7 @@
* NodeSet
* This class was ported from XSL:P.
* @author Keith Visco
- * @version $Revision: 1.9 $ $Date: 2001-06-10 16:44:10 $
+ * @version $Revision: 1.10 $ $Date: 2001-07-02 20:10:57 $
**/
@@ -167,25 +167,6 @@ void NodeSet::copyInto(NodeSet& dest) const {
for ( int i = 0; i < elementCount; i++ ) dest.add(elements[i]);
} //-- copyInto
-/**
- * Compares the specified object with this NodeSet for equality.
- * Returns true if and only if the specified Object is a NodeSet
- * that is the same size as this NodeSet and all of its associated
- * Nodes are contained within this NodeSet.
- * @return true if and only if the specified Object is a NodeSet
- * that is the same size as this NodeSet and all of its associated
- * Nodes are contained within this NodeSet.
-**/
-MBool NodeSet::equals(NodeSet* nodeSet) {
- if (!nodeSet) return MB_FALSE;
- if (nodeSet->size() != size()) return MB_FALSE;
-
- for (int i = 0; i < size(); i++) {
- if (!nodeSet->contains(get(i))) return MB_FALSE;
- }
- return MB_TRUE;
-} //-- equals
-
/**
* Returns the Node at the specified position in this NodeSet.
* @param index the position of the Node to return
@@ -254,7 +235,6 @@ MBool NodeSet::remove(Node* node) {
return MB_TRUE;
} //-- remove
-
/**
* Enables or disables checking for duplicates. By default
* the #add method will check for duplicate nodes. This should
diff --git a/mozilla/extensions/transformiix/source/xpath/NodeSet.h b/mozilla/extensions/transformiix/source/xpath/NodeSet.h
index 48dfd178e83..716b2ef3ac0 100644
--- a/mozilla/extensions/transformiix/source/xpath/NodeSet.h
+++ b/mozilla/extensions/transformiix/source/xpath/NodeSet.h
@@ -24,13 +24,13 @@
* Larry Fitzpatrick, OpenText, lef@opentext.com
* -- moved initialization of DEFAULT_SIZE to NodeSet.cpp
*
- * $Id: NodeSet.h,v 1.7 2001-04-08 14:36:12 peterv%netscape.com Exp $
+ * $Id: NodeSet.h,v 1.8 2001-07-02 20:10:58 sicking%bigfoot.com Exp $
*/
/**
* NodeSet
* @author Keith Visco
- * @version $Revision: 1.7 $ $Date: 2001-04-08 14:36:12 $
+ * @version $Revision: 1.8 $ $Date: 2001-07-02 20:10:58 $
**/
#ifndef TRANSFRMX_NODESET_H
@@ -104,17 +104,6 @@ public:
**/
void copyInto(NodeSet& dest) const;
- /**
- * Compares the specified object with this NodeSet for equality.
- * Returns true if and only if the specified Object is a NodeSet
- * that is the same size as this NodeSet and all of its associated
- * Nodes are contained within this NodeSet.
- * @return true if and only if the specified Object is a NodeSet
- * that is the same size as this NodeSet and all of its associated
- * Nodes are contained within this NodeSet.
- **/
- MBool equals(NodeSet* nodeSet);
-
/**
* Returns the Node at the specified position in this NodeSet.
* @param index the position of the Node to return
@@ -156,7 +145,6 @@ public:
**/
MBool remove(Node* node);
-
/**
* Enables or disables checking for duplicates. By default
* the #add method will check for duplicate nodes. This should
diff --git a/mozilla/extensions/transformiix/source/xpath/NodeSetFunctionCall.cpp b/mozilla/extensions/transformiix/source/xpath/NodeSetFunctionCall.cpp
index 1efc65ee203..d3e0effb763 100644
--- a/mozilla/extensions/transformiix/source/xpath/NodeSetFunctionCall.cpp
+++ b/mozilla/extensions/transformiix/source/xpath/NodeSetFunctionCall.cpp
@@ -24,14 +24,14 @@
* Marina Mechtcheriakova, mmarina@mindspring.com
* -- changed some behavoir to be more compliant with spec
*
- * $Id: NodeSetFunctionCall.cpp,v 1.7 2001-06-26 14:09:10 peterv%netscape.com Exp $
+ * $Id: NodeSetFunctionCall.cpp,v 1.8 2001-07-02 20:10:59 sicking%bigfoot.com Exp $
*/
/**
* NodeSetFunctionCall
* A representation of the XPath NodeSet funtions
* @author Keith Visco
- * @version $Revision: 1.7 $ $Date: 2001-06-26 14:09:10 $
+ * @version $Revision: 1.8 $ $Date: 2001-07-02 20:10:59 $
**/
#include "FunctionLib.h"
@@ -39,14 +39,6 @@
#include "XMLDOMUtils.h"
#include
-/**
- * Creates a default NodeSetFunctionCall. The Position function
- * is the default
-**/
-NodeSetFunctionCall::NodeSetFunctionCall() : FunctionCall(XPathNames::POSITION_FN) {
- type = POSITION;
-} //-- NodeSetFunctionCall
-
/**
* Creates a NodeSetFunctionCall of the given type
**/
@@ -54,25 +46,25 @@ NodeSetFunctionCall::NodeSetFunctionCall(short type) : FunctionCall() {
this->type = type;
switch ( type ) {
case COUNT :
- FunctionCall::setName(XPathNames::COUNT_FN);
+ name = XPathNames::COUNT_FN;
break;
case ID :
- FunctionCall::setName(XPathNames::ID_FN);
+ name = XPathNames::ID_FN;
break;
case LAST :
- FunctionCall::setName(XPathNames::LAST_FN);
+ name = XPathNames::LAST_FN;
break;
case LOCAL_NAME:
- FunctionCall::setName(XPathNames::LOCAL_NAME_FN);
+ name = XPathNames::LOCAL_NAME_FN;
break;
case NAME:
- FunctionCall::setName(XPathNames::NAME_FN);
+ name = XPathNames::NAME_FN;
break;
case NAMESPACE_URI:
- FunctionCall::setName(XPathNames::NAMESPACE_URI_FN);
+ name = XPathNames::NAMESPACE_URI_FN;
break;
default:
- FunctionCall::setName(XPathNames::POSITION_FN);
+ name = XPathNames::POSITION_FN;
break;
}
} //-- NodeSetFunctionCall
diff --git a/mozilla/extensions/transformiix/source/xpath/NumberExpr.cpp b/mozilla/extensions/transformiix/source/xpath/NumberExpr.cpp
index 8c36695df78..2254f9a3b3d 100644
--- a/mozilla/extensions/transformiix/source/xpath/NumberExpr.cpp
+++ b/mozilla/extensions/transformiix/source/xpath/NumberExpr.cpp
@@ -21,7 +21,7 @@
* Keith Visco, kvisco@ziplink.net
* -- original author.
*
- * $Id: NumberExpr.cpp,v 1.2 2001-01-22 09:36:18 kvisco%ziplink.net Exp $
+ * $Id: NumberExpr.cpp,v 1.3 2001-07-02 20:11:00 sicking%bigfoot.com Exp $
*/
#include "Expr.h"
@@ -30,17 +30,10 @@
//- NumberExpr -/
//--------------/
-NumberExpr::NumberExpr() {
- _value = 0.0;
-} //-- NumberExpr
-
NumberExpr::NumberExpr(double dbl) {
_value = dbl;
} //-- NumberExpr
-NumberExpr::~NumberExpr() {
-} //-- ~NumberExpr
-
/**
* Evaluates this Expr based on the given context node and processor state
* @param context the context node for evaluation of this Expr
diff --git a/mozilla/extensions/transformiix/source/xpath/NumberFunctionCall.cpp b/mozilla/extensions/transformiix/source/xpath/NumberFunctionCall.cpp
index 36c07a2e8f3..8af9dffa720 100644
--- a/mozilla/extensions/transformiix/source/xpath/NumberFunctionCall.cpp
+++ b/mozilla/extensions/transformiix/source/xpath/NumberFunctionCall.cpp
@@ -25,7 +25,7 @@
* Nisheeth Ranjan, nisheeth@netscape.com
* -- implemented rint function, which was not available on Windows.
*
- * $Id: NumberFunctionCall.cpp,v 1.13 2001-07-02 09:24:20 peterv%netscape.com Exp $
+ * $Id: NumberFunctionCall.cpp,v 1.14 2001-07-02 20:11:00 sicking%bigfoot.com Exp $
*/
/*
@@ -38,14 +38,6 @@
#include "XMLDOMUtils.h"
#include
-/**
- * Creates a default NumberFunctionCall. The number() function
- * is the default
-**/
-NumberFunctionCall::NumberFunctionCall() : FunctionCall(XPathNames::NUMBER_FN) {
- type = NUMBER;
-} //-- NumberFunctionCall
-
/**
* Creates a NumberFunctionCall of the given type
**/
@@ -53,20 +45,20 @@ NumberFunctionCall::NumberFunctionCall(short type) : FunctionCall() {
this->type = type;
switch ( type ) {
case ROUND :
- FunctionCall::setName(XPathNames::ROUND_FN);
+ name = XPathNames::ROUND_FN;
break;
case CEILING :
- FunctionCall::setName(XPathNames::CEILING_FN);
+ name = XPathNames::CEILING_FN;
break;
case FLOOR :
- FunctionCall::setName(XPathNames::FLOOR_FN);
+ name = XPathNames::FLOOR_FN;
break;
case SUM :
- FunctionCall::setName(XPathNames::SUM_FN);
+ name = XPathNames::SUM_FN;
break;
case NUMBER :
default :
- FunctionCall::setName(XPathNames::NUMBER_FN);
+ name = XPathNames::NUMBER_FN;
break;
}
} //-- NumberFunctionCall
diff --git a/mozilla/extensions/transformiix/source/xpath/NumberResult.cpp b/mozilla/extensions/transformiix/source/xpath/NumberResult.cpp
index 5f99b9e1e33..f3dad28830d 100644
--- a/mozilla/extensions/transformiix/source/xpath/NumberResult.cpp
+++ b/mozilla/extensions/transformiix/source/xpath/NumberResult.cpp
@@ -21,14 +21,14 @@
* Keith Visco, kvisco@ziplink.net
* -- original author.
*
- * $Id: NumberResult.cpp,v 1.6 2001-01-22 09:36:18 kvisco%ziplink.net Exp $
+ * $Id: NumberResult.cpp,v 1.7 2001-07-02 20:11:00 sicking%bigfoot.com Exp $
*/
/**
* NumberResult
* Represents the a number as the result of evaluating an Expr
* @author Keith Visco
- * @version $Revision: 1.6 $ $Date: 2001-01-22 09:36:18 $
+ * @version $Revision: 1.7 $ $Date: 2001-07-02 20:11:00 $
**/
#include "ExprResult.h"
@@ -40,10 +40,6 @@ NumberResult::NumberResult() {
value = 0.0;
} //-- NumberResult
-NumberResult::NumberResult(const NumberResult& nbrResult) {
- this->value = nbrResult.getValue();
-} //-- NumberResult
-
/**
* Creates a new NumberResult with the value of the given double parameter
* @param dbl the double to use for initialization of this NumberResult's value
@@ -52,21 +48,6 @@ NumberResult::NumberResult(double dbl) {
this->value = dbl;
} //-- NumberResult
-/**
- * Returns the value of this NumberResult
- * @return the value of this NumberResult
-**/
-double NumberResult::getValue() const {
- return this->value;
-} //-- getValue
-
-/**
- *
-**/
-MBool NumberResult::isNaN() const {
- return Double::isNaN(value);
-} //-- isNaN
-
/*
* Virtual Methods from ExprResult
*/
@@ -87,7 +68,7 @@ MBool NumberResult::booleanValue() {
// OG+
// As per the XPath spec, the boolean value of a number is true if and only if
// it is neither positive 0 nor negative 0 nor NaN
- return (MBool)(this->value != 0.0 && this->value != -0.0 && ! isNaN());
+ return (MBool)(value != 0.0 && !Double::isNaN(value));
// OG-
} //-- booleanValue
diff --git a/mozilla/extensions/transformiix/source/xpath/PathExpr.cpp b/mozilla/extensions/transformiix/source/xpath/PathExpr.cpp
index 914bcac27d6..6f50305bb5b 100644
--- a/mozilla/extensions/transformiix/source/xpath/PathExpr.cpp
+++ b/mozilla/extensions/transformiix/source/xpath/PathExpr.cpp
@@ -29,7 +29,7 @@
* - foo//bar would not match properly if there was more than
* one node in the NodeSet (nodes) on the final iteration
*
- * $Id: PathExpr.cpp,v 1.8 2001-07-02 09:24:32 peterv%netscape.com Exp $
+ * $Id: PathExpr.cpp,v 1.9 2001-07-02 20:11:01 sicking%bigfoot.com Exp $
*/
#include "Expr.h"
@@ -63,21 +63,6 @@ PathExpr::~PathExpr()
delete iter;
} //-- ~PathExpr
-/**
- * Adds the Expr to this PathExpr
- * @param expr the Expr to add to this PathExpr
- * @param index the index at which to add the given Expr
-**/
-void PathExpr::addExpr(int index, Expr* expr, short ancestryOp)
-{
- if (expr) {
- PathExprItem* pxi = new PathExprItem;
- pxi->expr = expr;
- pxi->ancestryOp = ancestryOp;
- expressions.insert(index, pxi);
- }
-} //-- addPattenExpr
-
/**
* Adds the Expr to this PathExpr
* @param expr the Expr to add to this PathExpr
diff --git a/mozilla/extensions/transformiix/source/xpath/PredicateList.cpp b/mozilla/extensions/transformiix/source/xpath/PredicateList.cpp
index ca7b98c77e2..3661eb5702a 100644
--- a/mozilla/extensions/transformiix/source/xpath/PredicateList.cpp
+++ b/mozilla/extensions/transformiix/source/xpath/PredicateList.cpp
@@ -21,7 +21,7 @@
* Keith Visco, kvisco@ziplink.net
* -- original author.
*
- * $Id: PredicateList.cpp,v 1.3 2001-06-20 06:00:33 margaret.chan%sun.com Exp $
+ * $Id: PredicateList.cpp,v 1.4 2001-07-02 20:11:01 sicking%bigfoot.com Exp $
*/
#include "Expr.h"
@@ -30,7 +30,7 @@
* Represents an ordered list of Predicates,
* for use with Step and Filter Expressions
* @author Keith Visco
- * @version $Revision: 1.3 $ $Date: 2001-06-20 06:00:33 $
+ * @version $Revision: 1.4 $ $Date: 2001-07-02 20:11:01 $
**/
//-- PredicateList Implementation --/
@@ -123,14 +123,6 @@ MBool PredicateList::isEmpty() {
return (MBool)(predicates.getLength() == 0);
} //-- isEmpty
-/**
- * Removes the given Expr from the list
- * @param expr the Expr to remove from the list
-**/
-Expr* PredicateList::remove(Expr* expr) {
- return (Expr*)predicates.remove(expr);
-} //-- remove
-
void PredicateList::toString(String& dest) {
ListIterator* iter = predicates.iterator();
diff --git a/mozilla/extensions/transformiix/source/xpath/RelationalExpr.cpp b/mozilla/extensions/transformiix/source/xpath/RelationalExpr.cpp
index b8959e9631f..4ae16e9c05d 100644
--- a/mozilla/extensions/transformiix/source/xpath/RelationalExpr.cpp
+++ b/mozilla/extensions/transformiix/source/xpath/RelationalExpr.cpp
@@ -21,7 +21,7 @@
* Keith Visco, kvisco@ziplink.net
* -- original author.
*
- * $Id: RelationalExpr.cpp,v 1.5 2001-04-03 12:36:03 peterv%netscape.com Exp $
+ * $Id: RelationalExpr.cpp,v 1.6 2001-07-02 20:11:02 sicking%bigfoot.com Exp $
*/
#include "Expr.h"
@@ -31,12 +31,6 @@
//- RelationalExpr -/
//------------------/
-RelationalExpr::RelationalExpr() {
- this->op = EQUAL;
- this->leftExpr = 0;
- this->rightExpr = 0;
-} //-- RelationalExpr
-
RelationalExpr::RelationalExpr(Expr* leftExpr, Expr* rightExpr, short op) {
this->op = op;
this->leftExpr = leftExpr;
diff --git a/mozilla/extensions/transformiix/source/xpath/RootExpr.cpp b/mozilla/extensions/transformiix/source/xpath/RootExpr.cpp
index c3b214e1c99..a8bc0773256 100644
--- a/mozilla/extensions/transformiix/source/xpath/RootExpr.cpp
+++ b/mozilla/extensions/transformiix/source/xpath/RootExpr.cpp
@@ -21,15 +21,11 @@
* Keith Visco, kvisco@ziplink.net
* -- original author.
*
- * $Id: RootExpr.cpp,v 1.1 2000-04-06 07:45:39 kvisco%ziplink.net Exp $
+ * $Id: RootExpr.cpp,v 1.2 2001-07-02 20:11:03 sicking%bigfoot.com Exp $
*/
#include "Expr.h"
-MBool RootExpr::isAbsolute() {
- return MB_TRUE;
-} //-- isAbsolute
-
/**
* Evaluates this Expr based on the given context node and processor state
* @param context the context node for evaluation of this Expr
diff --git a/mozilla/extensions/transformiix/source/xpath/StringExpr.cpp b/mozilla/extensions/transformiix/source/xpath/StringExpr.cpp
index d9c4ccafa76..3a321debcad 100644
--- a/mozilla/extensions/transformiix/source/xpath/StringExpr.cpp
+++ b/mozilla/extensions/transformiix/source/xpath/StringExpr.cpp
@@ -21,7 +21,7 @@
* Keith Visco, kvisco@ziplink.net
* -- original author.
*
- * $Id: StringExpr.cpp,v 1.3 2001-06-30 13:54:34 sicking%bigfoot.com Exp $
+ * $Id: StringExpr.cpp,v 1.4 2001-07-02 20:11:04 sicking%bigfoot.com Exp $
*/
#include "Expr.h"
@@ -29,34 +29,17 @@
/**
* StringExpr
* @author Keith Visco
- * @version $Revision: 1.3 $ $Date: 2001-06-30 13:54:34 $
+ * @version $Revision: 1.4 $ $Date: 2001-07-02 20:11:04 $
**/
/**
* Creates a new StringExpr
**/
-StringExpr::StringExpr() {};
-
-StringExpr::StringExpr(String& value) {
- //-- copy value
- this->value = value;
-} //-- StringExpr
-
StringExpr::StringExpr(const String& value) {
//-- copy value
this->value.append(value);
} //-- StringExpr
-StringExpr::StringExpr(const char* value) {
- //-- copy value
- this->value.append(value);
-} //-- StringExpr
-
-/**
- * Default Destructor
-**/
-StringExpr::~StringExpr() {};
-
/**
* Evaluates this Expr based on the given context node and processor state
* @param context the context node for evaluation of this Expr
diff --git a/mozilla/extensions/transformiix/source/xpath/StringFunctionCall.cpp b/mozilla/extensions/transformiix/source/xpath/StringFunctionCall.cpp
index 99f92cb22bf..3c889a60b5b 100644
--- a/mozilla/extensions/transformiix/source/xpath/StringFunctionCall.cpp
+++ b/mozilla/extensions/transformiix/source/xpath/StringFunctionCall.cpp
@@ -21,14 +21,14 @@
* Keith Visco, kvisco@ziplink.net
* -- original author.
*
- * $Id: StringFunctionCall.cpp,v 1.11 2001-07-02 09:24:39 peterv%netscape.com Exp $
+ * $Id: StringFunctionCall.cpp,v 1.12 2001-07-02 20:11:05 sicking%bigfoot.com Exp $
*/
/**
* StringFunctionCall
* A representation of the XPath String funtions
* @author Keith Visco
- * @version $Revision: 1.11 $ $Date: 2001-07-02 09:24:39 $
+ * @version $Revision: 1.12 $ $Date: 2001-07-02 20:11:05 $
**/
#include "FunctionLib.h"
@@ -36,14 +36,6 @@
#include "XMLDOMUtils.h"
#include
-/**
- * Creates a default StringFunctionCall. The string() function
- * is the default
-**/
-StringFunctionCall::StringFunctionCall() : FunctionCall(XPathNames::STRING_FN) {
- type = STRING;
-} //-- StringFunctionCall
-
/**
* Creates a StringFunctionCall of the given type
**/
@@ -51,31 +43,31 @@ StringFunctionCall::StringFunctionCall(short type) : FunctionCall() {
this->type = type;
switch ( type ) {
case CONCAT:
- FunctionCall::setName(XPathNames::CONCAT_FN);
+ name = XPathNames::CONCAT_FN;
break;
case CONTAINS:
- FunctionCall::setName(XPathNames::CONTAINS_FN);
+ name = XPathNames::CONTAINS_FN;
break;
case STARTS_WITH:
- FunctionCall::setName(XPathNames::STARTS_WITH_FN);
+ name = XPathNames::STARTS_WITH_FN;
break;
case STRING_LENGTH:
- FunctionCall::setName(XPathNames::STRING_LENGTH_FN);
+ name = XPathNames::STRING_LENGTH_FN;
break;
case SUBSTRING:
- FunctionCall::setName(XPathNames::SUBSTRING_FN);
+ name = XPathNames::SUBSTRING_FN;
break;
case SUBSTRING_AFTER:
- FunctionCall::setName(XPathNames::SUBSTRING_AFTER_FN);
+ name = XPathNames::SUBSTRING_AFTER_FN;
break;
case SUBSTRING_BEFORE:
- FunctionCall::setName(XPathNames::SUBSTRING_BEFORE_FN);
+ name = XPathNames::SUBSTRING_BEFORE_FN;
break;
case TRANSLATE:
- FunctionCall::setName(XPathNames::TRANSLATE_FN);
+ name = XPathNames::TRANSLATE_FN;
break;
default:
- FunctionCall::setName(XPathNames::STRING_FN);
+ name = XPathNames::STRING_FN;
break;
}
} //-- StringFunctionCall
diff --git a/mozilla/extensions/transformiix/source/xpath/StringResult.cpp b/mozilla/extensions/transformiix/source/xpath/StringResult.cpp
index 6ccf62e4eed..299d6a5357d 100644
--- a/mozilla/extensions/transformiix/source/xpath/StringResult.cpp
+++ b/mozilla/extensions/transformiix/source/xpath/StringResult.cpp
@@ -21,33 +21,23 @@
* Keith Visco, kvisco@ziplink.net
* -- original author.
*
- * $Id: StringResult.cpp,v 1.7 2001-05-12 09:54:16 nisheeth%netscape.com Exp $
+ * $Id: StringResult.cpp,v 1.8 2001-07-02 20:11:05 sicking%bigfoot.com Exp $
*/
/**
* StringResult
* Represents a String as a Result of evaluating an Expr
* @author Keith Visco
- * @version $Revision: 1.7 $ $Date: 2001-05-12 09:54:16 $
+ * @version $Revision: 1.8 $ $Date: 2001-07-02 20:11:05 $
**/
#include "ExprResult.h"
-
/**
* Default Constructor
**/
StringResult::StringResult() {
} //-- StringResult
-/**
- * Creates a new StringResult with the value of the given String parameter
- * @param str the String to use for initialization of this StringResult's value
-**/
-StringResult::StringResult(String& str) {
- //-- copy str
- this->value = str;
-} //-- StringResult
-
/**
* Creates a new StringResult with the value of the given String parameter
* @param str the String to use for initialization of this StringResult's value
@@ -66,13 +56,6 @@ StringResult::StringResult(const char* str) {
this->value = str;
} //-- StringResult
-/**
- * Returns the value of this StringResult
-**/
-String& StringResult::getValue() {
- return this->value;
-} //-- getValue
-
/*
* Virtual Methods from ExprResult
*/
diff --git a/mozilla/extensions/transformiix/source/xpath/TextExpr.cpp b/mozilla/extensions/transformiix/source/xpath/TextExpr.cpp
index 3bb67bc2e9c..66a843777fe 100644
--- a/mozilla/extensions/transformiix/source/xpath/TextExpr.cpp
+++ b/mozilla/extensions/transformiix/source/xpath/TextExpr.cpp
@@ -21,7 +21,7 @@
* Keith Visco, kvisco@ziplink.net
* -- original author.
*
- * $Id: TextExpr.cpp,v 1.4 2001-05-14 14:22:47 axel%pike.org Exp $
+ * $Id: TextExpr.cpp,v 1.5 2001-07-02 20:11:05 sicking%bigfoot.com Exp $
*/
#include "Expr.h"
@@ -59,14 +59,6 @@ double TextExpr::getDefaultPriority(Node* node, Node* context, ContextState* cs)
return -0.5;
} //-- getDefaultPriority
-/**
- * Returns the type of this NodeExpr
- * @return the type of this NodeExpr
-**/
-short TextExpr::getType() {
- return NodeExpr::TEXT_EXPR;
-} //-- getType
-
/**
* Determines whether this NodeExpr matches the given node within
* the given context
diff --git a/mozilla/extensions/transformiix/source/xpath/UnaryExpr.cpp b/mozilla/extensions/transformiix/source/xpath/UnaryExpr.cpp
index 356d583a2e1..cea1f9ab06a 100644
--- a/mozilla/extensions/transformiix/source/xpath/UnaryExpr.cpp
+++ b/mozilla/extensions/transformiix/source/xpath/UnaryExpr.cpp
@@ -20,11 +20,6 @@
#include "Expr.h"
-UnaryExpr::UnaryExpr()
-{
- expr = 0;
-}
-
UnaryExpr::UnaryExpr(Expr* expr)
{
this->expr = expr;
@@ -35,12 +30,6 @@ UnaryExpr::~UnaryExpr()
delete expr;
}
-void UnaryExpr::setExpr(Expr* expr)
-{
- delete this->expr;
- this->expr = expr;
-}
-
/*
* Evaluates this Expr based on the given context node and processor state
* @param context the context node for evaluation of this Expr
diff --git a/mozilla/extensions/transformiix/source/xpath/UnionExpr.cpp b/mozilla/extensions/transformiix/source/xpath/UnionExpr.cpp
index 68c5cff3dfb..460520b522b 100644
--- a/mozilla/extensions/transformiix/source/xpath/UnionExpr.cpp
+++ b/mozilla/extensions/transformiix/source/xpath/UnionExpr.cpp
@@ -21,7 +21,7 @@
* Keith Visco, kvisco@ziplink.net
* -- original author.
*
- * $Id: UnionExpr.cpp,v 1.2 2001-06-30 13:54:35 sicking%bigfoot.com Exp $
+ * $Id: UnionExpr.cpp,v 1.3 2001-07-02 20:11:05 sicking%bigfoot.com Exp $
*/
#include "Expr.h"
@@ -59,15 +59,6 @@ void UnionExpr::addExpr(Expr* expr) {
expressions.add(expr);
} //-- addExpr
-/**
- * Adds the Expr to this UnionExpr
- * @param expr the Expr to add to this UnionExpr
-**/
-void UnionExpr::addExpr(int index, Expr* expr) {
- if (expr)
- expressions.insert(index, expr);
-} //-- addExpr
-
//------------------------------------/
//- Virtual methods from Expr -/
//------------------------------------/
diff --git a/mozilla/extensions/transformiix/source/xpath/VariableRefExpr.cpp b/mozilla/extensions/transformiix/source/xpath/VariableRefExpr.cpp
index 297989ac235..44706487388 100644
--- a/mozilla/extensions/transformiix/source/xpath/VariableRefExpr.cpp
+++ b/mozilla/extensions/transformiix/source/xpath/VariableRefExpr.cpp
@@ -21,7 +21,7 @@
* Keith Visco, kvisco@ziplink.net
* -- original author.
*
- * $Id: VariableRefExpr.cpp,v 1.1 2000-04-06 07:45:55 kvisco%ziplink.net Exp $
+ * $Id: VariableRefExpr.cpp,v 1.2 2001-07-02 20:11:05 sicking%bigfoot.com Exp $
*/
#include "Expr.h"
@@ -30,12 +30,6 @@
//- VariableRefExpr -/
//-------------------/
-/**
- * Default constructor
-**/
-VariableRefExpr::VariableRefExpr() {
-} //-- VariableRefExpr
-
/**
* Creates a VariableRefExpr with the given variable name
**/
@@ -43,19 +37,6 @@ VariableRefExpr::VariableRefExpr(const String& name) {
this->name = name;
} //-- VariableRefExpr
-/**
- * Creates a VariableRefExpr with the given variable name
-**/
-VariableRefExpr::VariableRefExpr(String& name) {
- this->name = name;
-} //-- VariableRefExpr
-
-/**
- * Default destructor
-**/
-VariableRefExpr::~VariableRefExpr() {
-} //-- ~VariableRefExpr
-
/**
* Evaluates this Expr based on the given context node and processor state
* @param context the context node for evaluation of this Expr
@@ -92,8 +73,9 @@ ExprResult* VariableRefExpr::evaluate(Node* context, ContextState* cs) {
break;
//-- StringResult
default:
- StringResult* strResult = new StringResult();
- exprResult->stringValue(strResult->getValue());
+ String tmp;
+ exprResult->stringValue(tmp);
+ StringResult* strResult = new StringResult(tmp);
copyOfResult = strResult;
break;
}