top | up | prev | next

XPathNotEqualExpr Class

Definition at line 79 of XPathExpr.hpp

Constructors

XPathNotEqualExpr(XPathExpr* left_, XPathExpr* right_)

Member Functions

std::unique_ptr<XPathObject> Evaluate(XPathContext& context) override
std::unique_ptr<Node> ToDom() const override

Constructor Details

XPathNotEqualExpr Constructor

sngxml::xpath::XPathNotEqualExpr::XPathNotEqualExpr(XPathExpr * left_, XPathExpr * right_)

Definition at line 720 of XPathExpr.cpp :
 720 : XPathBinaryExpr(left_right_)
 721 {
 722 }


Declaration at line 82 of XPathExpr.hpp


Member Function Details

Evaluate Member Function

std::unique_ptr<XPathObject > sngxml::xpath::XPathNotEqualExpr::Evaluate(XPathContext & context) override

Definition at line 724 of XPathExpr.cpp :
 725 {
 726     std::unique_ptr<XPathObject> left = Left()->Evaluate(context);
 727     std::unique_ptr<XPathObject> right = Right()->Evaluate(context);
 728     std::unique_ptr<XPathObject> equal = CompareEquality(contextleft.get()right.get());
 729     if (equal->Type() != XPathObjectType::boolean)
 730     {
 731         throw std::runtime_error("boolean result expected");
 732     }
 733     return std::unique_ptr<XPathObject>(new XPathBoolean(!static_cast<XPathBoolean*>(equal.get())->Value()));
 734 }


Declaration at line 83 of XPathExpr.hpp

Base class overridden functions: sngxml::xpath::XPathExpr::Evaluate

Calls: sngxml::xpath::XPathBinaryExpr::Left , sngxml::xpath::XPathBinaryExpr::Right , sngxml::xpath::XPathExpr::Evaluate


ToDom Member Function

std::unique_ptr<Node > sngxml::xpath::XPathNotEqualExpr::ToDom() const override

Definition at line 736 of XPathExpr.cpp :
 737 {
 738     std::unique_ptr<dom::Element> element(new dom::Element(U"notEqual"));
 739     element->AppendChild(Left()->ToDom());
 740     element->AppendChild(Right()->ToDom());
 741     return std::unique_ptr<dom::Node>(element.release());
 742 }


Declaration at line 84 of XPathExpr.hpp

Base class overridden functions: sngxml::xpath::XPathExpr::ToDom

Calls: sngxml::xpath::XPathBinaryExpr::Left , sngxml::xpath::XPathBinaryExpr::Right , sngxml::xpath::XPathExpr::ToDom


top | up | prev | next