From 4e92e8709b30c385e1a88d7d4f76c50ee4a3d736 Mon Sep 17 00:00:00 2001 From: crupest Date: Fri, 31 Dec 2021 00:26:55 +0800 Subject: ... --- src/xml/XmlNode.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/xml/XmlNode.cpp (limited to 'src/xml/XmlNode.cpp') diff --git a/src/xml/XmlNode.cpp b/src/xml/XmlNode.cpp new file mode 100644 index 00000000..cfeb5cf9 --- /dev/null +++ b/src/xml/XmlNode.cpp @@ -0,0 +1,14 @@ +#include "cru/xml/XmlNode.hpp" + +namespace cru::xml { +bool operator==(const XmlNode& lhs, const XmlNode& rhs) { + return lhs.GetType() == rhs.GetType() && lhs.GetText() == rhs.GetText() && + lhs.GetTag() == rhs.GetTag() && + lhs.GetAttributes() == rhs.GetAttributes() && + lhs.GetChildren() == rhs.GetChildren(); +} + +bool operator!=(const XmlNode& lhs, const XmlNode& rhs) { + return !(lhs == rhs); +} +} // namespace cru::xml -- cgit v1.2.3