mirror of
https://github.com/jezhiggins/arabica
synced 2025-01-17 18:12:04 +01:00
s/XPathExpression/XPathExpression_impl/
This commit is contained in:
parent
fac7cf88de
commit
a7d050841d
13 changed files with 167 additions and 167 deletions
|
@ -12,11 +12,11 @@ namespace impl
|
|||
|
||||
template<class string_type, class string_adaptor>
|
||||
class PlusOperator : private BinaryExpression<string_type, string_adaptor>,
|
||||
public XPathExpression<string_type, string_adaptor>
|
||||
public XPathExpression_impl<string_type, string_adaptor>
|
||||
{
|
||||
typedef BinaryExpression<string_type, string_adaptor> baseT;
|
||||
public:
|
||||
PlusOperator(XPathExpression<string_type, string_adaptor>* lhs, XPathExpression<string_type, string_adaptor>* rhs) :
|
||||
PlusOperator(XPathExpression_impl<string_type, string_adaptor>* lhs, XPathExpression_impl<string_type, string_adaptor>* rhs) :
|
||||
BinaryExpression<string_type, string_adaptor>(lhs, rhs) { }
|
||||
|
||||
virtual XPathValue<string_type, string_adaptor> evaluate(const DOM::Node<string_type, string_adaptor>& context,
|
||||
|
@ -28,11 +28,11 @@ public:
|
|||
|
||||
template<class string_type, class string_adaptor>
|
||||
class MinusOperator : private BinaryExpression<string_type, string_adaptor>,
|
||||
public XPathExpression<string_type, string_adaptor>
|
||||
public XPathExpression_impl<string_type, string_adaptor>
|
||||
{
|
||||
typedef BinaryExpression<string_type, string_adaptor> baseT;
|
||||
public:
|
||||
MinusOperator(XPathExpression<string_type, string_adaptor>* lhs, XPathExpression<string_type, string_adaptor>* rhs) :
|
||||
MinusOperator(XPathExpression_impl<string_type, string_adaptor>* lhs, XPathExpression_impl<string_type, string_adaptor>* rhs) :
|
||||
BinaryExpression<string_type, string_adaptor>(lhs, rhs) { }
|
||||
|
||||
virtual XPathValue<string_type, string_adaptor> evaluate(const DOM::Node<string_type, string_adaptor>& context,
|
||||
|
@ -44,11 +44,11 @@ public:
|
|||
|
||||
template<class string_type, class string_adaptor>
|
||||
class MultiplyOperator : private BinaryExpression<string_type, string_adaptor>,
|
||||
public XPathExpression<string_type, string_adaptor>
|
||||
public XPathExpression_impl<string_type, string_adaptor>
|
||||
{
|
||||
typedef BinaryExpression<string_type, string_adaptor> baseT;
|
||||
public:
|
||||
MultiplyOperator(XPathExpression<string_type, string_adaptor>* lhs, XPathExpression<string_type, string_adaptor>* rhs) :
|
||||
MultiplyOperator(XPathExpression_impl<string_type, string_adaptor>* lhs, XPathExpression_impl<string_type, string_adaptor>* rhs) :
|
||||
BinaryExpression<string_type, string_adaptor>(lhs, rhs) { }
|
||||
|
||||
virtual XPathValue<string_type, string_adaptor> evaluate(const DOM::Node<string_type, string_adaptor>& context,
|
||||
|
@ -60,11 +60,11 @@ public:
|
|||
|
||||
template<class string_type, class string_adaptor>
|
||||
class DivideOperator : private BinaryExpression<string_type, string_adaptor>,
|
||||
public XPathExpression<string_type, string_adaptor>
|
||||
public XPathExpression_impl<string_type, string_adaptor>
|
||||
{
|
||||
typedef BinaryExpression<string_type, string_adaptor> baseT;
|
||||
public:
|
||||
DivideOperator(XPathExpression<string_type, string_adaptor>* lhs, XPathExpression<string_type, string_adaptor>* rhs) :
|
||||
DivideOperator(XPathExpression_impl<string_type, string_adaptor>* lhs, XPathExpression_impl<string_type, string_adaptor>* rhs) :
|
||||
BinaryExpression<string_type, string_adaptor>(lhs, rhs) { }
|
||||
|
||||
virtual XPathValue<string_type, string_adaptor> evaluate(const DOM::Node<string_type, string_adaptor>& context,
|
||||
|
@ -76,11 +76,11 @@ public:
|
|||
|
||||
template<class string_type, class string_adaptor>
|
||||
class ModOperator : private BinaryExpression<string_type, string_adaptor>,
|
||||
public XPathExpression<string_type, string_adaptor>
|
||||
public XPathExpression_impl<string_type, string_adaptor>
|
||||
{
|
||||
typedef BinaryExpression<string_type, string_adaptor> baseT;
|
||||
public:
|
||||
ModOperator(XPathExpression<string_type, string_adaptor>* lhs, XPathExpression<string_type, string_adaptor>* rhs) :
|
||||
ModOperator(XPathExpression_impl<string_type, string_adaptor>* lhs, XPathExpression_impl<string_type, string_adaptor>* rhs) :
|
||||
BinaryExpression<string_type, string_adaptor>(lhs, rhs) { }
|
||||
|
||||
virtual XPathValue<string_type, string_adaptor> evaluate(const DOM::Node<string_type, string_adaptor>& context,
|
||||
|
@ -97,11 +97,11 @@ public:
|
|||
|
||||
template<class string_type, class string_adaptor>
|
||||
class UnaryNegative : private UnaryExpression<string_type, string_adaptor>,
|
||||
public XPathExpression<string_type, string_adaptor>
|
||||
public XPathExpression_impl<string_type, string_adaptor>
|
||||
{
|
||||
typedef UnaryExpression<string_type, string_adaptor> baseT;
|
||||
public:
|
||||
UnaryNegative(XPathExpression<string_type, string_adaptor>* expr) :
|
||||
UnaryNegative(XPathExpression_impl<string_type, string_adaptor>* expr) :
|
||||
UnaryExpression<string_type, string_adaptor>(expr) { }
|
||||
|
||||
virtual XPathValue<string_type, string_adaptor> evaluate(const DOM::Node<string_type, string_adaptor>& context,
|
||||
|
|
|
@ -12,13 +12,13 @@ namespace XPath
|
|||
{
|
||||
|
||||
template<class string_type, class string_adaptor>
|
||||
class XPathExpression
|
||||
class XPathExpression_impl
|
||||
{
|
||||
protected:
|
||||
XPathExpression() { }
|
||||
XPathExpression_impl() { }
|
||||
|
||||
public:
|
||||
virtual ~XPathExpression() { }
|
||||
virtual ~XPathExpression_impl() { }
|
||||
|
||||
XPathValue<string_type, string_adaptor> evaluate(const DOM::Node<string_type, string_adaptor>& context) const
|
||||
{
|
||||
|
@ -45,17 +45,17 @@ public:
|
|||
|
||||
|
||||
private:
|
||||
XPathExpression(const XPathExpression&);
|
||||
bool operator==(const XPathExpression&);
|
||||
XPathExpression& operator=(const XPathExpression&);
|
||||
}; // class XPathExpression
|
||||
XPathExpression_impl(const XPathExpression_impl&);
|
||||
bool operator==(const XPathExpression_impl&);
|
||||
XPathExpression_impl& operator=(const XPathExpression_impl&);
|
||||
}; // class XPathExpression_impl
|
||||
|
||||
template<class string_type, class string_adaptor = Arabica::default_string_adaptor<string_type> >
|
||||
class XPathExpressionPtr
|
||||
{
|
||||
public:
|
||||
XPathExpressionPtr() : ptr_() { }
|
||||
explicit XPathExpressionPtr(XPathExpression<string_type, string_adaptor>* xp) : ptr_(xp) { }
|
||||
explicit XPathExpressionPtr(XPathExpression_impl<string_type, string_adaptor>* xp) : ptr_(xp) { }
|
||||
XPathExpressionPtr(const XPathExpressionPtr& rhs) : ptr_(rhs.ptr_) { }
|
||||
XPathExpressionPtr& operator=(const XPathExpressionPtr& rhs)
|
||||
{
|
||||
|
@ -63,13 +63,13 @@ public:
|
|||
return *this;
|
||||
} // operator=
|
||||
|
||||
const XPathExpression<string_type, string_adaptor>* get() const { return ptr_.get(); }
|
||||
const XPathExpression<string_type, string_adaptor>* operator->() const { return ptr_.get(); }
|
||||
const XPathExpression_impl<string_type, string_adaptor>* get() const { return ptr_.get(); }
|
||||
const XPathExpression_impl<string_type, string_adaptor>* operator->() const { return ptr_.get(); }
|
||||
|
||||
operator bool() const { return ptr_.get(); }
|
||||
|
||||
private:
|
||||
typedef boost::shared_ptr<const XPathExpression<string_type, string_adaptor> > ExpressionPtr;
|
||||
typedef boost::shared_ptr<const XPathExpression_impl<string_type, string_adaptor> > ExpressionPtr;
|
||||
ExpressionPtr ptr_;
|
||||
}; // class XPathExpressionPtr
|
||||
|
||||
|
@ -79,7 +79,7 @@ template<class string_type, class string_adaptor>
|
|||
class UnaryExpression
|
||||
{
|
||||
public:
|
||||
UnaryExpression(XPathExpression<string_type, string_adaptor>* expr) :
|
||||
UnaryExpression(XPathExpression_impl<string_type, string_adaptor>* expr) :
|
||||
expr_(expr) { }
|
||||
|
||||
protected:
|
||||
|
@ -88,18 +88,18 @@ protected:
|
|||
delete expr_;
|
||||
} // ~UnaryExpression
|
||||
|
||||
XPathExpression<string_type, string_adaptor>* expr() const { return expr_; }
|
||||
XPathExpression_impl<string_type, string_adaptor>* expr() const { return expr_; }
|
||||
|
||||
private:
|
||||
XPathExpression<string_type, string_adaptor>* expr_;
|
||||
XPathExpression_impl<string_type, string_adaptor>* expr_;
|
||||
}; // class UnaryExpression
|
||||
|
||||
template<class string_type, class string_adaptor>
|
||||
class BinaryExpression
|
||||
{
|
||||
public:
|
||||
BinaryExpression(XPathExpression<string_type, string_adaptor>* lhs,
|
||||
XPathExpression<string_type, string_adaptor>* rhs) :
|
||||
BinaryExpression(XPathExpression_impl<string_type, string_adaptor>* lhs,
|
||||
XPathExpression_impl<string_type, string_adaptor>* rhs) :
|
||||
lhs_(lhs),
|
||||
rhs_(rhs)
|
||||
{
|
||||
|
@ -112,12 +112,12 @@ protected:
|
|||
delete rhs_;
|
||||
} // ~BinaryExpression
|
||||
|
||||
XPathExpression<string_type, string_adaptor>* lhs() const { return lhs_; }
|
||||
XPathExpression<string_type, string_adaptor>* rhs() const { return rhs_; }
|
||||
XPathExpression_impl<string_type, string_adaptor>* lhs() const { return lhs_; }
|
||||
XPathExpression_impl<string_type, string_adaptor>* rhs() const { return rhs_; }
|
||||
|
||||
private:
|
||||
XPathExpression<string_type, string_adaptor>* lhs_;
|
||||
XPathExpression<string_type, string_adaptor>* rhs_;
|
||||
XPathExpression_impl<string_type, string_adaptor>* lhs_;
|
||||
XPathExpression_impl<string_type, string_adaptor>* rhs_;
|
||||
}; // class BinaryExpression
|
||||
|
||||
} // namespace impl
|
||||
|
|
|
@ -16,7 +16,7 @@ template<class function_type, class string_type, class string_adaptor>
|
|||
XPathFunction<string_type, string_adaptor>* CreateFn(const std::vector<XPathExpressionPtr<string_type, string_adaptor> >& argExprs) { return new function_type(argExprs); }
|
||||
|
||||
template<class string_type, class string_adaptor>
|
||||
class FunctionHolder : public XPathExpression<string_type, string_adaptor>
|
||||
class FunctionHolder : public XPathExpression_impl<string_type, string_adaptor>
|
||||
{
|
||||
public:
|
||||
FunctionHolder(XPathFunction<string_type, string_adaptor>* func) :
|
||||
|
|
|
@ -12,12 +12,12 @@ namespace impl
|
|||
|
||||
template<class string_type, class string_adaptor>
|
||||
class OrOperator : private BinaryExpression<string_type, string_adaptor>,
|
||||
public XPathExpression<string_type, string_adaptor>
|
||||
public XPathExpression_impl<string_type, string_adaptor>
|
||||
{
|
||||
typedef BinaryExpression<string_type, string_adaptor> baseT;
|
||||
public:
|
||||
OrOperator(XPathExpression<string_type, string_adaptor>* lhs,
|
||||
XPathExpression<string_type, string_adaptor>* rhs) :
|
||||
OrOperator(XPathExpression_impl<string_type, string_adaptor>* lhs,
|
||||
XPathExpression_impl<string_type, string_adaptor>* rhs) :
|
||||
BinaryExpression<string_type, string_adaptor>(lhs, rhs) { }
|
||||
|
||||
virtual XPathValue<string_type, string_adaptor> evaluate(const DOM::Node<string_type, string_adaptor>& context,
|
||||
|
@ -36,12 +36,12 @@ public:
|
|||
|
||||
template<class string_type, class string_adaptor>
|
||||
class AndOperator : private BinaryExpression<string_type, string_adaptor>,
|
||||
public XPathExpression<string_type, string_adaptor>
|
||||
public XPathExpression_impl<string_type, string_adaptor>
|
||||
{
|
||||
typedef BinaryExpression<string_type, string_adaptor> baseT;
|
||||
public:
|
||||
AndOperator(XPathExpression<string_type, string_adaptor>* lhs,
|
||||
XPathExpression<string_type, string_adaptor>* rhs) :
|
||||
AndOperator(XPathExpression_impl<string_type, string_adaptor>* lhs,
|
||||
XPathExpression_impl<string_type, string_adaptor>* rhs) :
|
||||
BinaryExpression<string_type, string_adaptor>(lhs, rhs) { }
|
||||
|
||||
virtual XPathValue<string_type, string_adaptor> evaluate(const DOM::Node<string_type, string_adaptor>& context,
|
||||
|
|
|
@ -14,7 +14,7 @@ template<class string_type, class string_adaptor = Arabica::default_string_adapt
|
|||
class MatchExpr
|
||||
{
|
||||
public:
|
||||
MatchExpr(XPathExpression<string_type, string_adaptor>* match, double priority) :
|
||||
MatchExpr(XPathExpression_impl<string_type, string_adaptor>* match, double priority) :
|
||||
match_(match), priority_(priority) { }
|
||||
MatchExpr(const MatchExpr& rhs) :
|
||||
match_(rhs.match_), priority_(rhs.priority_) { }
|
||||
|
@ -39,15 +39,15 @@ namespace impl
|
|||
{
|
||||
|
||||
template<class string_type, class string_adaptor>
|
||||
class MatchExpressionWrapper : public XPathExpression<string_type, string_adaptor>
|
||||
class MatchExpressionWrapper : public XPathExpression_impl<string_type, string_adaptor>
|
||||
{
|
||||
public:
|
||||
MatchExpressionWrapper(XPathExpression<string_type, string_adaptor>* expr, double priority)
|
||||
MatchExpressionWrapper(XPathExpression_impl<string_type, string_adaptor>* expr, double priority)
|
||||
{
|
||||
add_match(expr, priority);
|
||||
} // MatchExpressionWrapper
|
||||
|
||||
MatchExpressionWrapper(XPathExpression<string_type, string_adaptor>* expr)
|
||||
MatchExpressionWrapper(XPathExpression_impl<string_type, string_adaptor>* expr)
|
||||
{
|
||||
add_matches(expr);
|
||||
} // MatchExpressionWrapper
|
||||
|
@ -63,12 +63,12 @@ public:
|
|||
return matches_;
|
||||
} // matches
|
||||
|
||||
void add_match(XPathExpression<string_type, string_adaptor>* match, double priority)
|
||||
void add_match(XPathExpression_impl<string_type, string_adaptor>* match, double priority)
|
||||
{
|
||||
matches_.push_back(MatchExpr<string_type, string_adaptor>(match, priority));
|
||||
} // add_match
|
||||
|
||||
void add_matches(XPathExpression<string_type, string_adaptor>* wrapper)
|
||||
void add_matches(XPathExpression_impl<string_type, string_adaptor>* wrapper)
|
||||
{
|
||||
const std::vector<MatchExpr<string_type, string_adaptor> >& more = static_cast<impl::MatchExpressionWrapper<string_type, string_adaptor>*>(wrapper)->matches();
|
||||
for(typename std::vector<MatchExpr<string_type, string_adaptor> >::const_iterator m = more.begin(), me = more.end(); m != me; ++m)
|
||||
|
|
|
@ -115,7 +115,7 @@ public:
|
|||
void resetFunctionResolver() { functionResolver_.set(FunctionResolverPtr<string_type, string_adaptor>(new NullFunctionResolver<string_type, string_adaptor>())); }
|
||||
|
||||
private:
|
||||
typedef XPathExpression<string_type, string_adaptor>* (*compileFn)(typename impl::types<string_adaptor>::node_iter_t const& i,
|
||||
typedef XPathExpression_impl<string_type, string_adaptor>* (*compileFn)(typename impl::types<string_adaptor>::node_iter_t const& i,
|
||||
typename impl::types<string_adaptor>::node_iter_t const& ie,
|
||||
impl::CompilationContext<string_type, string_adaptor>& context);
|
||||
typedef typename impl::types<string_adaptor>::tree_info_t(XPath::*parserFn)(const string_type& str) const;
|
||||
|
@ -182,28 +182,28 @@ private:
|
|||
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
public:
|
||||
static XPathExpression<string_type, string_adaptor>* compile_expression(typename impl::types<string_adaptor>::node_iter_t const& i,
|
||||
static XPathExpression_impl<string_type, string_adaptor>* compile_expression(typename impl::types<string_adaptor>::node_iter_t const& i,
|
||||
typename impl::types<string_adaptor>::node_iter_t const& ie,
|
||||
impl::CompilationContext<string_type, string_adaptor>& context)
|
||||
{
|
||||
return compile_with_factory(i, ie, context, XPath::expression_factory());
|
||||
} // compile_expression
|
||||
|
||||
static XPathExpression<string_type, string_adaptor>* compile_match(typename impl::types<string_adaptor>::node_iter_t const& i,
|
||||
static XPathExpression_impl<string_type, string_adaptor>* compile_match(typename impl::types<string_adaptor>::node_iter_t const& i,
|
||||
typename impl::types<string_adaptor>::node_iter_t const& ie,
|
||||
impl::CompilationContext<string_type, string_adaptor>& context)
|
||||
{
|
||||
return compile_with_factory(i, ie, context, XPath::match_factory());
|
||||
} // compile_match
|
||||
|
||||
static XPathExpression<string_type, string_adaptor>* compile_attribute_value(typename impl::types<string_adaptor>::node_iter_t const& i,
|
||||
static XPathExpression_impl<string_type, string_adaptor>* compile_attribute_value(typename impl::types<string_adaptor>::node_iter_t const& i,
|
||||
typename impl::types<string_adaptor>::node_iter_t const& ie,
|
||||
impl::CompilationContext<string_type, string_adaptor>& context)
|
||||
{
|
||||
return compile_with_factory(i, ie, context, XPath::attribute_value_factory());
|
||||
} // compile_attribute_value
|
||||
|
||||
static XPathExpression<string_type, string_adaptor>* compile_with_factory(typename impl::types<string_adaptor>::node_iter_t const& i,
|
||||
static XPathExpression_impl<string_type, string_adaptor>* compile_with_factory(typename impl::types<string_adaptor>::node_iter_t const& i,
|
||||
typename impl::types<string_adaptor>::node_iter_t const& ie,
|
||||
impl::CompilationContext<string_type, string_adaptor>& context,
|
||||
const std::map<int, compileFn>& factory)
|
||||
|
@ -227,35 +227,35 @@ public:
|
|||
} // compile_with_factory
|
||||
|
||||
private:
|
||||
static XPathExpression<string_type, string_adaptor>* createAbsoluteLocationPath(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context);
|
||||
static XPathExpression<string_type, string_adaptor>* createRelativeLocationPath(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context);
|
||||
static XPathExpression<string_type, string_adaptor>* createFilteredPath(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context);
|
||||
static XPathExpression<string_type, string_adaptor>* createSingleStepRelativeLocationPath(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context);
|
||||
static XPathExpression<string_type, string_adaptor>* createExpression(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context);
|
||||
static XPathExpression<string_type, string_adaptor>* createFunction(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context);
|
||||
static XPathExpression<string_type, string_adaptor>* createBinaryExpression(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context);
|
||||
static XPathExpression<string_type, string_adaptor>* createLiteral(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context);
|
||||
static XPathExpression<string_type, string_adaptor>* createNumber(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context);
|
||||
static XPathExpression<string_type, string_adaptor>* createVariable(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context);
|
||||
static XPathExpression<string_type, string_adaptor>* createSingleStepAbsoluteLocationPath(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context);
|
||||
static XPathExpression<string_type, string_adaptor>* createUnaryExpression(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context);
|
||||
static XPathExpression<string_type, string_adaptor>* createUnaryNegativeExpr(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context);
|
||||
static XPathExpression_impl<string_type, string_adaptor>* createAbsoluteLocationPath(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context);
|
||||
static XPathExpression_impl<string_type, string_adaptor>* createRelativeLocationPath(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context);
|
||||
static XPathExpression_impl<string_type, string_adaptor>* createFilteredPath(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context);
|
||||
static XPathExpression_impl<string_type, string_adaptor>* createSingleStepRelativeLocationPath(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context);
|
||||
static XPathExpression_impl<string_type, string_adaptor>* createExpression(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context);
|
||||
static XPathExpression_impl<string_type, string_adaptor>* createFunction(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context);
|
||||
static XPathExpression_impl<string_type, string_adaptor>* createBinaryExpression(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context);
|
||||
static XPathExpression_impl<string_type, string_adaptor>* createLiteral(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context);
|
||||
static XPathExpression_impl<string_type, string_adaptor>* createNumber(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context);
|
||||
static XPathExpression_impl<string_type, string_adaptor>* createVariable(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context);
|
||||
static XPathExpression_impl<string_type, string_adaptor>* createSingleStepAbsoluteLocationPath(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context);
|
||||
static XPathExpression_impl<string_type, string_adaptor>* createUnaryExpression(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context);
|
||||
static XPathExpression_impl<string_type, string_adaptor>* createUnaryNegativeExpr(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context);
|
||||
|
||||
static impl::StepList<string_type, string_adaptor> createStepList(typename impl::types<string_adaptor>::node_iter_t const& from, typename impl::types<string_adaptor>::node_iter_t const& to, impl::CompilationContext<string_type, string_adaptor>& context);
|
||||
|
||||
static XPathExpression<string_type, string_adaptor>* createDocMatch(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context);
|
||||
static XPathExpression<string_type, string_adaptor>* createSingleMatchStep(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context);
|
||||
static XPathExpression<string_type, string_adaptor>* createRelativePathPattern(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context);
|
||||
static XPathExpression<string_type, string_adaptor>* createAlternatePattern(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context);
|
||||
static XPathExpression_impl<string_type, string_adaptor>* createDocMatch(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context);
|
||||
static XPathExpression_impl<string_type, string_adaptor>* createSingleMatchStep(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context);
|
||||
static XPathExpression_impl<string_type, string_adaptor>* createRelativePathPattern(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context);
|
||||
static XPathExpression_impl<string_type, string_adaptor>* createAlternatePattern(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context);
|
||||
static double defaultPriority(typename impl::types<string_adaptor>::node_iter_t const& i,
|
||||
typename impl::types<string_adaptor>::node_iter_t const& ie);
|
||||
|
||||
static impl::StepList<string_type, string_adaptor> createPatternList(typename impl::types<string_adaptor>::node_iter_t const& from, typename impl::types<string_adaptor>::node_iter_t const& to, impl::CompilationContext<string_type, string_adaptor>& context);
|
||||
|
||||
static XPathExpression<string_type, string_adaptor>* createAttributeValue(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context);
|
||||
static XPathExpression<string_type, string_adaptor>* createEmbeddedExpr(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context);
|
||||
static XPathExpression<string_type, string_adaptor>* createDoubleLeftCurly(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context);
|
||||
static XPathExpression<string_type, string_adaptor>* createDoubleRightCurly(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context);
|
||||
static XPathExpression_impl<string_type, string_adaptor>* createAttributeValue(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context);
|
||||
static XPathExpression_impl<string_type, string_adaptor>* createEmbeddedExpr(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context);
|
||||
static XPathExpression_impl<string_type, string_adaptor>* createDoubleLeftCurly(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context);
|
||||
static XPathExpression_impl<string_type, string_adaptor>* createDoubleRightCurly(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context);
|
||||
|
||||
static std::map<int, compileFn>& expression_factory()
|
||||
{
|
||||
|
@ -516,19 +516,19 @@ namespace XPath
|
|||
{
|
||||
|
||||
template<class string_type, class string_adaptor>
|
||||
XPathExpression<string_type, string_adaptor>* XPath<string_type, string_adaptor>::createAbsoluteLocationPath(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context)
|
||||
XPathExpression_impl<string_type, string_adaptor>* XPath<string_type, string_adaptor>::createAbsoluteLocationPath(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context)
|
||||
{
|
||||
return new impl::AbsoluteLocationPath<string_type, string_adaptor>(createStepList(i->children.begin(), i->children.end(), context));
|
||||
} // createAbsoluteLocationPath
|
||||
|
||||
template<class string_type, class string_adaptor>
|
||||
XPathExpression<string_type, string_adaptor>* XPath<string_type, string_adaptor>::createRelativeLocationPath(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context)
|
||||
XPathExpression_impl<string_type, string_adaptor>* XPath<string_type, string_adaptor>::createRelativeLocationPath(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context)
|
||||
{
|
||||
return new impl::RelativeLocationPath<string_type, string_adaptor>(createStepList(i->children.begin(), i->children.end(), context));
|
||||
} // createRelativeLocationPath
|
||||
|
||||
template<class string_type, class string_adaptor>
|
||||
XPathExpression<string_type, string_adaptor>* XPath<string_type, string_adaptor>::createFilteredPath(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context)
|
||||
XPathExpression_impl<string_type, string_adaptor>* XPath<string_type, string_adaptor>::createFilteredPath(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context)
|
||||
{
|
||||
impl::StepList<string_type, string_adaptor> steps;
|
||||
steps.push_back(impl::StepFactory<string_type, string_adaptor>::createFilter(i, context));
|
||||
|
@ -536,14 +536,14 @@ XPathExpression<string_type, string_adaptor>* XPath<string_type, string_adaptor>
|
|||
} // createFilteredPath
|
||||
|
||||
template<class string_type, class string_adaptor>
|
||||
XPathExpression<string_type, string_adaptor>* XPath<string_type, string_adaptor>::createSingleStepRelativeLocationPath(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context)
|
||||
XPathExpression_impl<string_type, string_adaptor>* XPath<string_type, string_adaptor>::createSingleStepRelativeLocationPath(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context)
|
||||
{
|
||||
typename impl::types<string_adaptor>::node_iter_t n = i;
|
||||
return new impl::RelativeLocationPath<string_type, string_adaptor>(impl::StepFactory<string_type, string_adaptor>::createSingleStep(n, ie, context));
|
||||
} // createSingleStepRelativeLocationPath
|
||||
|
||||
template<class string_type, class string_adaptor>
|
||||
XPathExpression<string_type, string_adaptor>* XPath<string_type, string_adaptor>::createExpression(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context)
|
||||
XPathExpression_impl<string_type, string_adaptor>* XPath<string_type, string_adaptor>::createExpression(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context)
|
||||
{
|
||||
typename impl::types<string_adaptor>::node_iter_t c = i->children.begin();
|
||||
impl::skipWhitespace<string_adaptor>(c);
|
||||
|
@ -551,7 +551,7 @@ XPathExpression<string_type, string_adaptor>* XPath<string_type, string_adaptor>
|
|||
} // createExpression
|
||||
|
||||
template<class string_type, class string_adaptor>
|
||||
XPathExpression<string_type, string_adaptor>* XPath<string_type, string_adaptor>::createFunction(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context)
|
||||
XPathExpression_impl<string_type, string_adaptor>* XPath<string_type, string_adaptor>::createFunction(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context)
|
||||
{
|
||||
typename impl::types<string_adaptor>::node_iter_t c = i->children.begin();
|
||||
|
||||
|
@ -587,17 +587,17 @@ XPathExpression<string_type, string_adaptor>* XPath<string_type, string_adaptor>
|
|||
} // createFunction
|
||||
|
||||
template<class string_type, class string_adaptor>
|
||||
XPathExpression<string_type, string_adaptor>* XPath<string_type, string_adaptor>::createBinaryExpression(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context)
|
||||
XPathExpression_impl<string_type, string_adaptor>* XPath<string_type, string_adaptor>::createBinaryExpression(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context)
|
||||
{
|
||||
typename impl::types<string_adaptor>::node_iter_t c = i->children.begin();
|
||||
XPathExpression<string_type, string_adaptor>* p1 = XPath<string_type, string_adaptor>::compile_expression(c, i->children.end(), context);
|
||||
XPathExpression_impl<string_type, string_adaptor>* p1 = XPath<string_type, string_adaptor>::compile_expression(c, i->children.end(), context);
|
||||
++c;
|
||||
|
||||
do
|
||||
{
|
||||
long op = impl::getNodeId<string_adaptor>(c);
|
||||
++c;
|
||||
XPathExpression<string_type, string_adaptor>* p2 = XPath<string_type, string_adaptor>::compile_expression(c, i->children.end(), context);
|
||||
XPathExpression_impl<string_type, string_adaptor>* p2 = XPath<string_type, string_adaptor>::compile_expression(c, i->children.end(), context);
|
||||
|
||||
switch(op)
|
||||
{
|
||||
|
@ -653,21 +653,21 @@ XPathExpression<string_type, string_adaptor>* XPath<string_type, string_adaptor>
|
|||
} // createBinaryExpression
|
||||
|
||||
template<class string_type, class string_adaptor>
|
||||
XPathExpression<string_type, string_adaptor>* XPath<string_type, string_adaptor>::createLiteral(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context)
|
||||
XPathExpression_impl<string_type, string_adaptor>* XPath<string_type, string_adaptor>::createLiteral(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context)
|
||||
{
|
||||
string_type str = string_adaptor::construct(i->value.begin(), i->value.end());
|
||||
return new StringValue<string_type, string_adaptor>(str);
|
||||
} // createLiteral
|
||||
|
||||
template<class string_type, class string_adaptor>
|
||||
XPathExpression<string_type, string_adaptor>* XPath<string_type, string_adaptor>::createNumber(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context)
|
||||
XPathExpression_impl<string_type, string_adaptor>* XPath<string_type, string_adaptor>::createNumber(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context)
|
||||
{
|
||||
string_type str = string_adaptor::construct(i->value.begin(), i->value.end());
|
||||
return new NumericValue<string_type, string_adaptor>(boost::lexical_cast<double>(str));
|
||||
} // createNumber
|
||||
|
||||
template<class string_type, class string_adaptor>
|
||||
XPathExpression<string_type, string_adaptor>* XPath<string_type, string_adaptor>::createVariable(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context)
|
||||
XPathExpression_impl<string_type, string_adaptor>* XPath<string_type, string_adaptor>::createVariable(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context)
|
||||
{
|
||||
typename impl::types<string_adaptor>::node_iter_t n = i->children.begin();
|
||||
++n; // skip $
|
||||
|
@ -685,20 +685,20 @@ XPathExpression<string_type, string_adaptor>* XPath<string_type, string_adaptor>
|
|||
} // createVariable
|
||||
|
||||
template<class string_type, class string_adaptor>
|
||||
XPathExpression<string_type, string_adaptor>* XPath<string_type, string_adaptor>::createSingleStepAbsoluteLocationPath(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context)
|
||||
XPathExpression_impl<string_type, string_adaptor>* XPath<string_type, string_adaptor>::createSingleStepAbsoluteLocationPath(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context)
|
||||
{
|
||||
typename impl::types<string_adaptor>::node_iter_t n = i;
|
||||
return new impl::AbsoluteLocationPath<string_type, string_adaptor>(impl::StepFactory<string_type, string_adaptor>::createSingleStep(n, ie, context));
|
||||
} // createSingleStepAbsoluteLocationPath
|
||||
|
||||
template<class string_type, class string_adaptor>
|
||||
XPathExpression<string_type, string_adaptor>* XPath<string_type, string_adaptor>::createUnaryExpression(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context)
|
||||
XPathExpression_impl<string_type, string_adaptor>* XPath<string_type, string_adaptor>::createUnaryExpression(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context)
|
||||
{
|
||||
return XPath<string_type, string_adaptor>::compile_expression(i->children.begin(), i->children.end(), context);
|
||||
} // createUnaryExpression
|
||||
|
||||
template<class string_type, class string_adaptor>
|
||||
XPathExpression<string_type, string_adaptor>* XPath<string_type, string_adaptor>::createUnaryNegativeExpr(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context)
|
||||
XPathExpression_impl<string_type, string_adaptor>* XPath<string_type, string_adaptor>::createUnaryNegativeExpr(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context)
|
||||
{
|
||||
return new impl::UnaryNegative<string_type, string_adaptor>(XPath<string_type, string_adaptor>::compile_expression(i+1, ie, context));
|
||||
} // createUnaryNegativeExpr
|
||||
|
@ -745,14 +745,14 @@ impl::StepList<string_type, string_adaptor> XPath<string_type, string_adaptor>::
|
|||
} // createStepList
|
||||
|
||||
template<class string_type, class string_adaptor>
|
||||
XPathExpression<string_type, string_adaptor>* XPath<string_type, string_adaptor>::createDocMatch(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context)
|
||||
XPathExpression_impl<string_type, string_adaptor>* XPath<string_type, string_adaptor>::createDocMatch(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context)
|
||||
{
|
||||
typename impl::types<string_adaptor>::node_iter_t n = i;
|
||||
return new impl::MatchExpressionWrapper<string_type, string_adaptor>(new impl::RelativeLocationPath<string_type, string_adaptor>(impl::StepFactory<string_type, string_adaptor>::createSingleStep(n, ie, context)), defaultPriority(i, ie));
|
||||
} // createDocMatch
|
||||
|
||||
template<class string_type, class string_adaptor>
|
||||
XPathExpression<string_type, string_adaptor>* XPath<string_type, string_adaptor>::createSingleMatchStep(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context)
|
||||
XPathExpression_impl<string_type, string_adaptor>* XPath<string_type, string_adaptor>::createSingleMatchStep(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context)
|
||||
{
|
||||
typename impl::types<string_adaptor>::node_iter_t n = i;
|
||||
|
||||
|
@ -763,13 +763,13 @@ XPathExpression<string_type, string_adaptor>* XPath<string_type, string_adaptor>
|
|||
} // createSingleMatchStep
|
||||
|
||||
template<class string_type, class string_adaptor>
|
||||
XPathExpression<string_type, string_adaptor>* XPath<string_type, string_adaptor>::createRelativePathPattern(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context)
|
||||
XPathExpression_impl<string_type, string_adaptor>* XPath<string_type, string_adaptor>::createRelativePathPattern(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context)
|
||||
{
|
||||
return new impl::MatchExpressionWrapper<string_type, string_adaptor>(new impl::RelativeLocationPath<string_type, string_adaptor>(createPatternList(i->children.begin(), i->children.end(), context)), defaultPriority(i, ie));
|
||||
} // createRelativePathPattern
|
||||
|
||||
template<class string_type, class string_adaptor>
|
||||
XPathExpression<string_type, string_adaptor>* XPath<string_type, string_adaptor>::createAlternatePattern(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context)
|
||||
XPathExpression_impl<string_type, string_adaptor>* XPath<string_type, string_adaptor>::createAlternatePattern(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context)
|
||||
{
|
||||
// child sequence is test union_op test ...
|
||||
typename impl::types<string_adaptor>::node_iter_t n = i->children.begin(), e = i->children.end();
|
||||
|
@ -960,7 +960,7 @@ impl::StepList<string_type, string_adaptor> XPath<string_type, string_adaptor>::
|
|||
|
||||
|
||||
template<class string_type, class string_adaptor>
|
||||
XPathExpression<string_type, string_adaptor>* XPath<string_type, string_adaptor>::createAttributeValue(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context)
|
||||
XPathExpression_impl<string_type, string_adaptor>* XPath<string_type, string_adaptor>::createAttributeValue(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context)
|
||||
{
|
||||
std::vector<XPathExpressionPtr<string_type, string_adaptor> > args;
|
||||
for(typename impl::types<string_adaptor>::node_iter_t a = i->children.begin(), e = i->children.end(); a != e; ++a)
|
||||
|
@ -977,19 +977,19 @@ XPathExpression<string_type, string_adaptor>* XPath<string_type, string_adaptor>
|
|||
} // createAttributeValue
|
||||
|
||||
template<class string_type, class string_adaptor>
|
||||
XPathExpression<string_type, string_adaptor>* XPath<string_type, string_adaptor>::createEmbeddedExpr(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context)
|
||||
XPathExpression_impl<string_type, string_adaptor>* XPath<string_type, string_adaptor>::createEmbeddedExpr(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context)
|
||||
{
|
||||
return compile_expression(i->children.begin() + 1, i->children.end(), context);
|
||||
} // createEmbeddedExpr
|
||||
|
||||
template<class string_type, class string_adaptor>
|
||||
XPathExpression<string_type, string_adaptor>* XPath<string_type, string_adaptor>::createDoubleLeftCurly(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context)
|
||||
XPathExpression_impl<string_type, string_adaptor>* XPath<string_type, string_adaptor>::createDoubleLeftCurly(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context)
|
||||
{
|
||||
return new StringValue<string_type, string_adaptor>("{");
|
||||
} // createDoubleLeftCurly
|
||||
|
||||
template<class string_type, class string_adaptor>
|
||||
XPathExpression<string_type, string_adaptor>* XPath<string_type, string_adaptor>::createDoubleRightCurly(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context)
|
||||
XPathExpression_impl<string_type, string_adaptor>* XPath<string_type, string_adaptor>::createDoubleRightCurly(typename impl::types<string_adaptor>::node_iter_t const& i, typename impl::types<string_adaptor>::node_iter_t const& ie, impl::CompilationContext<string_type, string_adaptor>& context)
|
||||
{
|
||||
return new StringValue<string_type, string_adaptor>("}");
|
||||
} // createDoubleRightCurly
|
||||
|
|
|
@ -12,12 +12,12 @@ namespace impl
|
|||
|
||||
template<class string_type, class string_adaptor>
|
||||
class EqualsOperator : private BinaryExpression<string_type, string_adaptor>,
|
||||
public XPathExpression<string_type, string_adaptor>
|
||||
public XPathExpression_impl<string_type, string_adaptor>
|
||||
{
|
||||
typedef BinaryExpression<string_type, string_adaptor> baseT;
|
||||
public:
|
||||
EqualsOperator(XPathExpression<string_type, string_adaptor>* lhs,
|
||||
XPathExpression<string_type, string_adaptor>* rhs) :
|
||||
EqualsOperator(XPathExpression_impl<string_type, string_adaptor>* lhs,
|
||||
XPathExpression_impl<string_type, string_adaptor>* rhs) :
|
||||
BinaryExpression<string_type, string_adaptor>(lhs, rhs) { }
|
||||
|
||||
virtual XPathValue<string_type, string_adaptor> evaluate(const DOM::Node<string_type, string_adaptor>& context,
|
||||
|
@ -30,12 +30,12 @@ public:
|
|||
|
||||
template<class string_type, class string_adaptor>
|
||||
class NotEqualsOperator : private BinaryExpression<string_type, string_adaptor>,
|
||||
public XPathExpression<string_type, string_adaptor>
|
||||
public XPathExpression_impl<string_type, string_adaptor>
|
||||
{
|
||||
typedef BinaryExpression<string_type, string_adaptor> baseT;
|
||||
public:
|
||||
NotEqualsOperator(XPathExpression<string_type, string_adaptor>* lhs,
|
||||
XPathExpression<string_type, string_adaptor>* rhs) :
|
||||
NotEqualsOperator(XPathExpression_impl<string_type, string_adaptor>* lhs,
|
||||
XPathExpression_impl<string_type, string_adaptor>* rhs) :
|
||||
BinaryExpression<string_type, string_adaptor>(lhs, rhs) { }
|
||||
|
||||
virtual XPathValue<string_type, string_adaptor> evaluate(const DOM::Node<string_type, string_adaptor>& context,
|
||||
|
@ -48,12 +48,12 @@ public:
|
|||
|
||||
template<class string_type, class string_adaptor>
|
||||
class LessThanOperator : private BinaryExpression<string_type, string_adaptor>,
|
||||
public XPathExpression<string_type, string_adaptor>
|
||||
public XPathExpression_impl<string_type, string_adaptor>
|
||||
{
|
||||
typedef BinaryExpression<string_type, string_adaptor> baseT;
|
||||
public:
|
||||
LessThanOperator(XPathExpression<string_type, string_adaptor>* lhs,
|
||||
XPathExpression<string_type, string_adaptor>* rhs) :
|
||||
LessThanOperator(XPathExpression_impl<string_type, string_adaptor>* lhs,
|
||||
XPathExpression_impl<string_type, string_adaptor>* rhs) :
|
||||
BinaryExpression<string_type, string_adaptor>(lhs, rhs) { }
|
||||
|
||||
virtual XPathValue<string_type, string_adaptor> evaluate(const DOM::Node<string_type, string_adaptor>& context,
|
||||
|
@ -66,12 +66,12 @@ public:
|
|||
|
||||
template<class string_type, class string_adaptor>
|
||||
class LessThanEqualsOperator : private BinaryExpression<string_type, string_adaptor>,
|
||||
public XPathExpression<string_type, string_adaptor>
|
||||
public XPathExpression_impl<string_type, string_adaptor>
|
||||
{
|
||||
typedef BinaryExpression<string_type, string_adaptor> baseT;
|
||||
public:
|
||||
LessThanEqualsOperator(XPathExpression<string_type, string_adaptor>* lhs,
|
||||
XPathExpression<string_type, string_adaptor>* rhs) :
|
||||
LessThanEqualsOperator(XPathExpression_impl<string_type, string_adaptor>* lhs,
|
||||
XPathExpression_impl<string_type, string_adaptor>* rhs) :
|
||||
BinaryExpression<string_type, string_adaptor>(lhs, rhs) { }
|
||||
|
||||
virtual XPathValue<string_type, string_adaptor> evaluate(const DOM::Node<string_type, string_adaptor>& context,
|
||||
|
@ -84,12 +84,12 @@ public:
|
|||
|
||||
template<class string_type, class string_adaptor>
|
||||
class GreaterThanOperator : private BinaryExpression<string_type, string_adaptor>,
|
||||
public XPathExpression<string_type, string_adaptor>
|
||||
public XPathExpression_impl<string_type, string_adaptor>
|
||||
{
|
||||
typedef BinaryExpression<string_type, string_adaptor> baseT;
|
||||
public:
|
||||
GreaterThanOperator(XPathExpression<string_type, string_adaptor>* lhs,
|
||||
XPathExpression<string_type, string_adaptor>* rhs) :
|
||||
GreaterThanOperator(XPathExpression_impl<string_type, string_adaptor>* lhs,
|
||||
XPathExpression_impl<string_type, string_adaptor>* rhs) :
|
||||
BinaryExpression<string_type, string_adaptor>(lhs, rhs) { }
|
||||
|
||||
virtual XPathValue<string_type, string_adaptor> evaluate(const DOM::Node<string_type, string_adaptor>& context,
|
||||
|
@ -102,12 +102,12 @@ public:
|
|||
|
||||
template<class string_type, class string_adaptor>
|
||||
class GreaterThanEqualsOperator : private BinaryExpression<string_type, string_adaptor>,
|
||||
public XPathExpression<string_type, string_adaptor>
|
||||
public XPathExpression_impl<string_type, string_adaptor>
|
||||
{
|
||||
typedef BinaryExpression<string_type, string_adaptor> baseT;
|
||||
public:
|
||||
GreaterThanEqualsOperator(XPathExpression<string_type, string_adaptor>* lhs,
|
||||
XPathExpression<string_type, string_adaptor>* rhs) :
|
||||
GreaterThanEqualsOperator(XPathExpression_impl<string_type, string_adaptor>* lhs,
|
||||
XPathExpression_impl<string_type, string_adaptor>* rhs) :
|
||||
BinaryExpression<string_type, string_adaptor>(lhs, rhs) { }
|
||||
|
||||
virtual XPathValue<string_type, string_adaptor> evaluate(const DOM::Node<string_type, string_adaptor>& context,
|
||||
|
|
|
@ -20,15 +20,15 @@ namespace impl
|
|||
{
|
||||
|
||||
template<class string_type, class string_adaptor>
|
||||
class StepExpression : public XPathExpression<string_type, string_adaptor>
|
||||
class StepExpression : public XPathExpression_impl<string_type, string_adaptor>
|
||||
{
|
||||
public:
|
||||
StepExpression() { }
|
||||
StepExpression(const std::vector<XPathExpression<string_type, string_adaptor> *>& predicates) : predicates_(predicates) { }
|
||||
StepExpression(const std::vector<XPathExpression_impl<string_type, string_adaptor> *>& predicates) : predicates_(predicates) { }
|
||||
|
||||
virtual ~StepExpression()
|
||||
{
|
||||
for(typename std::vector<XPathExpression<string_type, string_adaptor>*>::iterator p = predicates_.begin(), e = predicates_.end(); p != e; ++p)
|
||||
for(typename std::vector<XPathExpression_impl<string_type, string_adaptor>*>::iterator p = predicates_.begin(), e = predicates_.end(); p != e; ++p)
|
||||
delete *p;
|
||||
} // ~StepExpression
|
||||
|
||||
|
@ -40,7 +40,7 @@ public:
|
|||
protected:
|
||||
NodeSet<string_type, string_adaptor> applyPredicates(NodeSet<string_type, string_adaptor>& nodes, const ExecutionContext<string_type, string_adaptor>& parentContext) const
|
||||
{
|
||||
for(typename std::vector<XPathExpression<string_type, string_adaptor>*>::const_iterator p = predicates_.begin(), e = predicates_.end();
|
||||
for(typename std::vector<XPathExpression_impl<string_type, string_adaptor>*>::const_iterator p = predicates_.begin(), e = predicates_.end();
|
||||
(p != e) && (!nodes.empty()); ++p)
|
||||
nodes = applyPredicate(nodes, *p, parentContext);
|
||||
return nodes;
|
||||
|
@ -48,7 +48,7 @@ protected:
|
|||
|
||||
private:
|
||||
NodeSet<string_type, string_adaptor> applyPredicate(NodeSet<string_type, string_adaptor>& nodes,
|
||||
XPathExpression<string_type, string_adaptor>* predicate,
|
||||
XPathExpression_impl<string_type, string_adaptor>* predicate,
|
||||
const ExecutionContext<string_type, string_adaptor>& parentContext) const
|
||||
{
|
||||
ExecutionContext<string_type, string_adaptor> executionContext(nodes.size(), parentContext);
|
||||
|
@ -69,7 +69,7 @@ private:
|
|||
return results;
|
||||
} // applyPredicate
|
||||
|
||||
std::vector<XPathExpression<string_type, string_adaptor>*> predicates_;
|
||||
std::vector<XPathExpression_impl<string_type, string_adaptor>*> predicates_;
|
||||
}; // StepExpression
|
||||
|
||||
template<class string_type, class string_adaptor>
|
||||
|
@ -85,7 +85,7 @@ public:
|
|||
} // TestStepExpression
|
||||
|
||||
TestStepExpression(Axis axis, NodeTest<string_type, string_adaptor>* test,
|
||||
const std::vector<XPathExpression<string_type, string_adaptor>*>& predicates) :
|
||||
const std::vector<XPathExpression_impl<string_type, string_adaptor>*>& predicates) :
|
||||
StepExpression<string_type, string_adaptor>(predicates),
|
||||
axis_(axis),
|
||||
test_(test)
|
||||
|
@ -147,8 +147,8 @@ class ExprStepExpression : public StepExpression<string_type, string_adaptor>
|
|||
{
|
||||
typedef StepExpression<string_type, string_adaptor> baseT;
|
||||
public:
|
||||
ExprStepExpression(XPathExpression<string_type, string_adaptor>* expr,
|
||||
const std::vector<XPathExpression<string_type, string_adaptor>*>& predicates) :
|
||||
ExprStepExpression(XPathExpression_impl<string_type, string_adaptor>* expr,
|
||||
const std::vector<XPathExpression_impl<string_type, string_adaptor>*>& predicates) :
|
||||
StepExpression<string_type, string_adaptor>(predicates),
|
||||
expr_(expr)
|
||||
{
|
||||
|
@ -176,8 +176,8 @@ public:
|
|||
} // evaluate
|
||||
|
||||
private:
|
||||
XPathExpression<string_type, string_adaptor>* expr_;
|
||||
std::vector<XPathExpression<string_type, string_adaptor>*> predicates_;
|
||||
XPathExpression_impl<string_type, string_adaptor>* expr_;
|
||||
std::vector<XPathExpression_impl<string_type, string_adaptor>*> predicates_;
|
||||
}; // class ExprStepExpression
|
||||
|
||||
template<class string_type, class string_adaptor>
|
||||
|
@ -201,11 +201,11 @@ public:
|
|||
bool is_attr = false)
|
||||
{
|
||||
NodeTest<string_type, string_adaptor>* test = getTest(node, end, !is_attr ? axis : ATTRIBUTE, context.namespaceContext());
|
||||
XPathExpression<string_type, string_adaptor>* thing = 0;
|
||||
XPathExpression_impl<string_type, string_adaptor>* thing = 0;
|
||||
if(!test)
|
||||
thing = XPath<string_type, string_adaptor>::compile_expression(node++, end, context);
|
||||
|
||||
std::vector<XPathExpression<string_type, string_adaptor>*> preds =
|
||||
std::vector<XPathExpression_impl<string_type, string_adaptor>*> preds =
|
||||
createPredicates(node, end, context);
|
||||
|
||||
if(!test)
|
||||
|
@ -218,9 +218,9 @@ public:
|
|||
{
|
||||
typename types<string_adaptor>::node_iter_t c = node->children.begin();
|
||||
typename types<string_adaptor>::node_iter_t const ce = node->children.end();
|
||||
XPathExpression<string_type, string_adaptor>* step = XPath<string_type, string_adaptor>::compile_expression(c, ce, context);
|
||||
XPathExpression_impl<string_type, string_adaptor>* step = XPath<string_type, string_adaptor>::compile_expression(c, ce, context);
|
||||
++c;
|
||||
std::vector<XPathExpression<string_type, string_adaptor>*> preds = createPredicates(c, ce, context);
|
||||
std::vector<XPathExpression_impl<string_type, string_adaptor>*> preds = createPredicates(c, ce, context);
|
||||
return new ExprStepExpression<string_type, string_adaptor>(step, preds);
|
||||
} // createFilter
|
||||
|
||||
|
@ -313,11 +313,11 @@ private:
|
|||
return CHILD;
|
||||
} // getAxis
|
||||
|
||||
static std::vector<XPathExpression<string_type, string_adaptor>*> createPredicates(typename types<string_adaptor>::node_iter_t& node,
|
||||
static std::vector<XPathExpression_impl<string_type, string_adaptor>*> createPredicates(typename types<string_adaptor>::node_iter_t& node,
|
||||
typename types<string_adaptor>::node_iter_t const& end,
|
||||
CompilationContext<string_type, string_adaptor>& context)
|
||||
{
|
||||
std::vector<XPathExpression<string_type, string_adaptor>*> preds;
|
||||
std::vector<XPathExpression_impl<string_type, string_adaptor>*> preds;
|
||||
|
||||
while((node != end) && (getNodeId<string_adaptor>(node) == impl::Predicate_id))
|
||||
{
|
||||
|
@ -440,7 +440,7 @@ private:
|
|||
}; // class StepFactory
|
||||
|
||||
template<class string_type, class string_adaptor>
|
||||
class RelativeLocationPath : public XPathExpression<string_type, string_adaptor>
|
||||
class RelativeLocationPath : public XPathExpression_impl<string_type, string_adaptor>
|
||||
{
|
||||
public:
|
||||
RelativeLocationPath(StepExpression<string_type, string_adaptor>* step) : steps_() { steps_.push_back(step); }
|
||||
|
|
|
@ -13,12 +13,12 @@ namespace impl
|
|||
|
||||
template<class string_type, class string_adaptor>
|
||||
class UnionExpression : private BinaryExpression<string_type, string_adaptor>,
|
||||
public XPathExpression<string_type, string_adaptor>
|
||||
public XPathExpression_impl<string_type, string_adaptor>
|
||||
{
|
||||
typedef BinaryExpression<string_type, string_adaptor> baseT;
|
||||
public:
|
||||
UnionExpression(XPathExpression<string_type, string_adaptor>* lhs,
|
||||
XPathExpression<string_type, string_adaptor>* rhs) :
|
||||
UnionExpression(XPathExpression_impl<string_type, string_adaptor>* lhs,
|
||||
XPathExpression_impl<string_type, string_adaptor>* rhs) :
|
||||
BinaryExpression<string_type, string_adaptor>(lhs, rhs) { }
|
||||
|
||||
virtual XPathValue<string_type, string_adaptor> evaluate(const DOM::Node<string_type, string_adaptor>& context,
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace XPath
|
|||
{
|
||||
|
||||
template<class string_type, class string_adaptor = Arabica::default_string_adaptor<string_type> >
|
||||
class BoolValue : public XPathValue_impl<string_type, string_adaptor>, public XPathExpression<string_type, string_adaptor>
|
||||
class BoolValue : public XPathValue_impl<string_type, string_adaptor>, public XPathExpression_impl<string_type, string_adaptor>
|
||||
{
|
||||
public:
|
||||
BoolValue(bool value) :
|
||||
|
@ -45,7 +45,7 @@ private:
|
|||
}; // class BoolValue
|
||||
|
||||
template<class string_type, class string_adaptor = Arabica::default_string_adaptor<string_type> >
|
||||
class NumericValue : public XPathValue_impl<string_type, string_adaptor>, public XPathExpression<string_type, string_adaptor>
|
||||
class NumericValue : public XPathValue_impl<string_type, string_adaptor>, public XPathExpression_impl<string_type, string_adaptor>
|
||||
{
|
||||
public:
|
||||
NumericValue(double value) :
|
||||
|
@ -89,7 +89,7 @@ private:
|
|||
}; // class NumberValue
|
||||
|
||||
template<class string_type, class string_adaptor = Arabica::default_string_adaptor<string_type> >
|
||||
class StringValue : public XPathValue_impl<string_type, string_adaptor>, public XPathExpression<string_type, string_adaptor>
|
||||
class StringValue : public XPathValue_impl<string_type, string_adaptor>, public XPathExpression_impl<string_type, string_adaptor>
|
||||
{
|
||||
public:
|
||||
StringValue(const char* value) :
|
||||
|
@ -124,7 +124,7 @@ private:
|
|||
}; // class StringValue
|
||||
|
||||
template<class string_type, class string_adaptor = Arabica::default_string_adaptor<string_type> >
|
||||
class NodeSetValue : public XPathValue_impl<string_type, string_adaptor>, public XPathExpression<string_type, string_adaptor>
|
||||
class NodeSetValue : public XPathValue_impl<string_type, string_adaptor>, public XPathExpression_impl<string_type, string_adaptor>
|
||||
{
|
||||
public:
|
||||
NodeSetValue(const NodeSet<string_type, string_adaptor>& set) : set_(set) { }
|
||||
|
|
|
@ -11,7 +11,7 @@ namespace XPath
|
|||
{
|
||||
|
||||
template<class string_type, class string_adaptor>
|
||||
class Variable : public XPathExpression<string_type, string_adaptor>
|
||||
class Variable : public XPathExpression_impl<string_type, string_adaptor>
|
||||
{
|
||||
public:
|
||||
Variable(const string_type& namespace_uri,
|
||||
|
|
|
@ -22,8 +22,8 @@ public:
|
|||
void test1()
|
||||
{
|
||||
using namespace Arabica::XPath;
|
||||
XPathExpression<string_type, string_adaptor>* p1 = new NumericValue<string_type, string_adaptor>(1);
|
||||
XPathExpression<string_type, string_adaptor>* p2 = new NumericValue<string_type, string_adaptor>(2);
|
||||
XPathExpression_impl<string_type, string_adaptor>* p1 = new NumericValue<string_type, string_adaptor>(1);
|
||||
XPathExpression_impl<string_type, string_adaptor>* p2 = new NumericValue<string_type, string_adaptor>(2);
|
||||
|
||||
XPathExpressionPtr<string_type, string_adaptor> add(new impl::PlusOperator<string_type, string_adaptor>(p1, p2));
|
||||
|
||||
|
@ -34,8 +34,8 @@ public:
|
|||
void test2()
|
||||
{
|
||||
using namespace Arabica::XPath;
|
||||
XPathExpression<string_type, string_adaptor>* p1 = new NumericValue<string_type, string_adaptor>(1);
|
||||
XPathExpression<string_type, string_adaptor>* p2 = new NumericValue<string_type, string_adaptor>(2);
|
||||
XPathExpression_impl<string_type, string_adaptor>* p1 = new NumericValue<string_type, string_adaptor>(1);
|
||||
XPathExpression_impl<string_type, string_adaptor>* p2 = new NumericValue<string_type, string_adaptor>(2);
|
||||
|
||||
XPathExpressionPtr<string_type, string_adaptor> minus(new impl::MinusOperator<string_type, string_adaptor>(p1, p2));
|
||||
|
||||
|
@ -45,8 +45,8 @@ public:
|
|||
void test3()
|
||||
{
|
||||
using namespace Arabica::XPath;
|
||||
XPathExpression<string_type, string_adaptor>* p1 = new NumericValue<string_type, string_adaptor>(3);
|
||||
XPathExpression<string_type, string_adaptor>* p2 = new NumericValue<string_type, string_adaptor>(2);
|
||||
XPathExpression_impl<string_type, string_adaptor>* p1 = new NumericValue<string_type, string_adaptor>(3);
|
||||
XPathExpression_impl<string_type, string_adaptor>* p2 = new NumericValue<string_type, string_adaptor>(2);
|
||||
|
||||
XPathExpressionPtr<string_type, string_adaptor> mult(new impl::MultiplyOperator<string_type, string_adaptor>(p1, p2));
|
||||
|
||||
|
@ -56,7 +56,7 @@ public:
|
|||
void test4()
|
||||
{
|
||||
using namespace Arabica::XPath;
|
||||
XPathExpression<string_type, string_adaptor>* mult = new impl::MultiplyOperator<string_type, string_adaptor>(new NumericValue<string_type, string_adaptor>(4), new NumericValue<string_type, string_adaptor>(2));
|
||||
XPathExpression_impl<string_type, string_adaptor>* mult = new impl::MultiplyOperator<string_type, string_adaptor>(new NumericValue<string_type, string_adaptor>(4), new NumericValue<string_type, string_adaptor>(2));
|
||||
|
||||
XPathExpressionPtr<string_type, string_adaptor> minus(new impl::MinusOperator<string_type, string_adaptor>(mult, new NumericValue<string_type, string_adaptor>(2)));
|
||||
|
||||
|
@ -67,8 +67,8 @@ public:
|
|||
void test5()
|
||||
{
|
||||
using namespace Arabica::XPath;
|
||||
XPathExpression<string_type, string_adaptor>* p1 = new NumericValue<string_type, string_adaptor>(12);
|
||||
XPathExpression<string_type, string_adaptor>* p2 = new NumericValue<string_type, string_adaptor>(2);
|
||||
XPathExpression_impl<string_type, string_adaptor>* p1 = new NumericValue<string_type, string_adaptor>(12);
|
||||
XPathExpression_impl<string_type, string_adaptor>* p2 = new NumericValue<string_type, string_adaptor>(2);
|
||||
|
||||
XPathExpressionPtr<string_type, string_adaptor> div(new impl::DivideOperator<string_type, string_adaptor>(p1, p2));
|
||||
|
||||
|
@ -78,8 +78,8 @@ public:
|
|||
void test6()
|
||||
{
|
||||
using namespace Arabica::XPath;
|
||||
XPathExpression<string_type, string_adaptor>* p1 = new NumericValue<string_type, string_adaptor>(12);
|
||||
XPathExpression<string_type, string_adaptor>* p2 = new NumericValue<string_type, string_adaptor>(2);
|
||||
XPathExpression_impl<string_type, string_adaptor>* p1 = new NumericValue<string_type, string_adaptor>(12);
|
||||
XPathExpression_impl<string_type, string_adaptor>* p2 = new NumericValue<string_type, string_adaptor>(2);
|
||||
|
||||
XPathExpressionPtr<string_type, string_adaptor> mod(new impl::ModOperator<string_type, string_adaptor>(p1, p2));
|
||||
|
||||
|
@ -89,8 +89,8 @@ public:
|
|||
void test7()
|
||||
{
|
||||
using namespace Arabica::XPath;
|
||||
XPathExpression<string_type, string_adaptor>* p1 = new NumericValue<string_type, string_adaptor>(11);
|
||||
XPathExpression<string_type, string_adaptor>* p2 = new NumericValue<string_type, string_adaptor>(2);
|
||||
XPathExpression_impl<string_type, string_adaptor>* p1 = new NumericValue<string_type, string_adaptor>(11);
|
||||
XPathExpression_impl<string_type, string_adaptor>* p2 = new NumericValue<string_type, string_adaptor>(2);
|
||||
|
||||
XPathExpressionPtr<string_type, string_adaptor> div(new impl::DivideOperator<string_type, string_adaptor>(p1, p2));
|
||||
|
||||
|
@ -100,8 +100,8 @@ public:
|
|||
void test8()
|
||||
{
|
||||
using namespace Arabica::XPath;
|
||||
XPathExpression<string_type, string_adaptor>* p1 = new NumericValue<string_type, string_adaptor>(11);
|
||||
XPathExpression<string_type, string_adaptor>* p2 = new NumericValue<string_type, string_adaptor>(4);
|
||||
XPathExpression_impl<string_type, string_adaptor>* p1 = new NumericValue<string_type, string_adaptor>(11);
|
||||
XPathExpression_impl<string_type, string_adaptor>* p2 = new NumericValue<string_type, string_adaptor>(4);
|
||||
|
||||
XPathExpressionPtr<string_type, string_adaptor> mod(new impl::ModOperator<string_type, string_adaptor>(p1, p2));
|
||||
|
||||
|
@ -111,8 +111,8 @@ public:
|
|||
void test9()
|
||||
{
|
||||
using namespace Arabica::XPath;
|
||||
XPathExpression<string_type, string_adaptor>* p1 = new NumericValue<string_type, string_adaptor>(5);
|
||||
XPathExpression<string_type, string_adaptor>* p2 = new NumericValue<string_type, string_adaptor>(2);
|
||||
XPathExpression_impl<string_type, string_adaptor>* p1 = new NumericValue<string_type, string_adaptor>(5);
|
||||
XPathExpression_impl<string_type, string_adaptor>* p2 = new NumericValue<string_type, string_adaptor>(2);
|
||||
|
||||
XPathExpressionPtr<string_type, string_adaptor> mod(new impl::ModOperator<string_type, string_adaptor>(p1, p2));
|
||||
|
||||
|
@ -122,8 +122,8 @@ public:
|
|||
void test10()
|
||||
{
|
||||
using namespace Arabica::XPath;
|
||||
XPathExpression<string_type, string_adaptor>* p1 = new NumericValue<string_type, string_adaptor>(5);
|
||||
XPathExpression<string_type, string_adaptor>* p2 = new NumericValue<string_type, string_adaptor>(-2);
|
||||
XPathExpression_impl<string_type, string_adaptor>* p1 = new NumericValue<string_type, string_adaptor>(5);
|
||||
XPathExpression_impl<string_type, string_adaptor>* p2 = new NumericValue<string_type, string_adaptor>(-2);
|
||||
|
||||
XPathExpressionPtr<string_type, string_adaptor> mod(new impl::ModOperator<string_type, string_adaptor>(p1, p2));
|
||||
|
||||
|
@ -133,8 +133,8 @@ public:
|
|||
void test11()
|
||||
{
|
||||
using namespace Arabica::XPath;
|
||||
XPathExpression<string_type, string_adaptor>* p1 = new NumericValue<string_type, string_adaptor>(-5);
|
||||
XPathExpression<string_type, string_adaptor>* p2 = new NumericValue<string_type, string_adaptor>(2);
|
||||
XPathExpression_impl<string_type, string_adaptor>* p1 = new NumericValue<string_type, string_adaptor>(-5);
|
||||
XPathExpression_impl<string_type, string_adaptor>* p2 = new NumericValue<string_type, string_adaptor>(2);
|
||||
|
||||
XPathExpressionPtr<string_type, string_adaptor> mod(new impl::ModOperator<string_type, string_adaptor>(p1, p2));
|
||||
|
||||
|
@ -144,8 +144,8 @@ public:
|
|||
void test12()
|
||||
{
|
||||
using namespace Arabica::XPath;
|
||||
XPathExpression<string_type, string_adaptor>* p1 = new NumericValue<string_type, string_adaptor>(-5);
|
||||
XPathExpression<string_type, string_adaptor>* p2 = new NumericValue<string_type, string_adaptor>(-2);
|
||||
XPathExpression_impl<string_type, string_adaptor>* p1 = new NumericValue<string_type, string_adaptor>(-5);
|
||||
XPathExpression_impl<string_type, string_adaptor>* p2 = new NumericValue<string_type, string_adaptor>(-2);
|
||||
|
||||
XPathExpressionPtr<string_type, string_adaptor> mod(new impl::ModOperator<string_type, string_adaptor>(p1, p2));
|
||||
|
||||
|
@ -155,7 +155,7 @@ public:
|
|||
void test13()
|
||||
{
|
||||
using namespace Arabica::XPath;
|
||||
XPathExpression<string_type, string_adaptor>* p1 = new NumericValue<string_type, string_adaptor>(5);
|
||||
XPathExpression_impl<string_type, string_adaptor>* p1 = new NumericValue<string_type, string_adaptor>(5);
|
||||
XPathExpressionPtr<string_type, string_adaptor> p2(new impl::UnaryNegative<string_type, string_adaptor>(p1));
|
||||
|
||||
assertEquals(-5.0, p2->evaluateAsNumber(dummy_), 0.0);
|
||||
|
@ -164,7 +164,7 @@ public:
|
|||
void test14()
|
||||
{
|
||||
using namespace Arabica::XPath;
|
||||
XPathExpression<string_type, string_adaptor>* p1 = new NumericValue<string_type, string_adaptor>(-5);
|
||||
XPathExpression_impl<string_type, string_adaptor>* p1 = new NumericValue<string_type, string_adaptor>(-5);
|
||||
XPathExpressionPtr<string_type, string_adaptor> p2(new impl::UnaryNegative<string_type, string_adaptor>(p1));
|
||||
|
||||
assertEquals(5.0, p2->evaluateAsNumber(dummy_), 0.0);
|
||||
|
|
|
@ -50,8 +50,8 @@ public:
|
|||
void test4()
|
||||
{
|
||||
using namespace Arabica::XPath;
|
||||
XPathExpression<string_type, string_adaptor>* p1 = new StringValue<string_type, string_adaptor>("charlie");
|
||||
XPathExpression<string_type, string_adaptor>* p2 = new StringValue<string_type, string_adaptor>("charlie");
|
||||
XPathExpression_impl<string_type, string_adaptor>* p1 = new StringValue<string_type, string_adaptor>("charlie");
|
||||
XPathExpression_impl<string_type, string_adaptor>* p2 = new StringValue<string_type, string_adaptor>("charlie");
|
||||
|
||||
XPathExpressionPtr<string_type, string_adaptor> equals1(new impl::EqualsOperator<string_type, string_adaptor>(p1, p2));
|
||||
|
||||
|
@ -61,8 +61,8 @@ public:
|
|||
void test5()
|
||||
{
|
||||
using namespace Arabica::XPath;
|
||||
XPathExpression<string_type, string_adaptor>* p1 = new StringValue<string_type, string_adaptor>("trousers");
|
||||
XPathExpression<string_type, string_adaptor>* p2 = new StringValue<string_type, string_adaptor>("charlie");
|
||||
XPathExpression_impl<string_type, string_adaptor>* p1 = new StringValue<string_type, string_adaptor>("trousers");
|
||||
XPathExpression_impl<string_type, string_adaptor>* p2 = new StringValue<string_type, string_adaptor>("charlie");
|
||||
|
||||
XPathExpressionPtr<string_type, string_adaptor> equals1(new impl::EqualsOperator<string_type, string_adaptor>(p1, p2));
|
||||
|
||||
|
|
Loading…
Reference in a new issue