diff --git a/XPath/impl/xpath_expression.hpp b/XPath/impl/xpath_expression.hpp index a0bda592..0a1e2f90 100644 --- a/XPath/impl/xpath_expression.hpp +++ b/XPath/impl/xpath_expression.hpp @@ -39,7 +39,11 @@ private: XPathExpression& operator=(const XPathExpression&); }; // class XPathExpression -typedef boost::shared_ptr XPathExpressionPtr; +class XPathExpressionPtr : public boost::shared_ptr +{ +public: + explicit XPathExpressionPtr(XPathExpression* xp) : boost::shared_ptr(xp) { } +}; class UnaryExpression { diff --git a/XPath/impl/xpath_function_resolver.hpp b/XPath/impl/xpath_function_resolver.hpp index 8bb01fdb..3b5717b5 100644 --- a/XPath/impl/xpath_function_resolver.hpp +++ b/XPath/impl/xpath_function_resolver.hpp @@ -1,16 +1,13 @@ #ifndef ARABICA_XPATH_FUNCTION_RESOLVER_HPP #define ARABICA_XPATH_FUNCTION_RESOLVER_HPP -#include - namespace Arabica { namespace XPath { class XPathFunction; -class XPathExpression; -typedef boost::shared_ptr XPathExpressionPtr; +class XPathExpressionPtr; class UndefinedFunctionException : public std::runtime_error { diff --git a/XPath/impl/xpath_object.hpp b/XPath/impl/xpath_object.hpp index dbe48014..b8a76687 100644 --- a/XPath/impl/xpath_object.hpp +++ b/XPath/impl/xpath_object.hpp @@ -13,11 +13,6 @@ namespace Arabica namespace XPath { -class XPathExpression; -typedef boost::shared_ptr XPathExpressionPtr; -class XPathValue; -typedef boost::shared_ptr XPathValuePtr; - enum ValueType { ANY , @@ -122,6 +117,12 @@ private: XPathValue& operator=(const XPathValue&); }; // class XPathValue +class XPathValuePtr : public boost::shared_ptr +{ +public: + explicit XPathValuePtr(const XPathValue* v) : boost::shared_ptr(v) { } +}; + const double NaN = std::sqrt(-2.0); const double Zero = 0.0; const double Negative_Zero = -Zero; diff --git a/XPath/impl/xpath_variable_resolver.hpp b/XPath/impl/xpath_variable_resolver.hpp index 6fe95af2..fc17d5b2 100644 --- a/XPath/impl/xpath_variable_resolver.hpp +++ b/XPath/impl/xpath_variable_resolver.hpp @@ -1,17 +1,14 @@ #ifndef ARABICA_XPATH_VARIABLE_RESOLVER_HPP #define ARABICA_XPATH_VARIABLE_RESOLVER_HPP -#include #include +#include "xpath_object.hpp" namespace Arabica { namespace XPath { -class XPathValue; -typedef boost::shared_ptr XPathValuePtr; - class UnboundVariableException : public std::runtime_error { public: