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/07/21 21:40:15 UTC
cvs commit: xml-xalan/c/src/XSLT Arg.cpp Arg.hpp ContextMarker.cpp ContextMarker.hpp
dbertoni 00/07/21 12:40:15
Modified: c/src/XSLT Arg.cpp Arg.hpp ContextMarker.cpp
ContextMarker.hpp
Log:
Cleaned things up a bit.
Revision Changes Path
1.5 +3 -57 xml-xalan/c/src/XSLT/Arg.cpp
Index: Arg.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/Arg.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Arg.cpp 2000/04/11 15:09:20 1.4
+++ Arg.cpp 2000/07/21 19:40:14 1.5
@@ -67,30 +67,11 @@
Arg::Arg(
- const QName& name,
- const XalanDOMString& expr,
- bool isParamVar) :
- StackEntry(eArgument),
- m_qname(name),
- m_argType(eExpression),
- m_isParamVar(isParamVar),
- m_val(0),
- m_expression(expr)
-{
-}
-
-
-
-Arg::Arg(
const QName& name,
- XObject* val,
- bool isParamVar) :
+ XObject* val) :
StackEntry(eArgument),
m_qname(name),
- m_argType(eXObject),
- m_isParamVar(isParamVar),
- m_val(val),
- m_expression()
+ m_val(val)
{
}
@@ -99,10 +80,7 @@
Arg::Arg(const Arg& theSource) :
StackEntry(theSource),
m_qname(theSource.m_qname),
- m_argType(theSource.m_argType),
- m_isParamVar(theSource.m_isParamVar),
- m_val(theSource.m_val),
- m_expression(theSource.m_expression)
+ m_val(theSource.m_val)
{
}
@@ -110,36 +88,4 @@
Arg::~Arg()
{
-}
-
-
-
-bool
-Arg::equals(const StackEntry& theRHS) const
-{
- bool theResult = false;
-
- if(theRHS.getType() == eArgument)
- {
- const Arg& theArgRHS = static_cast<const Arg&>(theRHS);
-
- if (getArgType() == theArgRHS.getArgType() &&
- m_qname.equals(theArgRHS.m_qname) == true)
- {
- theResult = true;
- }
- }
-
- return theResult;
-}
-
-
-#if defined(XALAN_NO_COVARIANT_RETURN_TYPE)
-StackEntry*
-#else
-Arg*
-#endif
-Arg::clone() const
-{
- return new Arg(*this);
}
1.6 +5 -97 xml-xalan/c/src/XSLT/Arg.hpp
Index: Arg.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/Arg.hpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- Arg.hpp 2000/04/11 15:09:20 1.5
+++ Arg.hpp 2000/07/21 19:40:14 1.6
@@ -95,43 +95,19 @@
Arg(const Arg& theSource);
/**
- * Construct an argument object from an expression
- *
- * @param name name of argument
- * @param expr expression argument represents
- * @param isParamVar true if expression is a parameter variable
- */
- Arg(
- const QName& name,
- const XalanDOMString& expr,
- bool isParamVar);
-
- /**
* Construct an argument object from an XObject
*
* @param name name of argument
* @param val XObject argument represents
- * @param isParamVar true if expression is a parameter variable
*/
Arg(
const QName& name,
- XObject* val,
- bool isParamVar);
+ XObject* val);
virtual
~Arg();
/**
- * Override equals and agree that we're equal if the passed object is a
- * string and it matches the name of the arg.
- *
- * @param theRHS object to compare to
- * @return true if names match
- */
- virtual bool
- equals(const StackEntry& theRHS) const;
-
- /**
* Retrieve object name
*
* @return qualified name of object
@@ -143,89 +119,21 @@
}
/**
- * Retrieve object name
- *
- * @return qualified name of object
- */
- bool
- getIsParamVar() const
- {
- return m_isParamVar;
- }
-
- /**
- * Retrieve object type
- *
- * @return type of object, one of eXObject, eResultTreeFrag, eExpression
- */
- eArgumentType
- getArgType() const
- {
- return m_argType;
- }
-
- /**
* Retrieve object's XObject pointer
*
* @return pointer to XObject
*/
XObject*
- getXObjectPtr() const
+ getXObject() const
{
return m_val;
}
- /**
- * Set object's XObject pointer
- *
- * @param pxobj pointer to XObject
- */
- void
- setXObjectPtr(XObject* pxobj)
- {
- m_val = pxobj;
- }
-
- /**
- * Retrieve object's expression
- *
- * @return string representation of expression
- */
- const XalanDOMString&
- getExpression() const
- {
- return m_expression;
- };
-
- /**
- * Set object's expression
- *
- * @param pexpr string representation of expression
- */
- void
- setExpression(const XalanDOMString& pexpr)
- {
- m_expression = pexpr;
- };
-
- /**
- * Clone the instance.
- */
-#if defined(XALAN_NO_COVARIANT_RETURN_TYPE)
- virtual StackEntry*
-#else
- virtual Arg*
-#endif
- clone() const;
-
-
private:
+
+ QName m_qname;
- QName m_qname;
- eArgumentType m_argType;
- bool m_isParamVar;
- XObject* m_val;
- XalanDOMString m_expression;
+ XObject* m_val;
};
1.4 +3 -23 xml-xalan/c/src/XSLT/ContextMarker.cpp
Index: ContextMarker.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/ContextMarker.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ContextMarker.cpp 2000/04/11 15:09:21 1.3
+++ ContextMarker.cpp 2000/07/21 19:40:14 1.4
@@ -62,19 +62,15 @@
-ContextMarker::ContextMarker(
- const XalanNode* caller,
- const XalanNode* sourceNode) :
- ContextState(caller,
- sourceNode,
- eContextMarker)
+ContextMarker::ContextMarker() :
+ StackEntry(eContextMarker)
{
}
ContextMarker::ContextMarker(const ContextMarker& theSource) :
- ContextState(theSource)
+ StackEntry(theSource)
{
}
@@ -83,19 +79,3 @@
ContextMarker::~ContextMarker()
{
}
-
-
-
-#if defined(XALAN_NO_COVARIANT_RETURN_TYPE)
-StackEntry*
-#else
-ContextMarker*
-#endif
-ContextMarker::clone() const
-{
- return new ContextMarker(*this);
-}
-
-/*
- * $ Log: $
- */
1.5 +4 -15 xml-xalan/c/src/XSLT/ContextMarker.hpp
Index: ContextMarker.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/ContextMarker.hpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- ContextMarker.hpp 2000/04/11 15:09:22 1.4
+++ ContextMarker.hpp 2000/07/21 19:40:14 1.5
@@ -78,32 +78,21 @@
* calls above this marker at the top of the stack can
* be reached with getVariable(String name).
*/
-class ContextMarker : public ContextState
+class ContextMarker : public StackEntry
{
public:
/**
- * Construct a context marker from a source node and caller node
- *
- * @param caller caller node
- * @param sourceNode source node
+ * Construct a context marker.
*/
- ContextMarker(
- const XalanNode* caller,
- const XalanNode* sourceNode);
+ explicit
+ ContextMarker();
ContextMarker(const ContextMarker& theSource);
virtual
~ContextMarker();
-
-#if defined(XALAN_NO_COVARIANT_RETURN_TYPE)
- virtual StackEntry*
-#else
- virtual ContextMarker*
-#endif
- clone() const;
};