#ifndef ARABICA_XPATH_VARIABLE_HPP #define ARABICA_XPATH_VARIABLE_HPP #include "xpath_value.hpp" #include "xpath_execution_context.hpp" #include "xpath_variable_resolver.hpp" namespace Arabica { namespace XPath { template class Variable : public XPathExpression { public: Variable(const string_type& name) : name_(name) { } virtual XPathValuePtr evaluate(const DOM::Node& context, const ExecutionContext& executionContext) const { return executionContext.variableResolver().resolveVariable(name_); } // evaluate private: const string_type name_; }; // class Variable } // namespace XPath } // namespace Arabica #endif