mirror of
https://github.com/jezhiggins/arabica
synced 2025-01-29 08:36:45 +01:00
*** empty log message ***
This commit is contained in:
parent
46caaa0456
commit
703518eba9
2 changed files with 7 additions and 3 deletions
|
@ -272,6 +272,8 @@ inline bool isInfinity(double value) { return (value == Infinity); }
|
||||||
inline bool isNegativeInfinity(double value) { return (value == Negative_Infinity); }
|
inline bool isNegativeInfinity(double value) { return (value == Negative_Infinity); }
|
||||||
inline bool isInfinite(double value) { return isInfinity(value) || isNegativeInfinity(value); }
|
inline bool isInfinite(double value) { return isInfinity(value) || isNegativeInfinity(value); }
|
||||||
|
|
||||||
|
namespace impl
|
||||||
|
{
|
||||||
inline double roundNumber(double value)
|
inline double roundNumber(double value)
|
||||||
{
|
{
|
||||||
if(!(isNaN(value) || isInfinite(value) || (std::fabs(value) == 0)))
|
if(!(isNaN(value) || isInfinite(value) || (std::fabs(value) == 0)))
|
||||||
|
@ -332,6 +334,8 @@ string_type nodeStringValue(const DOM::Node<string_type>& node)
|
||||||
} // switch
|
} // switch
|
||||||
} // nodeStringValue
|
} // nodeStringValue
|
||||||
|
|
||||||
|
} // namespace impl
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
|
@ -105,7 +105,7 @@ public:
|
||||||
virtual bool asBool() const { return !value_.empty(); }
|
virtual bool asBool() const { return !value_.empty(); }
|
||||||
virtual double asNumber() const
|
virtual double asNumber() const
|
||||||
{
|
{
|
||||||
return stringAsNumber(value_);
|
return impl::stringAsNumber(value_);
|
||||||
} // asNumber
|
} // asNumber
|
||||||
virtual string_type asString() const { return value_; }
|
virtual string_type asString() const { return value_; }
|
||||||
virtual const NodeSet<string_type>& asNodeSet() const { static NodeSet<string_type> empty; return empty; }
|
virtual const NodeSet<string_type>& asNodeSet() const { static NodeSet<string_type> empty; return empty; }
|
||||||
|
@ -138,11 +138,11 @@ public:
|
||||||
} // asBool
|
} // asBool
|
||||||
virtual double asNumber() const
|
virtual double asNumber() const
|
||||||
{
|
{
|
||||||
return stringAsNumber(asString());
|
return impl::stringAsNumber(asString());
|
||||||
} // asNumber
|
} // asNumber
|
||||||
virtual string_type asString() const
|
virtual string_type asString() const
|
||||||
{
|
{
|
||||||
return !set_.empty() ? nodeStringValue(set_.top()) : string_adaptor().makeStringT("");
|
return !set_.empty() ? impl::nodeStringValue(set_.top()) : string_adaptor().makeStringT("");
|
||||||
} // asStringx
|
} // asStringx
|
||||||
virtual const NodeSet<string_type>& asNodeSet() const { return set_; }
|
virtual const NodeSet<string_type>& asNodeSet() const { return set_; }
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue