mirror of
https://github.com/jezhiggins/arabica
synced 2024-12-27 21:58:30 +01:00
This commit is contained in:
parent
cdac22542e
commit
f87c01fc53
3 changed files with 32 additions and 3 deletions
|
@ -14,8 +14,7 @@ template<class string_type, class string_adaptor = Arabica::default_string_adapt
|
||||||
class MatchExpr
|
class MatchExpr
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MatchExpr(XPathExpression_impl<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) :
|
MatchExpr(const MatchExpr& rhs) :
|
||||||
match_(rhs.match_), priority_(rhs.priority_) { }
|
match_(rhs.match_), priority_(rhs.priority_) { }
|
||||||
MatchExpr& operator=(const MatchExpr& rhs)
|
MatchExpr& operator=(const MatchExpr& rhs)
|
||||||
|
@ -33,6 +32,9 @@ public:
|
||||||
private:
|
private:
|
||||||
XPathExpression<string_type, string_adaptor> match_;
|
XPathExpression<string_type, string_adaptor> match_;
|
||||||
double priority_;
|
double priority_;
|
||||||
|
|
||||||
|
MatchExpr();
|
||||||
|
bool operator==(const MatchExpr&) const;
|
||||||
}; // MatchExpr
|
}; // MatchExpr
|
||||||
|
|
||||||
namespace impl
|
namespace impl
|
||||||
|
@ -80,6 +82,11 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::vector<MatchExpr<string_type, string_adaptor> > matches_;
|
std::vector<MatchExpr<string_type, string_adaptor> > matches_;
|
||||||
|
|
||||||
|
MatchExpressionWrapper();
|
||||||
|
MatchExpressionWrapper(const MatchExpressionWrapper&);
|
||||||
|
MatchExpressionWrapper& operator=(const MatchExpressionWrapper&);
|
||||||
|
bool operator==(const MatchExpressionWrapper&) const;
|
||||||
}; // class MatchExpressionWrapper
|
}; // class MatchExpressionWrapper
|
||||||
|
|
||||||
} // namespace impl
|
} // namespace impl
|
||||||
|
|
21
include/XPath/impl/xpath_match_rewrite.hpp
Executable file
21
include/XPath/impl/xpath_match_rewrite.hpp
Executable file
|
@ -0,0 +1,21 @@
|
||||||
|
#ifndef ARABICA_XPATHIC_MATCH_REWRITE_HPP
|
||||||
|
#define ARABICA_XPATHIC_MATCH_REWRITE_HPP
|
||||||
|
|
||||||
|
namespace Arabica
|
||||||
|
{
|
||||||
|
namespace XPath
|
||||||
|
{
|
||||||
|
|
||||||
|
template<class string_type, class string_adaptor>
|
||||||
|
MatchExpr<string_type, string_adaptor>::MatchExpr(XPathExpression_impl<string_type, string_adaptor>* match, double priority) :
|
||||||
|
match_(match), priority_(priority)
|
||||||
|
{
|
||||||
|
impl::StepExpression<string_type, string_adaptor>* step = static_cast<impl::StepExpression<string_type, string_adaptor>*>(match);
|
||||||
|
// loop through predicates here
|
||||||
|
} // MatchExpr
|
||||||
|
|
||||||
|
} // namespace XPath
|
||||||
|
|
||||||
|
} // namespace Arabica
|
||||||
|
|
||||||
|
#endif
|
|
@ -505,6 +505,7 @@ private:
|
||||||
#include "xpath_relational.hpp"
|
#include "xpath_relational.hpp"
|
||||||
#include "xpath_logical.hpp"
|
#include "xpath_logical.hpp"
|
||||||
#include "xpath_step.hpp"
|
#include "xpath_step.hpp"
|
||||||
|
#include "xpath_match_rewrite.hpp"
|
||||||
#include "xpath_compile_context.hpp"
|
#include "xpath_compile_context.hpp"
|
||||||
#include "xpath_variable.hpp"
|
#include "xpath_variable.hpp"
|
||||||
#include "xpath_function_holder.hpp"
|
#include "xpath_function_holder.hpp"
|
||||||
|
|
Loading…
Reference in a new issue